-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Also include other keyboard mappings to support non-US keyboards #1781
Also include other keyboard mappings to support non-US keyboards #1781
Conversation
…-US keyboard because without the right keyboard mapping it could become an awful annoyance to work in the recovery system.
@gdha @gozora @schabrolles |
In my case the keyboad mapping on the original system adding map 3 violates explicit keymaps line and I get a keyboard with a default (presumably US) layout On the original system I have a KEYMAP=de-latin1-nodeadkeys FONT=eurlatgr.psfu FONT_MAP=none FONT_UNIMAP= The unexpected thing is that in the recovery system # dumpkeys -f >/tmp/dumpkeys.out # loadkeys de-latin1-nodeadkeys # dumpkeys -f >/tmp/dumpkeys.de-latin1-nodeadkeys # diff -s /tmp/dumpkeys.out /tmp/dumpkeys.de-latin1-nodeadkeys Files /tmp/dumpkeys.out and /tmp/dumpkeys.de-latin1-nodeadkeys are identical # loadkeys /tmp/dumpkeys.out # loadkeys /tmp/dumpkeys.de-latin1-nodeadkeys so something subtle makes in the recovery system |
@jsmeix Perhaps it would be better we load all the keyboard keys like the plain Linux OS? Is lot of overhead but this way we have all keyboards. Just a though... |
It is the # dumpkeys -f1 >/tmp/dumpkeys.out2 # loadkeys /tmp/dumpkeys.out2 adding map 3 violates explicit keymaps line On none of my systems down to SLE10 a |
|
@gdha # du -hs /usr/share/kbd/keymaps 2.8M /usr/share/kbd/keymaps and I know that on POWER architecture the recovery system must be kept very small But I agree that it can be crucial that the recovery system supports any keyboad So - as always - the right way out is to introduce config variables |
@jsmeix honestly, my knowledge in this area is equal to 0 :-( V. |
@gozora |
An addedum to Interestingly on SLE10 things work with # dumpkeys -f1 >/tmp/dumpkeys.out # loadkeys /tmp/dumpkeys.out && echo OK Loading /tmp/dumpkeys.out OK but also with plain # dumpkeys -f >/tmp/dumpkeys.out # loadkeys /tmp/dumpkeys.out && echo OK Loading /tmp/dumpkeys.out OK and there is no # man dumpkeys ... SYNOPSIS dumpkeys [ -hilfn -ccharset --help --short-info --long-info --numeric --full-table --funcs-only --keys-only --compose-only --charset=charset ] ... -f --full-table This makes dumpkeys skip all the short-hand heuristics (see keymaps(5)) and output the key bindings in the canonical form. First a keymaps line describing the currently defined modifier combinations is printed. Then for each key a row with a column for each modifier combination is printed. For example, if the current keymap in use uses seven modifiers, every row will have seven action code columns. This format can be useful for example to programs that post-pro‐ cess the output of dumpkeys. # dumpkeys -h dumpkeys version 1.12 ... -f --full-table don't use short-hand notations, one row per keycode so that I will use plain |
…plus new config var
Since Now there are the new (but intentionally not yet documented) config variables KEYMAPS_DEFAULT_DIRECTORY which specifies the default directory for keymaps KEYMAPS_DIRECTORIES which is a string of keymap directories that should KEYMAP which is a keymap file for e.g. what I used in local.conf KEYMAPS_DEFAULT_DIRECTORY="" KEYMAPS_DIRECTORIES="/usr/share/kbd/keymaps/legacy" KEYMAP="de-latin1-nodeadkeys" |
@gdha @schabrolles I think with the new KEYMAP* config variables there cannot be |
With |
@gdha @schabrolles @gozora On my SUSE systems I have in FILES /usr/share/kbd/keymaps default directory for keymaps which is actually true because I get things like # rpm -qa | grep -i kbd kbd-... kbd-legacy-... # rpm -ql kbd kbd-legacy | grep de-latin1 /usr/share/kbd/keymaps/legacy/i386/qwertz/de-latin1-nodeadkeys.map.gz /usr/share/kbd/keymaps/legacy/i386/qwertz/de-latin1.map.gz /usr/share/kbd/keymaps/legacy/mac/all/mac-de-latin1-nodeadkeys.map.gz /usr/share/kbd/keymaps/legacy/mac/all/mac-de-latin1.map.gz /usr/share/kbd/keymaps/legacy/sun/sunt5-de-latin1.map.gz I would like to know how those things look on non-SUSE systems. |
Hello @jsmeix,
Hope it helps. V. |
@gozora ... too quick for me ;-) |
Btw, to check whether defaults in man page are really used by loadkeys binary, V. |
@gozora |
@schabrolles @gdha |
Regarding This time @gozora won even with a lot of text! |
RHEL 6/7 are like CentOS/Fedora ones ... but I don't have anything into
|
@schabrolles |
FYI related to #1781 (comment) I found out how one can determine what keymap files plus include files In my case for # for f in $( strace -f -e open loadkeys de-latin1-nodeadkeys 2>&1 | grep '/usr/share/kbd/keymaps/legacy/' | grep -v 'O_DIRECTORY' | grep -o 'open.*,' | cut -d '"' -f2 ) ; do readlink -e $f ; done /usr/share/kbd/keymaps/legacy/i386/qwertz/de-latin1-nodeadkeys.map.gz /usr/share/kbd/keymaps/legacy/i386/qwertz/de-latin1.map.gz /usr/share/kbd/keymaps/legacy/i386/include/qwertz-layout.inc /usr/share/kbd/keymaps/legacy/i386/include/compose.inc /usr/share/kbd/keymaps/legacy/i386/include/linux-with-alt-and-altgr.inc /usr/share/kbd/keymaps/legacy/i386/include/linux-keys-bare.inc /usr/share/kbd/keymaps/legacy/i386/include/euro2.map.gz /usr/share/kbd/keymaps/legacy/include/compose.latin1 Simplifying that command is left as an exercise to the reader ;-) Accordingly with KEYMAPS_DEFAULT_DIRECTORY="/usr/share/kbd/keymaps" KEYMAPS_DIRECTORIES="/usr/share/kbd/keymaps/legacy/i386/qwertz/de-latin1-nodeadkeys.map.gz /usr/share/kbd/keymaps/legacy/i386/qwertz/de-latin1.map.gz /usr/share/kbd/keymaps/legacy/i386/include/qwertz-layout.inc /usr/share/kbd/keymaps/legacy/i386/include/compose.inc /usr/share/kbd/keymaps/legacy/i386/include/linux-with-alt-and-altgr.inc /usr/share/kbd/keymaps/legacy/i386/include/linux-keys-bare.inc /usr/share/kbd/keymaps/legacy/i386/include/euro2.map.gz /usr/share/kbd/keymaps/legacy/include/compose.latin1" KEYMAP="de-latin1-nodeadkeys" (one can as well specify plain files as KEYMAPS_DIRECTORIES values) # find /tmp/rear.owdPbH9RbpT2GqN/rootfs/ | grep keymaps /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/include /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/include/compose.latin1 /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386 /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/include /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/include/qwertz-layout.inc /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/include/linux-keys-bare.inc /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/include/linux-with-alt-and-altgr.inc /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/include/compose.inc /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/include/euro2.map.gz /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/qwertz /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/qwertz/de-latin1-nodeadkeys.map.gz /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/qwertz/de-latin1.map.gz /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/qwerty /tmp/rear.owdPbH9RbpT2GqN/rootfs/usr/share/kbd/keymaps/legacy/i386/qwerty/defkeymap.map.gz (defkeymap.map.gz gets added in any case by 500_clone_keyboard_mappings.sh) |
…system (e.g. needed on ppc64 with the yaboot bootloader)
…efault directories for keymaps which also simplified the code that finds the defkeymap keymap file
My "latest greatest" current code here works so well for me |
…scription_follow-up_of_pull_request_1781 Fix KEYMAPS_DEFAULT_DIRECTORY description in default.conf (follow-up of pull request #1781).
Also include other keyboard mappings to also support users with a non-US keyboard
because without the right keyboard mapping it could become an awful annoyance
to work in the recovery system.
Type: Bug Fix and Enhancement
Actually this provides a workaround when in
etc/scripts/system-setup.d/10-console-setup.sh
the
loadkeys /etc/dumpkeys.out
fails.Impact: Low and High
For US-keyboard users the impact is at most low,
for non-US-keyboard users the impact could be even critical.
How was this pull request tested?
It works for me on a SUSE system.
I don't know where on other systems the other keyboard mapping files are stored.
But it is now at least a starting point that can be easily enhanced for other systems.
Brief description of the changes in this pull request:
By default the current keyboard mapping is dumped to etc/dumpkeys.out
so that it can be set during recovery system startup by
etc/scripts/system-setup.d/10-console-setup.sh
via
loadkeys /etc/dumpkeys.out
.But depending on the keyboard mapping
the
loadkeys /etc/dumpkeys.out
commandmay not work in the recovery system
so that some other keyboard mapping files
are also included so that the user can manually set
his keyboard mapping (e.g. via a command like
loadkeys de-latin1
).This increases the recovery system size by about 1 MB
(an usual recovery system size is about 500 MB uncompressed)
but without the right keyboard mapping it could be an awful annoyance
to work in the recovery system.