Using keyboard configurator

houghi houghi at houghi.org
Wed Dec 20 21:13:50 CET 2017


On 2017-12-20 17:06, Rich Shepard wrote:

>   I looked at a couple of web pages on the keyboard configuration tool
> without learning how to use the 'Change layout option' and 'Compose 
> key'
> features.
> 
>   The portables need only swap the functions of the CapsLock and 
> LeftCtrl
> keys. The Adesso has a couple of 'Windows' keys on the bottom row, and 
> this
> puts the LeftAlt key (used as the Meta key in emacs) one key to the 
> right
> for easy use. On this keyboard I'd like to swap the LeftWindoze and 
> LeftAlt
> keys.
> 
>   Please point me to the appropriate docs so I can learn how to make 
> these
> key swaps on my keyboards.

The "Caps Lock" as "Compose Key" does not switch anything. It just 
changes the
function of the CapsLock key from CapsLock to Compose.
The way you can easily type ¹² and ø and other characters. Look in e.g.
/usr/share/X11/locale/en_US.UTF-8/Compose where it is called <Multi_key>
It is a great way to use an otherwise useless and even abused key.

For the rest I would look at 'man xbindkeys' and 'man xmodmap' as well 
as use
`xev|egrep 'button|keycode'` to detect what mousebutton or key you 
pressed.
The | is not needed, but makes it a lot easier.

So with xev you will see something like:
     state 0x0, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
     state 0x40, keycode 133 (keysym 0xffeb, Super_L), same_screen YES,
     state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
     state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,

The important parts are "keycode 133" and Super_L as well as "Keycode 
64" and "Alt_L"

You run:
xmodmap -e "keycode 133 Alt_L"
xmodmap -e "keycode 64 Super_L"

Now look at the xev output again and you will see
     state 0x0, keycode 133 (keysym 0xffe9, Alt_L), same_screen YES,
     state 0x40, keycode 133 (keysym 0xffe9, Alt_L), same_screen YES,
     state 0x0, keycode 64 (keysym 0xffeb, Super_L), same_screen YES,
     state 0x8, keycode 64 (keysym 0xffeb, Super_L), same_screen YES,

Keys have now the, for you, desired function. You can do this per pc and 
login.
Do not forget to set it for root if you need that.

You can just see to it that these are run the moment you log in. Read 
the manpage
on how to put it in ~.xmodmaprc and the re-read the man pages.
I will leave this part as an excersise for the reader. ;-)

HTH, HAND
houghi


More information about the Xfce mailing list