Changeset 3278 in josm for trunk/src


Ignore:
Timestamp:
2010-05-24T22:01:47+02:00 (15 years ago)
Author:
jttt
Message:

Fix #4500: Various audio controls no longer work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapFrame.java

    r3252 r3278  
    66import java.awt.Container;
    77import java.awt.Dimension;
     8import java.awt.event.KeyEvent;
    89import java.awt.event.MouseWheelEvent;
    910import java.awt.event.MouseWheelListener;
     
    1617import javax.swing.BoxLayout;
    1718import javax.swing.ButtonGroup;
     19import javax.swing.JComponent;
    1820import javax.swing.JPanel;
    1921import javax.swing.JSplitPane;
    2022import javax.swing.JToolBar;
     23import javax.swing.KeyStroke;
    2124import javax.swing.border.Border;
    2225import javax.swing.plaf.basic.BasicSplitPaneDivider;
     
    138141        });
    139142
     143        // JSplitPane supports F6 and F8 shortcuts by default, but we need them for Audio actions
     144        splitPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), new Object());
     145        splitPane.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_F8, 0), new Object());
     146
    140147        add(splitPane, BorderLayout.CENTER);
    141148
Note: See TracChangeset for help on using the changeset viewer.