當前位置: 首頁>>代碼示例>>Java>>正文


Java Keyboard.KEY_NUMPAD7屬性代碼示例

本文整理匯總了Java中org.lwjgl.input.Keyboard.KEY_NUMPAD7屬性的典型用法代碼示例。如果您正苦於以下問題:Java Keyboard.KEY_NUMPAD7屬性的具體用法?Java Keyboard.KEY_NUMPAD7怎麽用?Java Keyboard.KEY_NUMPAD7使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.lwjgl.input.Keyboard的用法示例。


在下文中一共展示了Keyboard.KEY_NUMPAD7屬性的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));
    }
}
 
開發者ID:ObsidianSuite,項目名稱:ObsidianSuite,代碼行數:33,代碼來源:TimelineKeyMappings.java


注:本文中的org.lwjgl.input.Keyboard.KEY_NUMPAD7屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。