Skip to content

fix(terminal): send AltGr characters instead of ESC-prefixing them - #13

Closed
andreas-byfut wants to merge 1 commit into
LordOfPolls:masterfrom
andreas-byfut:fix/altgr-input
Closed

andreas-byfut wants to merge 1 commit into
LordOfPolls:masterfrom
andreas-byfut:fix/altgr-input

Conversation

@andreas-byfut

Copy link
Copy Markdown
Contributor

On layouts with AltGr (for example German, where AltGr+Q gives @), Android reports Right Alt as
Alt. The hardware key handler therefore sent ESC plus the base character instead of the composed
one.

  • Right Alt sends the composed character when it changes the character.
  • Right Alt keeps ESC plus the base character where it composes nothing. Left Alt is unchanged.
  • Behaviour change: on layouts that define Alt mappings without being AltGr layouts, such as AOSP
    Generic (C and S map to ç and ß), Right Alt now sends those characters.
  • AltGr dead keys still fall back to ESC plus the base character.

The decision is the pure function altChordText, covered by AltChordTextTest.

On layouts with AltGr (e.g. German AltGr+Q = @), Android reports Right Alt
as Alt, so the hardware key handler sent ESC plus the unmodified base
character (ESC q) instead of the composed character.

Right Alt now sends the composed character as is when it changes the
character. Behaviour change: this also applies to Right Alt on layouts
without AltGr that still define Alt mappings, such as the AOSP Generic
layout (C and S map to ç and ß), which now send those characters instead
of ESC+letter. Right Alt keeps the ESC prefix where it composes nothing.
Left Alt is unchanged and always sends ESC+base character.

AltGr dead keys (no printable composed character) still fall back to
ESC+base, as before. The decision is a pure function, altChordText.
@LordOfPolls

Copy link
Copy Markdown
Owner

Believe this is superseeded by dev branch bec5b66

ref. #3

Please can you test the above to confirm works for you, in which case ill merge the dev branch change over in place of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants