T.M. SoftStudio

feci quod potui, faciant meliora potentes

Класс KeyEvent

Класс KeyEvent расширяет класс InputEvent и представляет событие клавиатуры.

Класс KeyEvent имеет, помимо унаследованных от класса InputEvent, следующие поля, конструкторы и методы:

  • Поле public static final EventType<KeyEvent> ANY – общий тип событий клавиатуры.

  • Поле public static final EventType<KeyEvent> KEY_PRESSED – тип событий нажатия клавиши клавиатуры.

  • Поле public static final EventType<KeyEvent> KEY_RELEASED – тип событий освобождения клавиши клавиатуры.

  • Поле public static final EventType<KeyEvent> KEY_TYPED – тип событий нажатия и освобождения клавиши клавиатуры.

  • Поле public static final java.lang.String CHAR_UNDEFINED – тип событий неизвестного введенного символа.

  • Конструктор public KeyEvent(java.lang.Object source, EventTarget target, EventType<KeyEvent> eventType, java.lang.String character, java.lang.String text, KeyCode code, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown),
    public KeyEvent(EventType<KeyEvent> eventType, java.lang.String character, java.lang.String text, KeyCode code, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown)

  • Метод public final java.lang.String getCharacter() – возвращает введенный символ.

  • Метод public final java.lang.String getText() – возвращает введенную строку.

  • Метод public final KeyCode getCode() – возвращает поле перечисления javafx.scene.input.KeyCode, определяющее код клавиши клавиатуры. Перечисление KeyCode имеет следующие поля раскладки клавиатуры:

  • public static final KeyCode ENTER

  • public static final KeyCode BACK_SPACE

  • public static final KeyCode TAB

  • public static final KeyCode CANCEL

  • public static final KeyCode CLEAR

  • public static final KeyCode SHIFT

  • public static final KeyCode CONTROL

  • public static final KeyCode ALT

  • public static final KeyCode PAUSE

  • public static final KeyCode CAPS

  • public static final KeyCode ESCAPE

  • public static final KeyCode SPACE

  • public static final KeyCode PAGE_UP

  • public static final KeyCode PAGE_DOWN

  • public static final KeyCode END

  • public static final KeyCode HOME

  • public static final KeyCode LEFT

  • public static final KeyCode UP

  • public static final KeyCode RIGHT

  • public static final KeyCode DOWN

  • public static final KeyCode COMMA

  • public static final KeyCode MINUS

  • public static final KeyCode PERIOD

  • public static final KeyCode SLASH

  • public static final KeyCode DIGIT0

  • public static final KeyCode DIGIT1

  • public static final KeyCode DIGIT2

  • public static final KeyCode DIGIT3

  • public static final KeyCode DIGIT4

  • public static final KeyCode DIGIT5

  • public static final KeyCode DIGIT6

  • public static final KeyCode DIGIT7

  • public static final KeyCode DIGIT8

  • public static final KeyCode DIGIT9

  • public static final KeyCode SEMICOLON

  • public static final KeyCode EQUALS

  • public static final KeyCode A

  • public static final KeyCode B

  • public static final KeyCode C

  • public static final KeyCode D

  • public static final KeyCode E

  • public static final KeyCode F

  • public static final KeyCode G

  • public static final KeyCode H

  • public static final KeyCode I

  • public static final KeyCode J

  • public static final KeyCode K

  • public static final KeyCode L

  • public static final KeyCode M

  • public static final KeyCode N

  • public static final KeyCode O

  • public static final KeyCode P

  • public static final KeyCode Q

  • public static final KeyCode R

  • public static final KeyCode S

  • public static final KeyCode T

  • public static final KeyCode U

  • public static final KeyCode V

  • public static final KeyCode W

  • public static final KeyCode X

  • public static final KeyCode Y

  • public static final KeyCode Z

  • public static final KeyCode OPEN_BRACKET

  • public static final KeyCode BACK_SLASH

  • public static final KeyCode CLOSE_BRACKET

  • public static final KeyCode NUMPAD0

  • public static final KeyCode NUMPAD1

  • public static final KeyCode NUMPAD2

  • public static final KeyCode NUMPAD3

  • public static final KeyCode NUMPAD4

  • public static final KeyCode NUMPAD5

  • public static final KeyCode NUMPAD6

  • public static final KeyCode NUMPAD7

  • public static final KeyCode NUMPAD8

  • public static final KeyCode NUMPAD9

  • public static final KeyCode MULTIPLY

  • public static final KeyCode ADD

  • public static final KeyCode SEPARATOR

  • public static final KeyCode SUBTRACT

  • public static final KeyCode DECIMAL

  • public static final KeyCode DIVIDE

  • public static final KeyCode DELETE

  • public static final KeyCode NUM_LOCK

  • public static final KeyCode SCROLL_LOCK

  • public static final KeyCode F1

  • public static final KeyCode F2

  • public static final KeyCode F3

  • public static final KeyCode F4

  • public static final KeyCode F5

  • public static final KeyCode F6

  • public static final KeyCode F7

  • public static final KeyCode F8

  • public static final KeyCode F9

  • public static final KeyCode F10

  • public static final KeyCode F11

  • public static final KeyCode F12

  • public static final KeyCode F13

  • public static final KeyCode F14

  • public static final KeyCode F15

  • public static final KeyCode F16

  • public static final KeyCode F17

  • public static final KeyCode F18

  • public static final KeyCode F19

  • public static final KeyCode F20

  • public static final KeyCode F21

  • public static final KeyCode F22

  • public static final KeyCode F23

  • public static final KeyCode F24

  • public static final KeyCode PRINTSCREEN

  • public static final KeyCode INSERT

  • public static final KeyCode HELP

  • public static final KeyCode META

  • public static final KeyCode BACK_QUOTE

  • public static final KeyCode QUOTE

  • public static final KeyCode KP_UP

  • public static final KeyCode KP_DOWN

  • public static final KeyCode KP_LEFT

  • public static final KeyCode KP_RIGHT

  • public static final KeyCode DEAD_GRAVE

  • public static final KeyCode DEAD_ACUTE

  • public static final KeyCode DEAD_CIRCUMFLEX

  • public static final KeyCode DEAD_TILDE

  • public static final KeyCode DEAD_MACRON

  • public static final KeyCode DEAD_BREVE

  • public static final KeyCode DEAD_ABOVEDOT

  • public static final KeyCode DEAD_DIAERESIS

  • public static final KeyCode DEAD_ABOVERING

  • public static final KeyCode DEAD_DOUBLEACUTE

  • public static final KeyCode DEAD_CARON

  • public static final KeyCode DEAD_CEDILLA

  • public static final KeyCode DEAD_OGONEK

  • public static final KeyCode DEAD_IOTA

  • public static final KeyCode DEAD_VOICED_SOUND

  • public static final KeyCode DEAD_SEMIVOICED_SOUND

  • public static final KeyCode AMPERSAND

  • public static final KeyCode ASTERISK

  • public static final KeyCode QUOTEDBL

  • public static final KeyCode LESS

  • public static final KeyCode GREATER

  • public static final KeyCode BRACELEFT

  • public static final KeyCode BRACERIGHT

  • public static final KeyCode AT

  • public static final KeyCode COLON

  • public static final KeyCode CIRCUMFLEX

  • public static final KeyCode DOLLAR

  • public static final KeyCode EURO_SIGN

  • public static final KeyCode EXCLAMATION_MARK

  • public static final KeyCode INVERTED_EXCLAMATION_MARK

  • public static final KeyCode LEFT_PARENTHESIS

  • public static final KeyCode NUMBER_SIGN

  • public static final KeyCode PLUS

  • public static final KeyCode RIGHT_PARENTHESIS

  • public static final KeyCode UNDERSCORE

  • public static final KeyCode WINDOWS

  • public static final KeyCode CONTEXT_MENU

  • public static final KeyCode FINAL

  • public static final KeyCode CONVERT

  • public static final KeyCode NONCONVERT

  • public static final KeyCode ACCEPT

  • public static final KeyCode MODECHANGE

  • public static final KeyCode KANA

  • public static final KeyCode KANJI

  • public static final KeyCode ALPHANUMERIC

  • public static final KeyCode KATAKANA

  • public static final KeyCode HIRAGANA

  • public static final KeyCode FULL_WIDTH

  • public static final KeyCode HALF_WIDTH

  • public static final KeyCode ROMAN_CHARACTERS

  • public static final KeyCode ALL_CANDIDATES

  • public static final KeyCode PREVIOUS_CANDIDATE

  • public static final KeyCode CODE_INPUT

  • public static final KeyCode JAPANESE_KATAKANA

  • public static final KeyCode JAPANESE_HIRAGANA

  • public static final KeyCode JAPANESE_ROMAN

  • public static final KeyCode KANA_LOCK

  • public static final KeyCode INPUT_METHOD_ON_OFF

  • public static final KeyCode CUT

  • public static final KeyCode COPY

  • public static final KeyCode PASTE

  • public static final KeyCode UNDO

  • public static final KeyCode AGAIN

  • public static final KeyCode FIND

  • public static final KeyCode PROPS

  • public static final KeyCode STOP

  • public static final KeyCode COMPOSE

  • public static final KeyCode ALT_GRAPH

  • public static final KeyCode BEGIN

  • public static final KeyCode UNDEFINED

  • public static final KeyCode SOFTKEY_0

  • public static final KeyCode SOFTKEY_1

  • public static final KeyCode SOFTKEY_2

  • public static final KeyCode SOFTKEY_3

  • public static final KeyCode SOFTKEY_4

  • public static final KeyCode SOFTKEY_5

  • public static final KeyCode SOFTKEY_6

  • public static final KeyCode SOFTKEY_7

  • public static final KeyCode SOFTKEY_8

  • public static final KeyCode SOFTKEY_9

  • public static final KeyCode GAME_A

  • public static final KeyCode GAME_B

  • public static final KeyCode GAME_C

  • public static final KeyCode GAME_D

  • public static final KeyCode STAR

  • public static final KeyCode POUND

  • public static final KeyCode POWER

  • public static final KeyCode INFO

  • public static final KeyCode COLORED_KEY_0

  • public static final KeyCode COLORED_KEY_1

  • public static final KeyCode COLORED_KEY_2

  • public static final KeyCode COLORED_KEY_3

  • public static final KeyCode EJECT_TOGGLE

  • public static final KeyCode PLAY

  • public static final KeyCode RECORD

  • public static final KeyCode FAST_FWD

  • public static final KeyCode REWIND

  • public static final KeyCode TRACK_PREV

  • public static final KeyCode TRACK_NEXT

  • public static final KeyCode CHANNEL_UP

  • public static final KeyCode CHANNEL_DOWN

  • public static final KeyCode VOLUME_UP

  • public static final KeyCode VOLUME_DOWN

  • public static final KeyCode MUTE

  • Метод public final boolean isShiftDown() – возвращает true, если была нажата клавиша Shift.

  • Метод public final boolean isControlDown() – возвращает true, если была нажата клавиша Ctrl.

  • Метод public final boolean isAltDown() – возвращает true, если была нажата клавиша Alt.

  • Метод public final boolean isMetaDown() – возвращает true, если была нажата клавиша Meta.

  • Метод public final boolean isShortcutDown() – возвращает true, если нажата клавиша Ctrl.

  • Метод public KeyEvent copyFor(java.lang.Object newSource, EventTarget newTarget), public KeyEvent copyFor(java.lang.Object source, EventTarget target, EventType<KeyEvent> type) - создает копию события.

  • Метод public EventType<KeyEvent> getEventType() - возвращает тип события.