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

Tic80 integrated editor not fully usable with Neo keyboard layout #1761

Open
dvdkhlng opened this issue Dec 22, 2021 · 4 comments
Open

Tic80 integrated editor not fully usable with Neo keyboard layout #1761

dvdkhlng opened this issue Dec 22, 2021 · 4 comments
Labels
input: keyboard Issues with keyboard controls platform: linux For issues affecting TIC80 on Linux

Comments

@dvdkhlng
Copy link

Hi,

for German keyboards there exists an ergonomically optimized keyboard layout called Neo [1]. It's something like Dvorak but optimized for german language and programming. E.g. on X-Windows you can activate it via

setxkbmap de neo

Neo defines additional shift-keys named Mod3 and Mod4 to make special characters and command keys more reachable from the home row. Unfortunately keys on "Layer 4" do not seem to work in the Tic-80 editor. E.g. pressing Right_Alt+W should produce a Backpace, but for some reason that does not work in Tic-80.

xev shows the following event sequence for the Neo version of Backspace:

KeyPress event, serial 38, synthetic NO, window 0x4a00001,
    root 0x22f, subw 0x0, time 22043892, (79,64), root:(84,262),
    state 0x0, keycode 108 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 94
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 38, synthetic NO, window 0x4a00001,
    root 0x22f, subw 0x0, time 22045139, (79,64), root:(84,262),
    state 0x20, keycode 25 (keysym 0xff08, BackSpace), same_screen YES,
    XKeysymToKeycode returns keycode: 22
    XLookupString gives 1 bytes: (08) "
    XmbLookupString gives 1 bytes: (08) "
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x4a00001,
    root 0x22f, subw 0x0, time 22045628, (79,64), root:(84,262),
    state 0x20, keycode 25 (keysym 0xff08, BackSpace), same_screen YES,
    XKeysymToKeycode returns keycode: 22
    XLookupString gives 1 bytes: (08) "
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x4a00001,
    root 0x22f, subw 0x0, time 22046346, (79,64), root:(84,262),
    state 0x20, keycode 108 (keysym 0xfe13, ISO_Level5_Lock), same_screen YES,
    XKeysymToKeycode returns keycode: 23
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Testing this now on version 0.90.1723 Pro (9c38a80) (tic80-v0.90-linux-pro.zip), and all the Neo keys that need Mod4 (ISO_Level5_Shift) seem to be fully ignored by Tic80.

cheers,

David

[1] https://neo-layout.org/

@dvdkhlng
Copy link
Author

Oh well...

tic-80 seems to use libsdl2. And running the libsdl2 event tester here [2] produces the following output for Neo backspace:

SDL_KEYDOWN: Keycode:  (1073741824) Scancode: Right Alt (230)
SDL_KEYDOWN: Keycode: V (118) Scancode: W (26)
SDL_KEYUP: Keycode: V (118) Scancode: W (26)
SDL_KEYUP: Keycode:  (1073741824) Scancode: Right Alt (230)

This seems to indicate a rather non-trivial problem WRT how libsdl2 maps X-windows keyboard events, which maybe cannot be worked around from inside tic-80...

[2] https://gist.github.com/DanielGibson/12041b57a540cbbfbaf9

@joshgoebel
Copy link
Collaborator

Yeah, TIC-80 seems to be getting RAW keyboard input, not remapped... so it seems Right_Alt+W, which means nothing.

@joshgoebel joshgoebel added input: keyboard Issues with keyboard controls platform: linux For issues affecting TIC80 on Linux labels Jan 8, 2022
@MartiniMoe
Copy link

Any news on this? Really struggling with it :/

@Skeptim
Copy link
Contributor

Skeptim commented May 9, 2024

Related to #2520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
input: keyboard Issues with keyboard controls platform: linux For issues affecting TIC80 on Linux
Projects
None yet
Development

No branches or pull requests

4 participants