Implement saveAndCreate toolbar button - use ctrl-q as shortcut instead of ctrl-a which is commonly known as the short cut key for select all text.

This commit is contained in:
Heng Sin Low 2011-02-08 10:53:35 +08:00
parent 72f706021a
commit 20d37271bf
2 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ public final class APanel extends CPanel
menuBar.add(mEdit);
aNew = addAction("New", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), false);
aSave = addAction("Save", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), false);
aSaveAndCreate = addAction("SaveCreate", mEdit, null, false);
aSaveAndCreate = addAction("SaveCreate", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_MASK), false);
mEdit.addSeparator();
aCopy = addAction("Copy", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F2, Event.SHIFT_MASK), false);
aDelete = addAction("Delete", mEdit, KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), false);

View File

@ -293,7 +293,7 @@ public class CWindowToolbar extends FToolbar implements EventListener
ctrlKeyMap.put(VK_P, btnPrint);
ctrlKeyMap.put(VK_N, btnNew);
ctrlKeyMap.put(VK_S, btnSave);
ctrlKeyMap.put(VK_A, btnSaveAndCreate);
ctrlKeyMap.put(VK_Q, btnSaveAndCreate);
ctrlKeyMap.put(VK_D, btnDelete);
ctrlKeyMap.put(VK_F, btnFind);
}