Changeset 19205 in josm for trunk/src


Ignore:
Timestamp:
2024-08-28T16:00:29+02:00 (3 months ago)
Author:
taylor.smock
Message:

Fix keyboard navigation in the mapview on MacOS

This also adds default shortcuts for mission control and showing all windows of
the currently focused application.

See https://web.archive.org/web/20240828134626/https://support.apple.com/en-us/102650 .

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java

    r19120 r19205  
    1818import java.net.URISyntaxException;
    1919import java.nio.charset.StandardCharsets;
    20 import java.security.KeyStoreException;
    21 import java.security.NoSuchAlgorithmException;
    2220import java.security.cert.CertificateException;
    2321import java.security.cert.CertificateFactory;
     
    271269        Shortcut.registerSystemShortcut("system:redo", tr(reserved), KeyEvent.VK_Z, InputEvent.META_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK); // Reverse the effect of the last Undo command (equivalent to the Redo command). See "The Edit Menu."
    272270
    273         auto(Shortcut.registerSystemShortcut("apple-reserved-45", tr(reserved), KeyEvent.VK_RIGHT, InputEvent.META_DOWN_MASK)); // Change the keyboard layout to current layout of Roman script.
     271        //auto(Shortcut.registerSystemShortcut("apple-reserved-45", tr(reserved), KeyEvent.VK_RIGHT, InputEvent.CTRL_DOWN_MASK)); // Move cursor to end of line
    274272        //auto(Shortcut.registerSystemCut("apple-reserved-46", tr(reserved), KeyEvent.VK_RIGHT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); // Extend selection to the next semantic unit, typically the end of the current line.
    275273        //auto(Shortcut.registerSystemCut("apple-reserved-47", tr(reserved), KeyEvent.VK_RIGHT, KeyEvent.SHIFT_DOWN_MASK)); // Extend selection one character to the right.
    276274        //auto(Shortcut.registerSystemCut("apple-reserved-48", tr(reserved), KeyEvent.VK_RIGHT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); // Extend selection to the end of the current word, then to the end of the next word.
    277275
    278         Shortcut.registerSystemShortcut("system:movefocusright", tr(reserved), KeyEvent.VK_RIGHT, InputEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
    279 
    280         auto(Shortcut.registerSystemShortcut("apple-reserved-49", tr(reserved), KeyEvent.VK_LEFT, InputEvent.META_DOWN_MASK)); // Change the keyboard layout to current layout of system script.
     276        Shortcut.registerSystemShortcut("system:movefocusright", tr(reserved), KeyEvent.VK_RIGHT, InputEvent.META_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     277
     278        //auto(Shortcut.registerSystemShortcut("apple-reserved-49", tr(reserved), KeyEvent.VK_LEFT, InputEvent.META_DOWN_MASK)); // Move cursor to start of line
    281279        //auto(Shortcut.registerSystemCut("apple-reserved-50", tr(reserved), KeyEvent.VK_LEFT, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); // Extend selection to the previous semantic unit, typically the beginning of the current line.
    282280        //auto(Shortcut.registerSystemCut("apple-reserved-51", tr(reserved), KeyEvent.VK_LEFT, KeyEvent.SHIFT_DOWN_MASK)); // Extend selection one character to the left.
    283281        //auto(Shortcut.registerSystemCut("apple-reserved-52", tr(reserved), KeyEvent.VK_LEFT, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); // Extend selection to the beginning of the current word, then to the beginning of the previous word.
    284282
    285         Shortcut.registerSystemShortcut("system:movefocusleft", tr(reserved), KeyEvent.VK_LEFT, InputEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     283        Shortcut.registerSystemShortcut("system:movefocusleft", tr(reserved), KeyEvent.VK_LEFT, InputEvent.META_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
    286284
    287285        //auto(Shortcut.registerSystemCut("apple-reserved-53", tr(reserved), KeyEvent.VK_UP, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); // Extend selection upward in the next semantic unit, typically the beginning of the document.
     
    289287        //auto(Shortcut.registerSystemCut("apple-reserved-55", tr(reserved), KeyEvent.VK_UP, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); // Extend selection to the beginning of the current paragraph, then to the beginning of the next paragraph.
    290288
    291         Shortcut.registerSystemShortcut("system:movefocusup", tr(reserved), KeyEvent.VK_UP, InputEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     289        Shortcut.registerSystemShortcut("system:movefocusup", tr(reserved), KeyEvent.VK_UP, InputEvent.META_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
    292290
    293291        //auto(Shortcut.registerSystemCut("apple-reserved-56", tr(reserved), KeyEvent.VK_DOWN, KeyEvent.META_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); // Extend selection downward in the next semantic unit, typically the end of the document.
     
    295293        //auto(Shortcut.registerSystemCut("apple-reserved-58", tr(reserved), KeyEvent.VK_DOWN, KeyEvent.ALT_DOWN_MASK | KeyEvent.SHIFT_DOWN_MASK)); // Extend selection to the end of the current paragraph, then to the end of the next paragraph (include the blank line between paragraphs in cut, copy, and paste operations).
    296294
    297         Shortcut.registerSystemShortcut("system:movefocusdown", tr(reserved), KeyEvent.VK_DOWN, InputEvent.CTRL_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     295        Shortcut.registerSystemShortcut("system:movefocusdown", tr(reserved), KeyEvent.VK_DOWN, InputEvent.META_DOWN_MASK); // Move focus to another value or cell within a view, such as a table. See Accessibility Overview.
     296
     297        auto(Shortcut.registerSystemShortcut("apple-reserved-59", tr(reserved), KeyEvent.VK_DOWN, InputEvent.CTRL_DOWN_MASK)); // Show all windows of the front app
     298        auto(Shortcut.registerSystemShortcut("apple-reserved-60", tr(reserved), KeyEvent.VK_UP, InputEvent.CTRL_DOWN_MASK)); // Mission control
    298299
    299300        auto(Shortcut.registerSystemShortcut("system:about", tr(reserved), 0, -1)); // About
     
    374375    @Override
    375376    public X509Certificate getX509Certificate(NativeCertAmend certAmend)
    376             throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException {
     377            throws IOException {
    377378        for (String macAlias : certAmend.getNativeAliases()) {
    378379            try {
Note: See TracChangeset for help on using the changeset viewer.