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

Keyboard shotcut Z/Y swapped on Gemini QWERTZ keyboard #3529

Open
jirikeller opened this issue Jul 26, 2018 · 2 comments
Open

Keyboard shotcut Z/Y swapped on Gemini QWERTZ keyboard #3529

jirikeller opened this issue Jul 26, 2018 · 2 comments

Comments

@jirikeller
Copy link

@jirikeller jirikeller commented Jul 26, 2018

In text editing, QWERTZ keyboard works fine, however keyboard shortcuts Y and Z are swaped.

Expected behavior

If I press "z" button (on QW... row) a read flag should be toggled
If I press "y" button (on YXC.. row) a "copy message" function should be evoked

Actual behavior

If I press "z" button (on QW... row) a "copy message" function is evoked
If I press "y" button (on YXC.. row) a read flag is toggled

Steps to reproduce

  1. Switch to QWERTZ keyboard (Czech, German, ...)
  2. press the Z and Y keys

Environment

K-9 Mail version: 5.403 (from F-droid)
Android version: 7.1.1
Account type (IMAP, POP3, WebDAV/Exchange): IMAP, but irrelevant

@cketti cketti added the bug label Mar 8, 2019
@cketti
Copy link
Member

@cketti cketti commented Oct 6, 2020

We should probably map the key code to a character before checking which action to trigger. Looks like KeyCharacterMap can be used for this.

The keyboard shortcut handling code lives in MessageList.onCustomKeyDown().

public boolean onCustomKeyDown(final int keyCode, final KeyEvent event) {

@gbentz
Copy link

@gbentz gbentz commented Jun 17, 2021

I have experimented with a Unihertz Titan running Android 10.

I augmented the MessageList.onCustomKeyDown() method as suggested to use the KeyEvent.getKeyCharacterMap() and then the KeyCharacterMap.get() method to retrieve the unicode character for the keyCode.
I find that regardless of which keyboard language is active, the keyCode maps to the QWERTY layout unicode character.

It am wondering if the InputMethodService performs the correct mapping only when a text input field is active.
The MessageList has no active text input field, so perhaps there is no localized handling of keyCode values being performed.

This is just a guess, and I would be happy to investigate further if other suggestions are available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants