ImaneSk / apps-for-android

Automatically exported from code.google.com/p/apps-for-android
Apache License 2.0
0 stars 0 forks source link

[GlobalTime] Cannot toggle lights #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
[Reported against r13 running on beta 0.9 emulator]

Pressing L to toggle the lights display doesn't work.

Cause is the following code in the GlobalTime.onKeyDown method:

        // If we're not in alphabetical entry mode, convert letters
        // to their digit equivalents
        if (!mAlphaKeySet) {
            char numChar = event.getNumber();
            if (numChar >= '0' && numChar <= '9') {
                keyCode = KeyEvent.KEYCODE_0 + (numChar - '0');
            }
        }

After this code has executed, KEYCODE_L has been remapped to KEYCODE_5.

Note that event.getNumber() returns '5' for 'L' because the JKL key on the
touch pad bears the numeral 5.

KEYCODE_W and most other alpha keys are also broken by this code.

Original issue reported on code.google.com by joe.bowb...@gmail.com on 29 Aug 2008 at 12:04

GoogleCodeExporter commented 8 years ago

Original comment by morri...@gmail.com on 13 Nov 2008 at 10:11

GoogleCodeExporter commented 8 years ago

Original comment by morri...@gmail.com on 13 Nov 2008 at 10:17