📄 keyevent.java
字号:
/* KeyEvent.java{{IS_NOTE Purpose: Description: History: Tue Sep 27 09:15:39 2005, Created by tomyeh}}IS_NOTECopyright (C) 2005 Potix Corporation. All Rights Reserved.{{IS_RIGHT This program is distributed under GPL Version 2.0 in the hope that it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.zk.ui.event;import org.zkoss.zk.ui.Component;/** * Represents a key pressed by the user. * * @author tomyeh */public class KeyEvent extends Event { public static final int F1 = 112; public static final int F2 = 113; public static final int F3 = 114; public static final int F4 = 115; public static final int F5 = 116; public static final int F6 = 117; public static final int F7 = 118; public static final int F8 = 119; public static final int F9 = 120; public static final int F10 = 121; public static final int F11 = 122; public static final int F12 = 123; public static final int PAGE_UP = 33; public static final int PAGE_DOWN = 34; public static final int END = 35; public static final int HOME = 36; public static final int LEFT = 37; public static final int UP = 38; public static final int RIGHT = 39; public static final int DOWN = 40; public static final int INSERT = 45; public static final int DELETE = 46; private final int _keyCode; private final boolean _ctrlKey, _shiftKey, _altKey; /** Constructs a mouse relevant event. */ public KeyEvent(String name, Component target, int keyCode, boolean ctrlKey, boolean shiftKey, boolean altKey) { super(name, target); _keyCode = keyCode; _ctrlKey = ctrlKey; _shiftKey = shiftKey; _altKey = altKey; } /** Returns the key code. */ public final int getKeyCode() { return _keyCode; } /** Returns whether CTRL is pressed. */ public final boolean isCtrlKey() { return _ctrlKey; } /** Returns whether SHIFT is pressed. */ public final boolean isShiftKey() { return _shiftKey; } /** Returns whether ALT is pressed. */ public final boolean isAltKey() { return _altKey; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -