Web emulator has incorrect keymapping in Google Chrome

This is the starting place for reporting bugs to the team. We will pass bug reports on to the developers after validating the reports.

You can report bugs in hardware, operating system (KERNAL or BASIC ROMs), the emulator, or the Demo library. For bugs specific to downloaded programs, use the download forum.
Post Reply
Java Cake Games
Posts: 12
Joined: Tue Oct 18, 2022 4:05 pm

Web emulator has incorrect keymapping in Google Chrome

Post by Java Cake Games »

Only tested in Ubuntu MATE and Chrome OS.

Reproduction steps:
  1. Set your operating system's keyboard layout to English (UK).
  2. Certain keys produce unexpected characters (apostrophe -> left arrow, hash -> backtick, etc.)
  3. Execute KEYMAP "EN-GB"
  4. The keys will still be wrong.
Alternative reproduction steps:
  1. Set your operating system's keyboard layout to German.
  2. Certain keys produce unexpected characters (ß -> left square bracket, ü -> semicolon, etc.)
  3. Execute KEYMAP "DE-DE"
  4. Certain keys will be wrong (Y and Z swapped) and some do nothing at all!
I think most layouts are screwed up, which is unfortunate since the web emulator would be pretty good if typing worked correctly.
DragWx
Posts: 315
Joined: Tue Mar 07, 2023 9:07 pm

Re: Web emulator has incorrect keymapping in Google Chrome

Post by DragWx »

It looks like it's a bug with SDL on emscripten, which has since been fixed, so maybe the web emulator just needs to be recompiled with the most recent version of SDL?
User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

Re: Web emulator has incorrect keymapping in Google Chrome

Post by Cyber »

DragWx wrote: Wed Mar 22, 2023 10:04 pm It looks like it's a bug with SDL on emscripten, which has since been fixed, so maybe the web emulator just needs to be recompiled with the most recent version of SDL?
Probably you are right, but we try to stick with known emulator releases.
Currently web emulator is based on this release: https://github.com/X16Community/x16-emu ... es/tag/r42
And probably this release is compiled with older version of SDL.
I think it is fair to wait for the next emulator release which will include newer version of SDL.
grml
Posts: 60
Joined: Sat Aug 13, 2022 8:31 pm

Re: Web emulator has incorrect keymapping in Google Chrome

Post by grml »

In your webassembly/main.js you have a list of keyboard layouts:

Code: Select all

//define valid layouts (this can be gotten by running the emulator with -keymap)
const layouts = [
    'en-us',
    'en-gb',
    'de',
    'nordic',
    'it',
    'pl',
    'hu',
    'es',
    'fr',
    'de-ch',
    'fr-be',
    'pt-br'
];
This is from an older emulator version. Here's the emulator's current list: https://github.com/X16Community/x16-emu ... main.c#L54
MooingLemur
Posts: 32
Joined: Sat Feb 19, 2022 4:44 pm

Re: Web emulator has incorrect keymapping in Google Chrome

Post by MooingLemur »

This has been updated in the source but unfortunately it was after R42 was released. The this should be fixed on the web once we release R43.
Post Reply