ice-wm / icewm

IceWM releases only, see Wiki
https://github.com/ice-wm/icewm/releases
Other
289 stars 16 forks source link

How to define the composition key? #171

Closed reassuringgreet closed 4 months ago

reassuringgreet commented 4 months ago

Hi, I'm trying to migrate from XFCE, and one of the things I can't seem to find is where to define the composition key for the keyboard. In XFCE I used the right Alt (AltGr) as a composition key, and when pressing "AltGr" + "c" + "," would produce a "ç". Is there anyway to define this composition key in Icewm? And if not, do I have to create manually all the bindings in the .icewm/keys file? How would I define the example above? (I've seen it used to run scripts and commands, but never to print out a character).

Thanks for the help!

gijsbers commented 4 months ago

I have no idea. Maybe others can step in? If you figure this out, please let us know. Then we can incorporate your knowledge into the IceWM software and the documentation.

gijsbers commented 4 months ago

Can you lookup your compose key in the output of setxkbmap -print?

reassuringgreet commented 4 months ago

Hey, sorry for the delay, I had to find another computer to reinstall xfce. Here's the output of the command, as well as a screenshot showing the keyboard configuration. git1

$ setxkbmap -print

xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us+inet(evdev)+compose(ralt)"   };
    xkb_geometry  { include "pc(pc105)" };
};
reassuringgreet commented 4 months ago

I figured it out! setxkbap -query will print out the options that you can map, in my case:

rules:      evdev
model:      pc105
layout:     us
options:    compose:ralt

After this, this stackexchange question pointed me in the right direction. I tried xmodmap first ( xmodmap -e "keycode 133 = Multi_key") but for some reason this wouldn't show up when running setxkbmap -query. After a little bit of research, I found out about setxkbmap -option. Doing setxkbmap -option compose:ralt achieved the result. Documenting everything here in case you want to add the compose key option to the keyboard configuration screen. Thanks for the support, I wouldn't have found it unless you asked me for the output of setxkbmap.