Bug 1208725 - loadkeys cannot load keymap due to unknown keysym
Summary: loadkeys cannot load keymap due to unknown keysym
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Simon Lees
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-27 20:49 UTC by Michal Suchanek
Modified: 2023-11-27 18:21 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Suchanek 2023-02-27 20:49:19 UTC
kbd version: 2.4.0 and 2.5.1 (x86)

 # loadkeys cz
unknown keysym 'Omega'
unknown keysym 'Omega'
unknown keysym 'Omega'
unknown keysym 'Omega'
unknown keysym 'omega'
unknown keysym 'omega'
unknown keysym 'omega'
unknown keysym 'omega'
lk_add_key called with bad keycode -1
 # loadkeys de
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
 # loadkeys us
<no error>
Comment 1 Michal Suchanek 2023-02-27 20:52:46 UTC
This works while logged in on the console but one when running X. Not sure it's really a problem but the error message is not exactly great.
Comment 2 Michal Suchanek 2023-02-28 09:51:20 UTC
loadkeys requires the -u option when operating on /dev/tty0 (which is the default console device used when stdin is not a console) but on /dev/tty1 it's the default.

Can /dev/tty0 by also switched to unicode?

kbd_mode -fu /dev/tty0

does it but I do not see where that happens for tty1
Comment 3 Simon Lees 2023-03-20 07:11:35 UTC
I'll take a look
Comment 4 Michal Suchanek 2023-03-20 10:35:37 UTC
SDL does

kbd->console_fd = open("/dev/tty", O_RDONLY | O_CLOEXEC);
ioctl(kbd->console_fd, KDSKBMODE, K_OFF);

but that's different device from /dev/tty0

And 

kbd_mode -fu /dev/tty0 

seems to undo it.
Comment 5 Zaoliang Luo 2023-06-30 06:00:16 UTC
after kbd_mode -fu /dev/tty0 keyloads works as normal, at least on my RPi4 Tumbelweed.
Comment 6 Michal Suchanek 2023-11-27 18:21:11 UTC
SDL has been updated, need to look what they do in current git.