TIC-80
TIC-80 copied to clipboard
Keyboard problem on Linux
On my linux laptop (archlinux + wayland + kde + azerty keyboard layout), some keyboard keys don't work as expected when TIC-80 is running :
- Escape and Fx keys are inactives : I can't for example switch to editor after loading a cartridge
- Enter key validate commands but alternate to full screen or windowed screen at the same time so using the tools is just impossible
Theses situations are reproducible with numerous versions of TIC-80 (0.90.1524-dev right now).
Hmm, something is strange on this one....
- Run
bin/tic80 wrendemo.tic - Press F1, and see that you're unable to edit the cart
- Press escape, and you're able to visit the menu
- Close game
- No
editcommand load tetris.tic- Press F1, and see that you're able to switch to the code editor
@eelars Can you follow Rob's suggestions and provide any additional information here?
I have a similar problem here on Archlinux, X11 with a german keyboard layout.
In my case I cannot enter the + character the normal way, but only in the code editor. It works on the command line.
I think my problem is caused by the code in studio/studio.c in the getKeyboardText() function.
There are 2 arrays defined, a Symbols array and a Shift array. The shift array contains the + character, but
on a German keyboard you do not need the shift key to enter a + character.
I can somehow workaround the problem by pressing CTRL +.
But I did not look to much into the code so I am not sure why this works.
Additionally I noticed that the workaround by pressing CTRL does not work in VI input mode.
So maybe there is a general problem with different keyboard layouts.