This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Can Compose key be set to some custom key not from the list?

Tags: None
(comma "," separated)
shmerl
Registered Member
Posts
251
Karma
1
OS
System settings > Input Devices > Advanced > Position of Compose Key lists a number of options. However on a laptop where spare keys are limited most of them aren't really good. On the other hand my laptop has a few keys which aren't useful for anything (such as XF86Calculator and etc.) and I'd like to assign one of them to Compose. Is it possible to set those values in $HOME/.kde/share/config/kxkbrc manually and what should be the syntax there?

For example currently on my desktop system it has such setting (when it's set to Menu key):

Options=grp:rwin_toggle,compose:menu

So can I set it somehow to XF86Calculator?
luebking
Karma
0
You can use one of this options:
Code: Select all
grep 'compose:' /usr/share/X11/xkb/rules/base.lst


It may be possible to just map eg. the calculator to caps lock (or another of those keys) eg. via xmodmap or a custom xkb definition to "trick" the option. Never tried.
shmerl
Registered Member
Posts
251
Karma
1
OS
luebking wrote:You can use one of this options:
Code: Select all
grep 'compose:' /usr/share/X11/xkb/rules/base.lst


It may be possible to just map eg. the calculator to caps lock (or another of those keys) eg. via xmodmap or a custom xkb definition to "trick" the option. Never tried.


I see. Those same options are basically exposed from System Settings.
luebking
Karma
0
Good news: you can cheat it =)
run "xev -event keyboard", ensure the xev window is focused and press the calculator key.

There'll be a line like
state 0x10, keycode 148 (keysym 0x1008ff1d, XF86Calculator), same_screen YES,


now map the keycode ("148" in this case)
Code: Select all
xmodmap -e 'keycode 148 = Multi_key'
shmerl
Registered Member
Posts
251
Karma
1
OS
Thanks, I'll give it a try.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]