Skip to content
Yauhen Kharuzhy edited this page Feb 1, 2026 · 2 revisions

Your standard layout [104/105 keys] should automatically be symlinked in /etc/touch_keyboard/layout.csv. You can modify this file which will override the original files YB1-X9x-pc104.csv or YB1-X9x-pc105.csv located in the "/etc/touch_keyboard/layouts/" folder or delete the symlink file (/etc/touch_keyboard/layout.csv) and create a custom layout.csv

To create a custom keyboard layout, copy the YB1-X9x-pc104.csv or YB1-X9x-pc105.csv file and save it as layout.csv in /etc/touch_keyboard/ It should be like this: /etc/touch_keyboard/layout.csv. (You could also copy and rename your YB1-X9x-pc104.csv or YB1-X9x-pc105.csv and symlink to /etc/touch_keyboard/layout.csv.)

To make editing easier, you can use any electronic spreadsheet application like LibreOffice Calc.

One can simply look up the relevant keysym (name of the key) and keycode (number of the key) in the Kernel-Source-File to be found at: https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h

Here is a quick example using the YB1-X9x-pc105.csv layout file. The YB1-X9x-pc104.csv / YB1-X9x-pc105.csv file tells us in the line 1:

y;height;x;width;name;code;name_fn;code_fn

we are only interested in "name / name_fn" and "code / code_fn" (y;height;x;width; are coordinates on the Keyboard where the key is located)

We want to make a "home" and a "end" key with the help of the "Fn" key. Look up the relevant keys in the input-event-codes.h.

The first key we want to make is the home, it is here: #define KEY_HOME 102.

In order to add this we would use the name without KEY_ and we use the number. For this example we add this key to the "Left" key but only while the "Fn" key is pressed. We adjust the layout.csv as follow, go to line 81 verify that it reads:

92,7;9,5;194,6;13;LEFT;105;;

now we will insert the name and the number so it should look like this:

92,7;9,5;194,6;13;LEFT;105;HOME;102

next we look up the "end" key which is #define KEY_END 107. Again, we use the name without the KEY_ part and use the number. We want to put it on the "right" key but only while "Fn" is pressed. Go to the line 83 verify it reads:

92,7;9,5;228,3;13;RIGHT;106;;

again we will insert the name and the number so it should look like this:

92,7;9,5;228,3;13;RIGHT;106;END;107

we could also change existing keys with this method but that wouldn't be very productive but here an example

making the "right" key the "left" key

92,7;9,5;228,3;13;LEFT;105;;

Actually you can create a new 'key' at any place outside of touchpad area, see layout-touchpad.csv for coordinates.

Don't forget to save your layout.csv as /etc/touch_keyboard/layout.csv.

After changing the file restart the service with systemctl restart touch-keyboard-handler.service or reboot your device.

Clone this wiki locally