Would you like to react to this message? Create an account in a few clicks or log in to continue.

  • Post new topic
  • Reply to topic

Plugging a small gap in the XFCE keyboard settings.

avatar
davecs


Posts : 110
Join date : 2024-05-14

Plugging a small gap in the XFCE keyboard settings. Empty Plugging a small gap in the XFCE keyboard settings.

Post by davecs 13th July 2024, 7:02 pm

Here's another short script which enhances the way the keyboard behaves in certain situations. It has to be run on login. I've called it keyboard-extras and put it in /usr/local/bin and made it executable:

Code:
#!/bin/bash

#wait a while to let original setup finish first, on a slow computer you might need to give it more time
#otherwise the changes made in this script will be overwritten and ineffective
sleep 10

#this line adds the option for two shift keys together to set CAPS LOCK, and one of them alone to cancel it.
setxkbmap -option "shift:both_capslock_cancel"

#this line causes the SCROLL LOCK lamp to come on when you switch to your secondary keyboard layout.
setxkbmap -option "grp_led:scroll"

#other lines as necessary

I hate the CAPS LOCK. I rarely use it. The first setxkbmap line sets CAPS LOCK by pressing both SHIFT keys together, and releases it by pressing one of them, for the rare occasions I need it. I suppress the "normal" function of the CAPS LOCK key by setting it in the XFCE Settings Manager to act as the Compose key, which I find far more useful.

The second setxkbmap line causes the SCROLL LOCK lamp to come on when you switch to your secondary layout. It makes sense if you use it in conjunction with SCROLL LOCK set in the Settings Manager to change the layout.
  • Post new topic
  • Reply to topic

Current date/time is 21st September 2024, 12:32 am