Opened 3 years ago

Last modified 15 months ago

#1460 reopened bug

Non-English keyboard layouts have problems for commonly-used commands on SDL and OS X

Reported by: takkaria Owned by: takkaria
Milestone: Future Keywords: InputRework sdl mac
Cc:

Description (last modified by takkaria)

See e..g

I think this is because the frontend code is assuming stuff about keyboard layouts that it shouldn't but I'm not sure how.

Change History (14)

comment:1 Changed 3 years ago by takkaria

  • Description modified (diff)
  • Summary changed from Non-English keyboard layouts have problems for commonly-used commands to Non-English keyboard layouts have problems for commonly-used commands on SDL and OS X

comment:2 Changed 3 years ago by magnate

  • Milestone changed from 3.3.0 to 3.4.0

Postponing to 3.4 per IRC

comment:4 Changed 3 years ago by magnate

  • Status changed from new to confirmed

comment:5 Changed 3 years ago by PowerWyrm

Finally sorted this out. The "cannot suicide", "cannot perform inscribe" and "'@' acts as '0@'" are all the same problem, related to this code (see main-sdl, probably in other main-xxx too):

/* have these to get consistent ctrl-shift behaviour */
case SDLK_0: if (!ms || mc || ma) ch = '0'; break;
case SDLK_1: if (!ms || mc || ma) ch = '1'; break;
...

The same code was present in main-win for 3.3.x, it's not there in 3.4 so I suppose the problem got fixed along the way.

comment:6 Changed 3 years ago by magnate

  • Status changed from confirmed to pending

A link to a fix on github is in the first post of http://angband.oook.cz/forum/showthread.php?t=5219

comment:7 Changed 3 years ago by magnate

Er, that fix isn't actually intended for global consumption (being specific to German keyboards as noted in the thread). Instead there's a possible solution in http://angband.oook.cz/forum/showthread.php?t=5233 - thanks again to Tobias.

comment:8 Changed 2 years ago by PowerWyrm

Unfortunately this doesn't work for me (french AZERTY keyboard). Alt-Gr is interpreted by SDL as KMOD_RALT | KMOD_LCTRL and not KMOD_MODE.

comment:9 Changed 2 years ago by magnate

  • Resolution set to fixed (in master)
  • Status changed from pending to closed

Fixed by takkaria, now in both master and v4-master.

comment:10 Changed 2 years ago by takkaria

  • Description modified (diff)
  • Milestone changed from 3.4.0 to Future
  • Resolution fixed (in master) deleted
  • Status changed from closed to reopened

This doesn't work for PowerWyrm? so re-opening.

comment:11 Changed 2 years ago by PowerWyrm

Another related problem on SDL: with an AZERTY keyboard, keys '0' (0x30) to '9' (0x39) are accessed using SHIFT + key; with the current code, these keys are not processed because MODS_INCLUDE_SHIFT() in ui-event.h reports them as requiring SHIFT. To fix that, MODS_INCLUDE_SHIFT() should include range 0x30 to 0x39:

#define MODS_INCLUDE_SHIFT(v) \
    (((((v) >= 0x21) && ((v) <= 0x60)) || \
        (((v) >= 0x7B) && ((v) <= 0x7E)))? FALSE: TRUE)

comment:12 Changed 2 years ago by myshkin

  • Keywords sdl mac added

comment:13 Changed 18 months ago by takkaria

  • Milestone changed from Future to 3.5.0

Assigning still-open bugs from Future to 3.5 for fixing.

comment:14 Changed 15 months ago by takkaria

This has been partially worked around on OS X; we need a similar thing for SDL now. See #880.

Note: See TracTickets for help on using tickets.