loadkeys make permanent

Here you can discuss every aspect of Debian. Note: not for support requests!

loadkeys make permanent

Postby k829king » 2019-08-12 18:40

In a non X Deb9 unit I have a mapping file that I load with loadkeys to remap a couple of keys during boot. I would like to make this change permanent. Where are the default keymaps held in Deb9 and would it be possible to save the modified (after loadkeys run) keymap with a unique name and set the unit to default to that on boot? To allow loadkeys to run for normal user I've had to mess with permissions, which would like to avoid.
K.
k829king
 
Posts: 17
Joined: 2018-08-26 09:47

Re: loadkeys make permanent

Postby L_V » 2019-08-12 19:04

You should investigate this
Code: Select all
 dpkg-reconfigure locales console-data  keyboard-configuration
L_V
 
Posts: 1170
Joined: 2007-03-19 09:04

Re: loadkeys make permanent

Postby k829king » 2019-08-13 18:04

that seems to be about predefined locales and keyboards?
If there is doco about how to clone existing one apply loadkeys mapping and save as new name ...
k829king
 
Posts: 17
Joined: 2018-08-26 09:47

Re: loadkeys make permanent

Postby L_V » 2019-08-13 18:11

If the keyboard is correctly configured, why do you still need loadkeys ?

Code: Select all
find /usr/share/keymaps/ -type f

Or if you need a really so specific custom key mapping, you can place your loadkeys command in /etc/rc.local and enable the systemd service

Code: Select all
#!/bin/sh -e
#
loadkeys my_specific_keymap

Code: Select all
systemctl enable rc-local.service
L_V
 
Posts: 1170
Joined: 2007-03-19 09:04

Re: loadkeys make permanent

Postby k829king » 2019-08-14 18:14

why - because I want Shift+Tab to be recognised (when no X is in use)
the following works when loaded via loadkeys but I had to change permissions to allow user to run the loadkeys.
string F91 = "\033[Z"
string F92 = "\033\033[Z"
keycode 15 = Tab F91
alt keycode 15 = Meta_Tab
shift alt keycode 15 = F92

- - -
there doesn't appear to be an /etc/rc.local in vanilla Deb9 ?
- - -
the format of /usr/share/keymaps/ seems different to what I see in dumpkeys so not sure if I can apply the above directly to one there.
k829king
 
Posts: 17
Joined: 2018-08-26 09:47

Re: loadkeys make permanent

Postby L_V » 2019-08-14 18:20

k829king wrote: there doesn't appear to be an /etc/rc.local in vanilla Deb9 ?
No because not needed and disabled by default in systemd.
Then create it +
Code: Select all
chmod +x /etc/rc.local

or if only for root user, then /root/.bashrc could be used.
L_V
 
Posts: 1170
Joined: 2007-03-19 09:04

Re: loadkeys make permanent [SOLVED]

Postby k829king » 2019-08-22 15:32

thankyou that sorted it (and no not for root)
k829king
 
Posts: 17
Joined: 2018-08-26 09:47


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable