/[svn]/jsampler/trunk/src/org/jsampler/view/std/PianoRoll.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/std/PianoRoll.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1863 by iliev, Sun Sep 28 20:38:36 2008 UTC revision 1864 by iliev, Sat Mar 14 20:44:58 2009 UTC
# Line 1  Line 1 
1  /*  /*
2   *   JSampler - a java front-end for LinuxSampler   *   JSampler - a java front-end for LinuxSampler
3   *   *
4   *   Copyright (C) 2005-2008 Grigor Iliev <grigor@grigoriliev.com>   *   Copyright (C) 2005-2009 Grigor Iliev <grigor@grigoriliev.com>
5   *   *
6   *   This file is part of JSampler.   *   This file is part of JSampler.
7   *   *
# Line 165  public class PianoRoll extends JPanel im Line 165  public class PianoRoll extends JPanel im
165                    
166          public void          public void
167          registerKeys(JComponent c) {          registerKeys(JComponent c) {
168                  KeyStroke k = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, KeyEvent.CTRL_MASK);                  int modKey = CC.getViewConfig().getDefaultModKey();
169    
170                    KeyStroke k = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, modKey);
171                  c.getInputMap(JComponent.WHEN_FOCUSED).put(k, "scrollLeft");                  c.getInputMap(JComponent.WHEN_FOCUSED).put(k, "scrollLeft");
172                  c.getActionMap().put("scrollLeft", actionScrollLeft);                  c.getActionMap().put("scrollLeft", actionScrollLeft);
173                                    
174                  k = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, KeyEvent.CTRL_MASK);                  k = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, modKey);
175                  c.getInputMap(JComponent.WHEN_FOCUSED).put(k, "scrollRight");                  c.getInputMap(JComponent.WHEN_FOCUSED).put(k, "scrollRight");
176                  c.getActionMap().put("scrollRight", actionScrollRight);                  c.getActionMap().put("scrollRight", actionScrollRight);
177                                    
178                  k = KeyStroke.getKeyStroke(KeyEvent.VK_UP, KeyEvent.CTRL_MASK);                  k = KeyStroke.getKeyStroke(KeyEvent.VK_UP, modKey);
179                  c.getInputMap(JComponent.WHEN_FOCUSED).put(k, "increaseKeyRange");                  c.getInputMap(JComponent.WHEN_FOCUSED).put(k, "increaseKeyRange");
180                  c.getActionMap().put("increaseKeyRange", actionIncreaseKeyNumber);                  c.getActionMap().put("increaseKeyRange", actionIncreaseKeyNumber);
181                                    
182                  k = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, KeyEvent.CTRL_MASK);                  k = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, modKey);
183                  c.getInputMap(JComponent.WHEN_FOCUSED).put(k, "decreaseKeyRange");                  c.getInputMap(JComponent.WHEN_FOCUSED).put(k, "decreaseKeyRange");
184                  c.getActionMap().put("decreaseKeyRange", actionDecreaseKeyNumber);                  c.getActionMap().put("decreaseKeyRange", actionDecreaseKeyNumber);
185                                    

Legend:
Removed from v.1863  
changed lines
  Added in v.1864

  ViewVC Help
Powered by ViewVC