当前位置: 首页>>代码示例>>Java>>正文


Java Keyboard.KEY_NUMPAD5属性代码示例

本文整理汇总了Java中org.lwjgl.input.Keyboard.KEY_NUMPAD5属性的典型用法代码示例。如果您正苦于以下问题:Java Keyboard.KEY_NUMPAD5属性的具体用法?Java Keyboard.KEY_NUMPAD5怎么用?Java Keyboard.KEY_NUMPAD5使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.lwjgl.input.Keyboard的用法示例。


在下文中一共展示了Keyboard.KEY_NUMPAD5属性的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_NUMPAD5属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。