oasislinux / oasis

a small statically-linked linux system
Other
2.78k stars 85 forks source link

Dvorak Does Not Exist On QEMU #93

Closed VehementHam closed 8 months ago

VehementHam commented 8 months ago

Reproduce

oasis$ export XKB_DEFAULT_LAYOUT=dvorak
oasis$ swc-launch velox

Issue

running on /dev/tty2
xkbcommon: ERROR: Couldn't find file "symbols/dvorak" in include paths
xkbcommon: ERROR: 1 include paths searched:
xkbcommon: ERROR:   /share/xkb
xkbcommon: ERROR: 3 include paths could not be added:
xkbcommon: ERROR:   /home/oasis/.config/xkb
xkbcommon: ERROR:   /home/oasis/.xkb
xkbcommon: ERROR:   /etc/xkb
xkbcommon: ERROR: Abandoning symbols file "(unnamed)"
xkbcommon: ERROR: Failed to compile xkb_symbols
xkbcommon: ERROR: Failed to compile keymap
ERROR: Could not create XKB keymap
ERROR: Could not initialize keyboard
ERROR: Could not initialize seat
michaelforney commented 8 months ago

In XKB, Dvorak is a variant, not a layout.

export XKB_DEFAULT_LAYOUT=us XKB_DEFAULT_VARIANT=dvorak
swc-launch velox
VehementHam commented 8 months ago

Thanks.

VehementHam commented 8 months ago

After running export XKB_DEFAULT_VARIANT=dvorak in the shell, followed by swc-launch velox, the keybord layout does not change in velox. How do I chage the keybord layout in velox?

apprehensions commented 8 months ago

Did you do export XKB_DEFAULT_LAYOUT=us XKB_DEFAULT_VARIANT=dvorak?

VehementHam commented 8 months ago

Yes, I tried that too.

michaelforney commented 8 months ago

I'm sorry you're having trouble, but I can assure you that it does work. I type in dvorak as well. My guess is you have a typo somewhere. As @apprehensions said, you need to set both XKB_DEFAULT_LAYOUT=us (or whatever's appropriate for your country/language) and XKB_DEFAULT_VARIANT=dvorak. Setting just XKB_DEFAULT_VARIANT=dvorak won't work.

See the code: https://github.com/xkbcommon/libxkbcommon/blob/43c9752d441702011500e562c8bbc41ec0254772/src/context-priv.c#L151-L154

VehementHam commented 8 months ago

Your right, it was a typo. I only noticed after the third check. I'm gonna drink some water now.