Changeset 14282 in josm


Ignore:
Timestamp:
2018-09-30T01:54:13+02:00 (9 months ago)
Author:
Don-vip
Message:

see #16732 - more keyboard fixes

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/UndoRedoHandler.java

    r14281 r14282  
    264264    /**
    265265     * Determines if commands can be undone.
    266      * @return {14281 true} if at least a command can be undone
    267      * @since xxx
     266     * @return {@code true} if at least a command can be undone
     267     * @since 14281
    268268     */
    269269    public boolean hasUndoCommands() {
  • trunk/src/org/openstreetmap/josm/tools/KeyboardUtils.java

    r14279 r14282  
    205205                // https://en.wikipedia.org/wiki/German_keyboard_layout
    206206                result.add((char) KeyEvent.VK_DEAD_CIRCUMFLEX);
     207                result.add('ˆ'); // U+02C6 : dead/modifier circumflex
    207208                break;
    208209            case "cs": // Czech
     
    240241                // https://en.wikipedia.org/wiki/QWERTY#Estonian
    241242                result.add((char) KeyEvent.VK_DEAD_CARON); // https://en.wikipedia.org/wiki/Caron
     243                result.add('ˇ'); // U+02C7 : dead key/modifier
    242244                break;
    243245            case "is": // Icelandic
     
    302304            // Works also for Dvorak, https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard
    303305            result.add('`'); // U+0060: On US QWERTY, this is not a dead key
     306            result.add((char) KeyEvent.VK_DEAD_GRAVE);
    304307            result.add('ˋ'); // U+02CB: On International QWERTY, this is a dead key
    305308            return result;
  • trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java

    r14138 r14282  
    5757        char deadGrave = (char) KeyEvent.VK_DEAD_GRAVE;
    5858        char deadCaron = (char) KeyEvent.VK_DEAD_CARON;
    59         testgetCharactersForKeyE00("ar", 'ذ', '>', '`', deadGrave);
    60         testgetCharactersForKeyE00("fr_FR", '²', '$', '`', deadGrave);
    61         testgetCharactersForKeyE00("fr_CA", '#', '$', '/', '`', deadGrave);
    62         testgetCharactersForKeyE00("sq", '\\', '`', deadGrave);
    63         testgetCharactersForKeyE00("it", '\\', '`', deadGrave);
    64         testgetCharactersForKeyE00("pt", '\\', '`', deadGrave);
    65         testgetCharactersForKeyE00("pt_BR", '\'', '`', deadGrave);
    66         testgetCharactersForKeyE00("de", deadCircumflex, '`', deadGrave);
    67         testgetCharactersForKeyE00("cs", ';', '`', deadGrave);
    68         testgetCharactersForKeyE00("he", '`', deadGrave);
    69         testgetCharactersForKeyE00("hu", '0', '`', deadGrave);
    70         testgetCharactersForKeyE00("pl", '`', deadGrave);
    71         testgetCharactersForKeyE00("bs", '¸', '`', deadGrave);
    72         testgetCharactersForKeyE00("hr", '¸', '`', deadGrave);
    73         testgetCharactersForKeyE00("sl", '¸', '`', deadGrave);
    74         testgetCharactersForKeyE00("sr", '¸', '`', deadGrave);
    75         testgetCharactersForKeyE00("ro", ']', '`', deadGrave);
    76         testgetCharactersForKeyE00("da", '½', '`', deadGrave);
    77         testgetCharactersForKeyE00("fo", '½', '`', deadGrave);
    78         testgetCharactersForKeyE00("nl", '@', '`', deadGrave);
    79         testgetCharactersForKeyE00("et", deadCaron, '`', deadGrave);
    80         testgetCharactersForKeyE00("is", '°', '`', deadGrave);
    81         testgetCharactersForKeyE00("es", '|', '`', deadGrave);
    82         testgetCharactersForKeyE00("es_ES", 'º', '`', deadGrave);
    83         testgetCharactersForKeyE00("tr", '"', '*', '`', deadGrave);
    84         testgetCharactersForKeyE00("de_LU", deadCircumflex, '²', '§', '`', deadGrave);
    85         testgetCharactersForKeyE00("fr_LU", '$', '²', '§', '`', deadGrave);
    86         testgetCharactersForKeyE00("fr_CH", '²', '$', '§', '`', deadGrave);
    87         testgetCharactersForKeyE00("de_CH", deadCircumflex, '§', '`', deadGrave);
    88         testgetCharactersForKeyE00("de_LI", deadCircumflex, '§', '`', deadGrave);
    89         testgetCharactersForKeyE00("fi_FI", '§', '`', deadGrave);
    90         testgetCharactersForKeyE00("sv_SE", '§', '`', deadGrave);
    91         testgetCharactersForKeyE00("no_NO", '|', '`', deadGrave);
    92         testgetCharactersForKeyE00("sv_NO", '|', '`', deadGrave);
     59        char deadCircumflex2 = 0x2C6;
     60        char deadGrave2 = 0x2CB;
     61        char deadCaron2 = 0x2C7;
     62        testgetCharactersForKeyE00("ar", 'ذ', '>', '`', deadGrave, deadGrave2);
     63        testgetCharactersForKeyE00("fr_FR", '²', '$', '`', deadGrave, deadGrave2);
     64        testgetCharactersForKeyE00("fr_CA", '#', '$', '/', '`', deadGrave, deadGrave2);
     65        testgetCharactersForKeyE00("sq", '\\', '`', deadGrave, deadGrave2);
     66        testgetCharactersForKeyE00("it", '\\', '`', deadGrave, deadGrave2);
     67        testgetCharactersForKeyE00("pt", '\\', '`', deadGrave, deadGrave2);
     68        testgetCharactersForKeyE00("pt_BR", '\'', '`', deadGrave, deadGrave2);
     69        testgetCharactersForKeyE00("de", deadCircumflex, deadCircumflex2, '`', deadGrave, deadGrave2);
     70        testgetCharactersForKeyE00("cs", ';', '`', deadGrave, deadGrave2);
     71        testgetCharactersForKeyE00("he", '`', deadGrave, deadGrave2);
     72        testgetCharactersForKeyE00("hu", '0', '`', deadGrave, deadGrave2);
     73        testgetCharactersForKeyE00("pl", '`', deadGrave, deadGrave2);
     74        testgetCharactersForKeyE00("bs", '¸', '`', deadGrave, deadGrave2);
     75        testgetCharactersForKeyE00("hr", '¸', '`', deadGrave, deadGrave2);
     76        testgetCharactersForKeyE00("sl", '¸', '`', deadGrave, deadGrave2);
     77        testgetCharactersForKeyE00("sr", '¸', '`', deadGrave, deadGrave2);
     78        testgetCharactersForKeyE00("ro", ']', '`', deadGrave, deadGrave2);
     79        testgetCharactersForKeyE00("da", '½', '`', deadGrave, deadGrave2);
     80        testgetCharactersForKeyE00("fo", '½', '`', deadGrave, deadGrave2);
     81        testgetCharactersForKeyE00("nl", '@', '`', deadGrave, deadGrave2);
     82        testgetCharactersForKeyE00("et", deadCaron, deadCaron2, '`', deadGrave, deadGrave2);
     83        testgetCharactersForKeyE00("is", '°', '`', deadGrave, deadGrave2);
     84        testgetCharactersForKeyE00("es", '|', '`', deadGrave, deadGrave2);
     85        testgetCharactersForKeyE00("es_ES", 'º', '`', deadGrave, deadGrave2);
     86        testgetCharactersForKeyE00("tr", '"', '*', '`', deadGrave, deadGrave2);
     87        testgetCharactersForKeyE00("de_LU", deadCircumflex, deadCircumflex2, '²', '§', '`', deadGrave, deadGrave2);
     88        testgetCharactersForKeyE00("fr_LU", '$', '²', '§', '`', deadGrave, deadGrave2);
     89        testgetCharactersForKeyE00("fr_CH", '²', '$', '§', '`', deadGrave, deadGrave2);
     90        testgetCharactersForKeyE00("de_CH", deadCircumflex, deadCircumflex2, '§', '`', deadGrave, deadGrave2);
     91        testgetCharactersForKeyE00("de_LI", deadCircumflex, deadCircumflex2, '§', '`', deadGrave, deadGrave2);
     92        testgetCharactersForKeyE00("fi_FI", '§', '`', deadGrave, deadGrave2);
     93        testgetCharactersForKeyE00("sv_SE", '§', '`', deadGrave, deadGrave2);
     94        testgetCharactersForKeyE00("no_NO", '|', '`', deadGrave, deadGrave2);
     95        testgetCharactersForKeyE00("sv_NO", '|', '`', deadGrave, deadGrave2);
    9396    }
    9497
Note: See TracChangeset for help on using the changeset viewer.