Update manpages for new mapping files

A new manpage describing the new file format for the keyboard mapping
files is added.
This commit is contained in:
matt335672
2024-05-23 20:04:29 +01:00
parent bd49d2f690
commit 8ffd75e8d1
4 changed files with 186 additions and 85 deletions
+20 -52
View File
@@ -10,47 +10,10 @@ km-xxxxxxxx.toml
where the xxxxxxxx is replaced by the hex number of the layout of interest.
The files are TOML compatible, with 10 sections;
The contents of the files are documented in xrdp-km.toml(5)
[General], [noshift], [shift], [altgr], [shiftaltgr], [capslock],
[capslockaltgr], [shiftcapslock], [shiftcapslockaltgr], [numlock]
The [General] section contains information about the file. All other
sections contain key mappings corresponding to the state of the modifier
keys when the key is pressed.
An example line looks like;
<RDP scancode>="<KeySym>[:<unicode>]" # comment
RDP scancode
------------
The RDP scancode is the code received from the RDP client for each
key. RDP scancodes are more-or-less the same as Windows scancodes,
or "Scan Code Set 1" key-down values.
Example scancodes might be '1C' for the enter key on most European
keyboards, or 'E0 1C' for the number pad enter key.
A good website to consult for scancodes for a wide range of keyboards is
https://kbdlayout.info/
KeySym
------
The KeySym is a value used by the X server as an abstraction of the
engraving on the key being pressed. It is needed to interact with the
VNC server.
Unicode
-------
Keys which generate a character when pressed have this value added.
This is used by the xrdp login screen.
Comment
-------
For generated keymap files, the comment is the name of the X11 KeySym
for the key. This makes it a lot easier to see what is going on in
the file.
See also xrdp-genkeymap(8) which describes the utility used to
generate these files.
Creating a new file
-------------------
@@ -58,24 +21,29 @@ Creating a new file
To create a new file:-
1) Start an X server
2) Use the 'setxkbmap' command to get the keyboard configured
for the X server. Currently this has to use the 'evdev' rules so
that xrdp and the X server agree on the low-level X11 keycodes to
be used for the keys.
for the X server.
3) Run the 'xrdp-genkeymap' command to extract the keyboard
mappings
Example: ./xrdp-genkeymap /etc/xrdp/km-00000409.toml
Example: ./xrdp-genkeymap ./km-00000409.toml
Note: You need to have enough rights to be able to write to the
/etc/xrdp directory.
Alternatively, create the keymap file in a directory of your choice, then
copy or move it over to /etc/xrdp using sudo/su.
4) Copy the generated file to /etc/xrdp/
Using the X server of your current session may not be a good idea, as
session and window managers can interfere with key bindings. A good option
is to use an 'Xvfb' dummy X server to do this.
See also the dump_keymaps.sh script which auto-generates many keymap
files for the xrdp distribution. Consider adding your keyboard into this
list.
Getting a file added to xrdp
----------------------------
The file dump-keymaps.sh in this directory is used to auto-generate
all keymap files. It runs on Linux currently, but will generate
keymap files suitable for any xrdp platform.
1) Add a line towards the end of this file which causes your mapping to
be generated. Use the other lines in this file as a guide.
2) Run the dump-keymaps.sh script to generate a new file in
instfiles/
3) Add your mapping to the list in instfiless/Makefile.am
4) Submit a pull request to the project containing the above three
changes.