Hide Forgot
Description of problem: Loadkeys doesn't work. Version-Release number of selected component (if applicable): rpm -qi kbd Name : kbd Version : 2.0.3 Release : 3.fc24 Architecture: x86_64 How reproducible: No matter which keyboad layout I try to load with loadkeys it always prints errors. If I do `loadkeys en` it prints: "cannot open file en" (This is a command that usually works across all distros in my experience) On `loadkeys de` it prints: unknown keysym 'trademark' unknown keysym 'trademark' unknown keysym 'trademark' unknown keysym 'trademark' unknown keysym 'trademark' unknown keysym 'trademark' unknown keysym 'trademark' unknown keysym 'trademark' lk_add_key called with bad keycode -1 Additional info: I tried this within a plasma 5.6 session in a konsole terminal. The problem isn't that I can't set my keyboard layout, (I can do that from KDE settings/Gnome settings etc.), but that I can't switch between layouts for testing purposes etc. in a single console window. I also tested it in a fluxbox session with xterm (in a freshly installed VM), same results. Kind regards
(In reply to dertobi from comment #0) > > I tried this within a plasma 5.6 session in a konsole terminal. > The problem isn't that I can't set my keyboard layout, (I can > do that from KDE settings/Gnome settings etc.), but that > I can't switch between layouts for testing purposes etc. in > a single console window. > > I also tested it in a fluxbox session with xterm (in a freshly > installed VM), same results. > loadkeys is not the right tool for changing keyboard layout in graphics mode (X server). It works and should work only in text console (ctrl+alt+FX). The errors you get are expected. You probably want to use setxkbmap?
I suspected that. I think this isn't exactly user friendly. Wouldn't it make sense to ship a small wrapper for loadkeys that detects it is running in an X session and just calls setxkbmap? Kind regards