Talk:Linux console/Keyboard configuration
I didn't edit the wiki, but I found that rebooting was necessary after using the localectl-command to set-keymap dvorak. Ive been in need of this solution for a _long_ time and was disappointed until rebooting. —This unsigned comment is by Addeps3 (talk) 11:42, 18 March 2017. Please sign your posts with ~~~~!
- That's the obvious difference between a persistent and temporary configuration as the section titles indicate. -- Lahwaacz (talk) 12:39, 18 March 2017 (UTC)
- Can you add any context?
KEYMAP_TOGGLEisn't mentioned in the article. -- Alad (talk) 14:39, 10 March 2016 (UTC)
- Yes, in my old system, I saw the following.
- Yes, systemd's
vconsole.conffile supports a
KEYMAP_TOGGLEvariable, but it's completely undocumented and I guess nobody really knows what is the expected result. If you look at the source code, the
KEYMAP_TOGGLEvalue is simply added to the argument list passed to loadkeys, but its documentation is just as lacking. There even isn't any definition of which combination of keys should be used for switching the layouts. Some keymaps seem to have a secondary layout built in (e.g.
Pausekey for switching). This actually works, but loadkeys is used to load a single keymap. If somebody could explain this to me, that would be great. Until then, I think the best recommendation is to not use
KEYMAP_TOGGLEat all, not only for colemak. -- Lahwaacz (talk) 17:14, 10 March 2016 (UTC)
- Yes, systemd's
- So, is that combination of variables working in your "old" system? Maybe that's using an "old" init system that was actually supporting it somehow. Anyway I'm another Colemak typer, and in an up-to-date Arch system using
KEYMAP=colemakis enough, there's no need to set
KEYMAP_TOGGLE— Kynikos (talk) 07:38, 11 March 2016 (UTC)
does not list the keymap file in /usr/local/share/kbd/keymaps. Should one make a copy under /usr/share/ instead. Both are system and not user folder.
/usr/share/is not intended for custom files which are not provided by any package. -- Lahwaacz (talk) 13:50, 30 June 2019 (UTC)
localectl doesn't appear to change /etc/vconsole.conf
- “For convenience,
localectlmay be used to set console keymap. It will change the KEYMAP variable in
/etc/vconsole.confand also set the keymap for current session”
In my fresh Arch install, there is no
/etc/vconsole.conf. Creating it, even with content, and then running
# localectl set-keymap <some-keymap> doesn't affect the file at all. Can someone confirm/deny? Adrian5 (talk) 02:31, 12 March 2021 (UTC)
I believe it currently makes more sense to put the custom keymap in
/usr/share/kbd/keymaps/ rather than in
The main advantage is that sd-vconsole works with keymaps in
/usr/share/kbd/keymaps/, and automatically puts them in the initramfs. The sd-vconsole script, /usr/lib/initcpio/install/sd-vconsole, also automatically adds the dependencies.
Alternatively, if we use
/usr/local/share/kbd/keymaps/personal, we can add all required files using mkinitcpio BINARIES and FILES. But this is rather tedious, as if we include a common keymap such as us.map, we also have to include it's many dependencies. They currently are:
These might change over time as well, breaking the keymap. Breaking the keymap also breaks the font that's specified in /etc/vconsole.conf. Once my font broke in this way, and it was quite hard for me to find out it was caused by my keymap being broken due to putting it in
/usr/local/share/kbd/keymaps/personal and missing that file in initramfs.
I suggested allowing custom keymaps from other directories in https://bugs.archlinux.org/task/71788. Giancarlo Razzolini (Arch dev) is against this. We can of course add our custom initramfs hook script to remedy this situation, which I attached in that bug. But again this is a lot more complicated than simply putting the keymap in
/usr/share/kbd/keymaps/. Simonzack (talk) 09:35, 4 September 2021 (UTC)