Skip to content
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

Unknown keysym 'endash' in fr-bepo #75

Closed
Artefact2 opened this issue Apr 9, 2022 · 5 comments
Closed

Unknown keysym 'endash' in fr-bepo #75

Artefact2 opened this issue Apr 9, 2022 · 5 comments

Comments

@Artefact2
Copy link

I am running Arch Linux with kbd 2.4.0.

Trying to load fr-bepo.map with loadkeys prints the following error message.

unknown keysym 'endash'
lk_add_key called with bad keycode -1

The key map still gets applied, but because the return code is 1, this makes some parts of the early boot process (everything that depends on systemd-vconsole-setup.service) fail.

The symbol is in the map file as a U+xxxx sequence, and it seems that they all fail to load.

@legionus
Copy link
Owner

@Artefact2 endash is not used in any keymap in kbd. I just tried to load the fr-bepo.map and didn't get any errors.

Please attach the fr-bepo.map you are using. It looks like this keymap has been modified or some other add-on is trying to load along with this keymap.

@Artefact2
Copy link
Author

Hi @legionus and thanks for the reply.

My fr-bepo.map is the same as yours, I get the same error regardless:

Silmeria ~/Downloads % wget "https://raw.githubusercontent.com/legionus/kbd/c6c694147e1c04a1e2e7cc61ea0e5e6ec9fbce6b/data/keymaps/i386/bepo/fr-bepo.map"
2022-04-11 13:41:11 (27.0 MB/s) - ‘fr-bepo.map’ saved [7774/7774]
Silmeria ~/Downloads % sudo loadkeys ./fr-bepo.map 
unknown keysym 'endash'
lk_add_key called with bad keycode -1

@legionus
Copy link
Owner

Try to search the endash in the your /usr/share/kbd (I hope I found the correct source package in archlinux).

@Artefact2
Copy link
Author

Trying to investigate the issue further. The issue happens while trying to parse U+2013 (endash), the first UNUMBER listed in the fr-bepo map. It gets converted to endash in convert_code() but then fails to convert back when calling ksymtocode(). Because the direction is TO_8BIT, the cp1250 charset (that contains endash) is not scanned.

(gdb) break ksyms.c:370
Breakpoint 1 at 0x555555571004: file ksyms.c, line 370.
(gdb) run /usr/share/kbd/keymaps/i386/bepo/fr-bepo.map.gz 
Starting program: /home/romain/Downloads/kbd/trunk/src/kbd/src/loadkeys /usr/share/kbd/keymaps/i386/bepo/fr-bepo.map.gz
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Detaching after vfork from child process 178622]

Breakpoint 1, ksymtocode (ctx=ctx@entry=0x55555558cbd0, s=0x55555557a210 "endash", direction=direction@entry=0x0) at ksyms.c:370
370             ERR(ctx, _("unknown keysym '%s'"), s);
(gdb) bt
#0  ksymtocode (ctx=ctx@entry=0x55555558cbd0, s=0x55555557a210 "endash", direction=direction@entry=0x0) at ksyms.c:370
#1  0x0000555555571115 in convert_code (ctx=ctx@entry=0x55555558cbd0, code=0xd013, direction=0x0, direction@entry=0xffffffff) at ksyms.c:409
#2  0x000055555556dc30 in yyparse (scanner=0x55555558d110, ctx=ctx@entry=0x55555558cbd0) at /home/romain/Downloads/kbd/trunk/src/kbd/src/libkeymap/parser.y:398
#3  0x000055555556e0ee in lk_parse_keymap (ctx=ctx@entry=0x55555558cbd0, fp=fp@entry=0x55555558e5a0) at /home/romain/Downloads/kbd/trunk/src/kbd/src/libkeymap/parser.y:420
#4  0x0000555555567e1c in main (argc=<optimized out>, argv=0x7fffffffea98) at loadkeys.c:281
(gdb) 

@legionus
Copy link
Owner

legionus commented Oct 1, 2024

Let me know if this is still relevant.

@legionus legionus closed this as completed Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants