本文整理匯總了Java中org.lwjgl.input.Keyboard.KEY_NUMPAD1屬性的典型用法代碼示例。如果您正苦於以下問題:Java Keyboard.KEY_NUMPAD1屬性的具體用法?Java Keyboard.KEY_NUMPAD1怎麽用?Java Keyboard.KEY_NUMPAD1使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.lwjgl.input.Keyboard
的用法示例。
在下文中一共展示了Keyboard.KEY_NUMPAD1屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: TimelineKeyMappings
public TimelineKeyMappings(TimelineController controller)
{
this.controller = controller;
keyMappings = new KeyMapping(controller.timelineFrame);
keyMappings.addKey(KeyEvent.VK_SPACE, Keyboard.KEY_SPACE, "spacePressed", new SpaceAction());
keyMappings.addKey(KeyEvent.VK_W, Keyboard.KEY_W, "wPressed", new WAction());
keyMappings.addKey(KeyEvent.VK_S, Keyboard.KEY_S, "sPressed", new SAction());
keyMappings.addKey(KeyEvent.VK_A, Keyboard.KEY_A, "aPressed", new AAction());
keyMappings.addKey(KeyEvent.VK_D, Keyboard.KEY_D, "dPressed", new DAction());
keyMappings.addCtrlKey(KeyEvent.VK_Z, Keyboard.KEY_Z, "undoReleased", new UndoAction());
keyMappings.addCtrlKey(KeyEvent.VK_Y, Keyboard.KEY_Y, "redoReleased", new RedoAction());
keyMappings.addKey(KeyEvent.VK_ESCAPE, Keyboard.KEY_ESCAPE, "escPressed", new EscAction());
keyMappings.addKey(KeyEvent.VK_DELETE, Keyboard.KEY_DELETE, "deletePressed", new DeleteAction());
keyMappings.addCtrlKey(KeyEvent.VK_R, Keyboard.KEY_R, "rPressed", new ResetAction());
keyMappings.addCtrlKey(KeyEvent.VK_C, Keyboard.KEY_C, "cPressed", new CopyAction());
keyMappings.addCtrlKey(KeyEvent.VK_V, Keyboard.KEY_V, "vPressed", new PasteAction());
keyMappings.addCtrlShiftKey(KeyEvent.VK_ADD, Keyboard.KEY_ADD, "addAllPressed", new AddAction(true));
keyMappings.addCtrlShiftKey(KeyEvent.VK_SUBTRACT, Keyboard.KEY_SUBTRACT, "removeAllPressed", new RemoveAction(true));
keyMappings.addCtrlKey(KeyEvent.VK_ADD, Keyboard.KEY_ADD, "addPressed", new AddAction(false));
keyMappings.addCtrlKey(KeyEvent.VK_SUBTRACT, Keyboard.KEY_SUBTRACT, "removePressed", new RemoveAction(false));
int[] numpadKey = new int[] {
Keyboard.KEY_NUMPAD0, Keyboard.KEY_NUMPAD1, Keyboard.KEY_NUMPAD2, Keyboard.KEY_NUMPAD3,
Keyboard.KEY_NUMPAD4, Keyboard.KEY_NUMPAD5, Keyboard.KEY_NUMPAD6, Keyboard.KEY_NUMPAD7,
Keyboard.KEY_NUMPAD8, Keyboard.KEY_NUMPAD9};
for (int j = 0; j <= 9; j++)
{
keyMappings.addKey(KeyEvent.VK_NUMPAD0 + j, numpadKey[j], "numpad" + j, new ChangeViewAction(j));
}
}