When I go to “System Settings”->Keyboard->Advanced, check “configure keyboard options” and select “position of compose key”, I see the hard-coded list in the image. I don’t even know what most of those mean. I have a key that ‘showkey’ says is “keycode 185.” I don’t believe it is configured to do anything, and I surely don’t use it. I would like to make it my “compose” key. Is that possible? How?
I am not sure what you mean (or what you think they key with keycode 185 is), but I have checked “Right Crtl” there and it works to my satisfaction.
When you want to use a key on the board, but do not know what its name is in the list and then want to ask others, it would be better you show the keyboard in a picture and mark the key. It is a pity, but we can not look over your shoulder, nor read minds.
keycode 185 is F15
. As long as KDE only allows using the specific keysyms, I see remapping of this key as the only option. Check scancode (using showkey
or getkeycodes
), use setkeycodes
to remap to one of the accepted keycodes. E.g. duplicate as PrtSc
. If it works, you probably could add custom hwdb entry to remap it automatically.
Funny that I have 185 in the list of keycodes, but for the life of me I cannot imagine what key would produce it on this notebook (I most certainly does not have key marked as F15
). Shift-F3
does not do it.
And how exactly is it going to help?
Seeing the key and what is inscripted upon it (like Ctrl and it being at the right of the board) helps understanding. Trying to find some table with “key codes” to translate back into a keys inscription might be more difficult for some.
And it seems that you also can not understand which key is to be used.
Is it difficult to understand the motivation of others in asking more specific information when they try to help?
It really shouldn’t matter where the key is on my keyboard. The keyboard sends a specific code when a specific key is pressed. I should be able to determine what that code is, and discuss the consequence of sending that code to the processor.
The keycode 185 is what ‘sudo showkey’ displayed when the key was pressed. I, too, can use “Right Ctrl”, but I use that key for shortcuts in Mathematica. Every option presented in the Keyboard configuration widget matching a key on my keyboard is already dedicated to a function other than the “Compose” key. The key I wish to use is indicated in the included image.
But solving the immediate problem won’t address the larger problem of quickly and reliably mapping keyboard inputs to programed responses.
“F 15” is the “Square” key. Everybody knows that!
I will look at the man page for setkeycodes
. Unfortunately, while looking into this I found that different programs use different codes for the same key, etc. There is also an issue of what setkeycodes
is actually setting. In other words, is it creating and/or modifying a config file in my home directory? Is it just setting an environment variable for the current shell? Is it changing a global config file, etc?
It really shouldn’t be this difficult. We should have a “user specified” option to designate “this key that I’m pressing” as the desired key.
Suggestion to the KDE developers?
This is the morally correct thing to do.
I don’t see an option to edit my original post, and I don’t want to open a new thread on this. But I now believe that the KDE./Plasma is the wrong place to address this issue. sudo dumpkeys
, etc., work at the kernel level. dumpkeys
shows a listing of “compose” bindings indicating that the kernel knows how to deal with “compose” before the KDE gets involved. What dumpkeys
doesn’t show is a key binding for the “compose” modifier.
YaST->Hardware->“System Keyboard Settings” only provides two options for US English. I’m not sure why, given that there are many different kinds of keyboards.
I did come across this gem of false hope.
/usr/share/doc/packages/kbd/README.SUSE
Handling of composition of characters
=====================================
Most of the fonts have much more characters than you can reach directly
through the keyboard. To access all of them you may use showconsolefont,
deduce the decimal code and enter it by holding down <alt> and entering
the code via the keypad. There's a much better way, though:
Most characters may be entered via composition. Many characters are just
consisting of a standard character with some sort of accent or change.
Such characters can be composed by composition. Just press the <compose>
key, let it go again, enter the accent and then the letter.
Some examples: (Assuming Iso-Latin-1/9 character set:)
<compose> " a => ä
<compose> , c => ç
<compose> | S => $
Support for composition is unfortunately not contained in most keymaps.
Most lack two things:
(a) The <compose> key is not mapped
(b) The compose tables are not included
Look at the compose.* files in /usr/share/kbd/keymaps/include/:
(a) You find there two files for having the <compose> key mapped.
(b) You find there compose tables which are suitable for different
character sets.
ad (a): winkeys: The compose key will be mapped on the W*n menu key
shiftctrl: The compose key will be mapped to Shift Ctrl.
You can use both, if you like.
ad (b): latin, latinX, latin1.add, 8859_X: Contains the compose
combinations suitable for the respective character set.
Many people will want to use latin1 or latin1.add. Just
using latin is also sort of an acceptable compromise for
many Latin character sets.
YOU MAY ONLY USE ONE OF THOSE.
If you want the combination of more than one table, you
have to create a file which includes what you want.
Please keep in mind, that all these settings only affect the console,
i.e. text mode.
Your SuSE team
No. it changes in-kernel translation table from scan codes to key codes.
I don’t think that’s what I want. After examining my current key bindings, I have decided the best thing to do is to bind the right “option” key to the “compose” function.
sudo showkey
gives “keycode 126” for the right “option” key. sudo dumpkeys
shows that to be “keycode 126 = Alt”. Which makes no sense to me. I don’t need three “Alt” Keys.
setkeycodes
will not bind “keycode 126” to “compose”. No keys are bound to “compose”.
How do I bind “keycode 126” to “compose”?
I have been at this for hours, and haven’t figured it out.
In fact, selecting the “Right Win” key did work. It isn’t what I wanted, but I can live with it. I had expected it to not work since the showkey
and dumpkeys
were showing it to be mapped as “Alt”. I’m leaving this open because I still have an issue with not being able to use the key I want to use.
A couple of references that may be useful:
https://wiki.archlinux.org/title/map_scancodes_to_keycodes
https://wiki.archlinux.org/title/Keyboard_input
You may select “System Settings->Keyboard->Shortcuts->Add New Application".