core/inputmanager
입력 매니저.
Input manager.
TouchPointextends Object
손가락 하나. (identifier 는 브라우저의 Touch.identifier, 자리는 캔버스 기준과 뷰 기준)
One finger. (identifier is the browser's Touch.identifier, positions are canvas-based and view-based)
import { Engine, EngineConfiguration, Scene, TouchPhase } from "./build/vanilla.js";
class MainScene extends Scene {
tick(timeDelta) {
super.tick(timeDelta);
const engine = this.getEngine();
const inputManager = engine.getInputManager();
const touchPoints = inputManager.getTouchPoints();
for (const touchPoint of touchPoints) {
if (touchPoint.phase === TouchPhase.began) {
console.log(touchPoint.identifier, touchPoint.viewPosition.x, touchPoint.viewPosition.y);
}
}
const endedTouchPoints = inputManager.getEndedTouchPoints();
for (const touchPoint of endedTouchPoints) {
console.log(touchPoint.identifier, touchPoint.phase);
}
}
}
const engineConfiguration = new EngineConfiguration();
const engine = new Engine(engineConfiguration);
engine.run(new MainScene());생성.
Constructor.
- identifiernumber
- 손가락 번호. (Touch.identifier)Finger number. (Touch.identifier)
- phasestring
- TouchPhase 의 값.A TouchPhase value.
- canvasNativePositionVector2
- 캔버스 왼쪽 위 기준 자리. (CSS 픽셀)Position from the canvas top-left. (CSS pixels)
- viewPositionVector2
- 뷰 좌표의 자리.Position in view coordinates.
손가락 번호. (닿아 있는 동안 같다)
Finger number. (Stays the same while touching)
반환Returnsnumber
짝Counterpart: vanilla-engine TouchPoint.identifier
캔버스 왼쪽 위 기준 CSS 픽셀 자리.
CSS pixel position relative to the canvas top-left.
반환ReturnsVector2
짝Counterpart: vanilla-engine TouchPoint.canvas_native_position
뷰(기준 해상도) 자리.
View (reference resolution) position.
반환ReturnsVector2
짝Counterpart: vanilla-engine TouchPoint.view_position
InputManagerextends Object
입력 매니저.
Input manager.
import { Engine, EngineConfiguration, Scene, MouseButton } from "./build/vanilla.js";
class MainScene extends Scene {
tick(timeDelta) {
super.tick(timeDelta);
const engine = this.getEngine();
const inputManager = engine.getInputManager();
if (inputManager.isKeyJustPressed("Space")) {
console.log("jump");
}
if (inputManager.isKeyPressed("ArrowRight")) {
console.log("move right");
}
if (inputManager.isMouseButtonJustPressed(MouseButton.right)) {
const viewInputPosition = inputManager.getViewInputPosition();
console.log(viewInputPosition.x, viewInputPosition.y);
}
}
}
const engineConfiguration = new EngineConfiguration();
const engine = new Engine(engineConfiguration);
const inputManager = engine.getInputManager();
inputManager.setPreventedKeys(["Space", "Tab"]);
inputManager.setTouchFromLeftButtonOnly(true);
engine.run(new MainScene());생성.
Constructor.
- engineEngine
- 이 매니저를 가진 엔진. (게임패드 매니저에 넘기고 글자 입력칸을 볼 때 쓴다)The engine that owns this manager. (passed to the gamepad manager and used to check text inputs)
짝Counterpart: vanilla-engine InputManager.new
갱신. (게임패드 폴링, 패드를 썼으면 마지막 장치를 게임패드로, 입력 동작 갱신)
Update. (Gamepad polling, sets the last device to gamepad if a pad was used, updates input actions)
- timeDeltanumber
- 지난 프레임부터의 시간. (초)Time since the last frame. (Seconds)
짝Counterpart: vanilla-engine InputManager.tick
모든 입력 상태를 초기 상태로 되돌림. (창이 포커스를 잃을 때와 페이지 프로세스 복원 시 stuck touch/key 방지용)
Resets all input states to the initial state. (To prevent stuck touch/key when the window loses focus and when the page process is restored)
짝Counterpart: vanilla-engine InputManager.clear
마우스 휠 누적값.
- addWheelDelta 로 들어온 값을 한 프레임 누적해서 들고 있다가, 프레임 종료 시 엔진이 clearWheelDelta() 로 비운다.
Mouse wheel accumulated value.
- Accumulates the values coming in through addWheelDelta for one frame, and at frame end the engine clears them with clearWheelDelta().
- deltaXnumber
- 더할 휠 가로 값. (WheelEvent.deltaX)Horizontal wheel amount to add. (WheelEvent.deltaX)
- deltaYnumber
- 더할 휠 세로 값. (WheelEvent.deltaY, 아래로 굴리면 양수)Vertical wheel amount to add. (WheelEvent.deltaY, positive when scrolling down)
짝Counterpart: vanilla-engine InputManager.add_wheel_delta
이번 프레임에 쌓인 휠 가로 값 반환.
Returns the horizontal wheel amount accumulated this frame.
반환Returnsnumber 휠 가로 값. (WheelEvent.deltaX 의 합)Horizontal wheel amount. (sum of WheelEvent.deltaX)
짝Counterpart: vanilla-engine InputManager.get_wheel_delta_x
이번 프레임에 쌓인 휠 세로 값 반환.
Returns the vertical wheel amount accumulated this frame.
반환Returnsnumber 휠 세로 값. (WheelEvent.deltaY 의 합, 아래로 굴리면 양수)Vertical wheel amount. (sum of WheelEvent.deltaY, positive when scrolling down)
짝Counterpart: vanilla-engine InputManager.get_wheel_delta_y
이번 프레임에 쌓인 휠 값이 있는지.
Whether any wheel amount accumulated this frame.
반환Returnsboolean 가로나 세로가 0 이 아니면 참.True if the horizontal or vertical amount is not 0.
짝Counterpart: vanilla-engine InputManager.has_wheel_delta
쌓인 휠 값 비우기. (엔진이 프레임 끝에 부른다)
Clears the accumulated wheel amount. (the engine calls this at the end of the frame)
짝Counterpart: vanilla-engine InputManager.clear_wheel_delta
마지막 휠을 Ctrl 과 함께 굴렸는지 설정. (엔진이 wheel 에서 부른다, 노트북 터치패드의 오므리기도 Ctrl 휠로 온다)
Sets whether the last wheel was rolled with Ctrl. (The engine calls it from wheel, laptop touchpad pinches also arrive as Ctrl wheel)
- isWheelWithCtrlboolean
- Ctrl 과 함께 굴렸는지.Whether it was scrolled with Ctrl.
짝Counterpart: vanilla-engine InputManager.set_wheel_with_ctrl
마지막 휠을 Ctrl 과 함께 굴렸는지 반환.
Returns whether the last wheel was rolled with Ctrl.
반환Returnsboolean Ctrl 과 함께 굴렸으면 참.True if it was scrolled with Ctrl.
짝Counterpart: vanilla-engine InputManager.is_wheel_with_ctrl
키 누름 여부 설정.
Sets whether a key is pressed.
- keystring
- 누른 키 코드. (KeyboardEvent.code)Pressed key code. (KeyboardEvent.code)
짝Counterpart: vanilla-engine InputManager.push_key
키 뗌 여부 설정.
Sets whether a key is released.
- keystring
- 뗀 키 코드. (KeyboardEvent.code)Released key code. (KeyboardEvent.code)
짝Counterpart: vanilla-engine InputManager.pop_key
키 누름 여부 반환.
Returns whether a key is pressed.
- keystring
- 키 코드. (KeyboardEvent.code, 예: "KeyW", "Space")Key code. (KeyboardEvent.code, e.g. "KeyW", "Space")
반환Returnsboolean 눌려 있으면 참.True if held down.
짝Counterpart: vanilla-engine InputManager.is_key_pressed
이번 프레임에 방금 눌린 키인지 여부.
- 게임마다 wasPressed 변수를 손으로 들고 다니던 것을 대신한다.
- 지난 프레임 끝 뒤로 온 키 사건을 본다. 프레임 사이에 눌렀다 뗀 키도 참이다. (그때는 isKeyPressed 가 거짓이고 isKeyJustReleased 도 참)
Whether the key was just pressed this frame.
- Replaces the wasPressed variable each game used to carry around by hand.
- Looks at key events since the end of the last frame. A key pressed and released between frames is also true. (In that case isKeyPressed is false and isKeyJustReleased is also true)
- keystring
- 키 코드. (KeyboardEvent.code, 예: "KeyW", "Space")Key code. (KeyboardEvent.code, e.g. "KeyW", "Space")
반환Returnsboolean 이번 프레임에 눌렸으면 참.True if pressed this frame.
짝Counterpart: vanilla-engine InputManager.is_key_just_pressed
이번 프레임에 방금 떼어진 키인지 여부.
Whether the key was just released this frame.
- keystring
- 키 코드. (KeyboardEvent.code, 예: "KeyW", "Space")Key code. (KeyboardEvent.code, e.g. "KeyW", "Space")
반환Returnsboolean 이번 프레임에 떼어졌으면 참.True if released this frame.
짝Counterpart: vanilla-engine InputManager.is_key_just_released
프레임 스냅샷 갱신.
- 엔진이 프레임 끝에서 부른다. 이번 프레임에 본 키와 마우스 단추의 눌림, 뗌을 비우고, 떨어진 손가락을 지우고 남은 손가락을 가만히로 둔다.
Updates the frame snapshot.
- Called by the engine at frame end. Clears this frame's key and mouse button presses and releases, removes lifted fingers and sets the remaining fingers to stationary.
짝Counterpart: vanilla-engine InputManager.update_frame_snapshot
누름 여부 설정.
Sets whether pressed.
- valueboolean
- 이번 프레임에 눌렀는지.Whether pressed this frame.
짝Counterpart: vanilla-engine InputManager.set_touch_pressed
뗌 여부 설정.
Sets whether released.
- valueboolean
- 이번 프레임에 뗐는지.Whether released this frame.
짝Counterpart: vanilla-engine InputManager.set_touch_released
취소 여부 설정.
Sets whether cancelled.
- valueboolean
- 이번 프레임에 취소됐는지.Whether cancelled this frame.
짝Counterpart: vanilla-engine InputManager.set_touch_cancelled
누르고 있는 중인지 여부 설정.
Sets whether being held down.
- valueboolean
- 누르고 있는 중인지.Whether it is being held.
짝Counterpart: vanilla-engine InputManager.set_touch_moved
누름 여부 반환.
Returns whether pressed.
반환Returnsboolean 이번 프레임에 눌렀으면 참.True if pressed this frame.
짝Counterpart: vanilla-engine InputManager.is_touch_pressed
뗌 여부 반환.
Returns whether released.
반환Returnsboolean 이번 프레임에 뗐으면 참.True if released this frame.
짝Counterpart: vanilla-engine InputManager.is_touch_released
취소 여부 반환.
Returns whether cancelled.
반환Returnsboolean 이번 프레임에 취소됐으면 참.True if cancelled this frame.
짝Counterpart: vanilla-engine InputManager.is_touch_cancelled
누르고 있는 중인지 여부 반환.
Returns whether being held down.
반환Returnsboolean 누르고 있는 중이면 참.True if it is being held.
짝Counterpart: vanilla-engine InputManager.is_touch_moved
터치가 눌린 채인지 설정. (엔진이 누름과 뗌에서 부른다)
Sets whether the touch is held down. (The engine calls it on press and release)
- valueboolean
- 눌린 채인지.Whether it is held down.
짝Counterpart: vanilla-engine InputManager.set_touch_down
터치가 눌린 채인지 반환. (누른 프레임부터 뗄 때까지 참, 누른 채 움직이지 않아도 참)
Returns whether the touch is held down. (True from the press frame until release, true even when held without moving)
반환Returnsboolean 눌린 채면 참.True if it is held down.
짝Counterpart: vanilla-engine InputManager.is_touch_down
canvasNativeSize 기반 입력 위치 갱신.
Updates the canvasNativeSize based input position.
- positionVector2
- 캔버스 왼쪽 위 기준 자리. (CSS 픽셀, 받은 벡터를 반올림해 그대로 담는다)Position from the canvas top-left. (CSS pixels, the given vector is rounded in place and stored as is)
짝Counterpart: vanilla-engine InputManager.set_canvas_native_input_position
canvasNativeSize 기반 입력 위치 반환.
Returns the canvasNativeSize based input position.
반환ReturnsVector2 캔버스 왼쪽 위 기준 입력 위치. (CSS 픽셀, 정수)Input position from the canvas top-left. (CSS pixels, integers)
짝Counterpart: vanilla-engine InputManager.get_canvas_native_input_position
뷰의 입력 위치 갱신.
Updates the view's input position.
- positionVector2
- 뷰 좌표의 자리. (받은 벡터를 반올림해 그대로 담는다)Position in view coordinates. (the given vector is rounded in place and stored as is)
짝Counterpart: vanilla-engine InputManager.set_view_input_position
뷰의 입력 위치 반환.
Returns the view's input position.
반환ReturnsVector2 뷰 좌표의 입력 위치. (정수)Input position in view coordinates. (integers)
짝Counterpart: vanilla-engine InputManager.get_view_input_position
모든 게임패드 갱신.
Updates all gamepads.
짝Counterpart: vanilla-engine InputManager.update_all_gamepads
게임패드 연결.
Gamepad connected.
- gamepadGamepad
- 연결된 게임패드. (gamepadconnected 사건의 Gamepad)The connected gamepad. (Gamepad of the gamepadconnected event)
짝Counterpart: vanilla-engine InputManager.connect_gamepad
게임패드 연결 해제.
Gamepad disconnected.
- gamepadGamepad
- 연결이 끊긴 게임패드. (gamepaddisconnected 사건의 Gamepad)The disconnected gamepad. (Gamepad of the gamepaddisconnected event)
짝Counterpart: vanilla-engine InputManager.disconnect_gamepad
게임패드 매니저 반환.
Returns the gamepad manager.
반환ReturnsGamepadManager 게임패드 매니저.The gamepad manager.
짝Counterpart: vanilla-engine InputManager.get_gamepad_manager
마우스 단추 눌림 설정. (엔진이 mousedown, mouseup 에서 부른다)
Sets the mouse button pressed state. (The engine calls it from mousedown, mouseup)
- mouseButtonnumber
- MouseButton 의 값.A MouseButton value.
- isDownboolean
- 눌렸으면 참.True if pressed.
짝Counterpart: vanilla-engine InputManager.set_mouse_button_down
마우스 단추가 눌려 있는지.
Whether the mouse button is pressed.
- mouseButtonnumber
- MouseButton 의 값.A MouseButton value.
반환Returnsboolean 눌려 있으면 참.True if held down.
짝Counterpart: vanilla-engine InputManager.is_mouse_button_down
이번 프레임에 마우스 단추를 눌렀는지. (프레임 사이에 눌렀다 뗀 것도 참)
Whether the mouse button was pressed this frame. (Pressed and released between frames is also true)
- mouseButtonnumber
- MouseButton 의 값.A MouseButton value.
반환Returnsboolean 이번 프레임에 눌렸으면 참.True if pressed this frame.
짝Counterpart: vanilla-engine InputManager.is_mouse_button_just_pressed
이번 프레임에 마우스 단추를 뗐는지.
Whether the mouse button was released this frame.
- mouseButtonnumber
- MouseButton 의 값.A MouseButton value.
반환Returnsboolean 이번 프레임에 떼어졌으면 참.True if released this frame.
짝Counterpart: vanilla-engine InputManager.is_mouse_button_just_released
마우스 왼쪽 단추만 터치로 넘길지 설정. (끄면(기본) 지금까지처럼 어느 단추든 터치다)
- 오른쪽이나 가운데 끌기를 카메라에 쓰는 게임이 켜면 그 단추로 UI 가 눌리지 않는다.
Sets whether only the left mouse button is passed as touch. (When off (default), any button is touch as before)
- If a game that uses right or middle drag for the camera turns it on, the UI is not pressed by those buttons.
- isLeftButtonOnlyboolean
- 참이면 왼쪽 단추만 터치로 넘긴다.If true, only the left button is passed as touch.
짝Counterpart: vanilla-engine InputManager.set_touch_from_left_button_only
마우스 왼쪽 단추만 터치로 넘기는지 반환.
Returns whether only the left mouse button is passed as touch.
반환Returnsboolean 왼쪽 단추만 터치로 넘기면 참.True if only the left button is passed as touch.
짝Counterpart: vanilla-engine InputManager.is_touch_from_left_button_only
캔버스의 오른쪽 클릭 메뉴를 막을지 설정. (처음은 참, 지금까지와 같다)
Sets whether to block the canvas's right-click menu. (true initially, same as before)
- isPreventedboolean
- 참이면 오른쪽 클릭 메뉴를 막는다.If true, the right-click menu is blocked.
짝Counterpart: vanilla-engine InputManager.set_context_menu_prevented
캔버스의 오른쪽 클릭 메뉴를 막는지 반환.
Returns whether the canvas's right-click menu is blocked.
반환Returnsboolean 오른쪽 클릭 메뉴를 막으면 참.True if the right-click menu is blocked.
짝Counterpart: vanilla-engine InputManager.is_context_menu_prevented
손가락이 닿음. (엔진이 touchstart 의 바뀐 손가락마다 부른다, 이미 있는 번호면 움직임으로 본다)
A finger touched. (The engine calls it for each changed finger of touchstart, an existing number is treated as a move)
- identifiernumber
- 손가락 번호. (Touch.identifier)Finger number. (Touch.identifier)
- canvasNativePositionVector2
- 캔버스 왼쪽 위 기준 자리. (CSS 픽셀)Position from the canvas top-left. (CSS pixels)
- viewPositionVector2
- 뷰 좌표의 자리.Position in view coordinates.
짝Counterpart: vanilla-engine InputManager.begin_touch_point
손가락이 움직임. (이번 프레임에 닿은 손가락은 began 그대로)
A finger moved. (A finger that touched this frame stays began)
- identifiernumber
- 손가락 번호. (Touch.identifier)Finger number. (Touch.identifier)
- canvasNativePositionVector2
- 캔버스 왼쪽 위 기준 자리. (CSS 픽셀)Position from the canvas top-left. (CSS pixels)
- viewPositionVector2
- 뷰 좌표의 자리.Position in view coordinates.
짝Counterpart: vanilla-engine InputManager.move_touch_point
손가락이 떨어짐. (닿은 목록에서 빼서 이번 프레임의 떨어진 목록에 둔다)
A finger lifted. (Removed from the touching list and put in this frame's lifted list)
- identifiernumber
- 손가락 번호. (Touch.identifier)Finger number. (Touch.identifier)
- canvasNativePositionVector2
- 캔버스 왼쪽 위 기준 자리. (CSS 픽셀)Position from the canvas top-left. (CSS pixels)
- viewPositionVector2
- 뷰 좌표의 자리.Position in view coordinates.
- isCancelledboolean
- 참이면 취소, 거짓이면 뗌.Cancelled if true, lifted if false.
짝Counterpart: vanilla-engine InputManager.end_touch_point
손가락 찾기. (없으면 null)
Finds a finger. (null if none)
- identifiernumber
- 손가락 번호. (Touch.identifier)Finger number. (Touch.identifier)
반환ReturnsTouchPoint | null 찾은 손가락. (없으면 null)The found finger. (null if none)
짝Counterpart: vanilla-engine InputManager.find_touch_point
닿아 있는 손가락 목록. (닿은 차례, 단계는 began, moved, stationary, 받은 배열을 바꾸지 않는다)
List of touching fingers. (In touch order, phases are began, moved, stationary, do not modify the received array)
반환ReturnsTouchPoint[] 닿아 있는 손가락 목록. (안의 배열 그대로)List of touching fingers. (the internal array as is)
짝Counterpart: vanilla-engine InputManager.get_touch_points
이번 프레임에 떨어진 손가락 목록. (단계는 ended, cancelled, 자리는 뗀 자리)
List of fingers lifted this frame. (Phases are ended, cancelled, position is where it was lifted)
반환ReturnsTouchPoint[] 이번 프레임에 떨어진 손가락 목록.List of fingers lifted this frame.
짝Counterpart: vanilla-engine InputManager.get_ended_touch_points
마지막으로 쓴 입력 장치 설정. (엔진이 키, 마우스, 손가락, 패드 입력에서 부른다, 게임이 바깥 입력원을 쓸 때도)
Sets the last used input device. (The engine calls it on key, mouse, finger and pad input, also when a game uses an external input source)
- inputDevicestring
- InputDevice 의 값.An InputDevice value.
짝Counterpart: vanilla-engine InputManager.set_last_input_device
마지막으로 쓴 입력 장치 반환. (처음은 손가락 기기면 touch, 아니면 keyboard)
Returns the last used input device. (Initially touch on finger devices, otherwise keyboard)
반환Returnsstring InputDevice 의 값.An InputDevice value.
짝Counterpart: vanilla-engine InputManager.get_last_input_device
마지막 입력이 손가락인지. (마우스, 키보드, 게임패드면 거짓)
Whether the last input was a finger. (false for mouse, keyboard, gamepad)
반환Returnsboolean 마지막 입력이 손가락이면 참.True if the last input was a finger.
짝Counterpart: vanilla-engine InputManager.is_touch_input
마지막으로 쓴 게임패드의 종류 설정.
Sets the kind of the last used gamepad.
- gamepadKindstring
- GamepadKind 의 값.A GamepadKind value.
짝Counterpart: vanilla-engine InputManager.set_last_gamepad_kind
마지막으로 쓴 게임패드의 종류 반환. (단추를 누르거나 스틱을 크게 기울인 패드의 이름으로 가른다, 처음은 other)
Returns the kind of the last used gamepad. (Determined by the name of the pad that pressed a button or tilted a stick far, initially other)
반환Returnsstring GamepadKind 의 값.A GamepadKind value.
짝Counterpart: vanilla-engine InputManager.get_last_gamepad_kind
브라우저 기본 동작을 막을 키 설정. (KeyboardEvent.code 목록, Tab 의 초점 옮기기, Space 의 쪽 넘기기 같은 것)
- 글자 입력칸에 초점이 있으면 막지 않는다. (isTypingInTextField)
Sets the keys whose browser default behavior is blocked. (KeyboardEvent.code list, such as Tab's focus move or Space's page scroll)
- Not blocked while a text input field has focus. (isTypingInTextField)
- keysstring[]
- 막을 키 코드 목록. (KeyboardEvent.code)List of key codes to block. (KeyboardEvent.code)
짝Counterpart: vanilla-engine InputManager.set_prevented_keys
브라우저 기본 동작을 막을 키 목록 반환. (사본)
Returns the list of keys whose browser default behavior is blocked. (copy)
반환Returnsstring[] 막는 키 코드 목록의 사본.A copy of the blocked key code list.
짝Counterpart: vanilla-engine InputManager.get_prevented_keys
그 키의 기본 동작을 막는지.
Whether the key's default behavior is blocked.
- keystring
- 키 코드. (KeyboardEvent.code, 예: "KeyW", "Space")Key code. (KeyboardEvent.code, e.g. "KeyW", "Space")
반환Returnsboolean 기본 동작을 막으면 참.True if the default action is blocked.
짝Counterpart: vanilla-engine InputManager.is_key_prevented
글자 입력칸에 쓰는 중인지. (초점이 글자 input, textarea, contenteditable, select 에 있음)
Whether typing in a text input field. (Focus is on a text input, textarea, contenteditable, select)
반환Returnsboolean 글자 입력칸에 쓰는 중이면 참.True if typing in a text input.
짝Counterpart: vanilla-engine InputManager.is_typing_in_text_field
입력 동작 반환. (동작 이름에 키, 패드 단추, 축을 묶어 읽는다, tick 마다 갱신된다)
Returns the input actions. (Reads keys, pad buttons and axes bound to action names, updated every tick)
반환ReturnsInputActions 입력 동작.Input actions.
짝Counterpart: vanilla-engine InputManager.get_input_actions
KeyCodeenum
키보드 키 식별자. (KeyboardEvent.code 의 값)
Keyboard key identifiers. (the KeyboardEvent.code values)
| 이름Name | 값Value | 설명Description |
|---|---|---|
a | KeyA | A 키.Key A. |
b | KeyB | B 키.Key B. |
c | KeyC | C 키.Key C. |
d | KeyD | D 키.Key D. |
e | KeyE | E 키.Key E. |
f | KeyF | F 키.Key F. |
g | KeyG | G 키.Key G. |
h | KeyH | H 키.Key H. |
i | KeyI | I 키.Key I. |
j | KeyJ | J 키.Key J. |
k | KeyK | K 키.Key K. |
l | KeyL | L 키.Key L. |
m | KeyM | M 키.Key M. |
n | KeyN | N 키.Key N. |
o | KeyO | O 키.Key O. |
p | KeyP | P 키.Key P. |
q | KeyQ | Q 키.Key Q. |
r | KeyR | R 키.Key R. |
s | KeyS | S 키.Key S. |
t | KeyT | T 키.Key T. |
u | KeyU | U 키.Key U. |
v | KeyV | V 키.Key V. |
w | KeyW | W 키.Key W. |
x | KeyX | X 키.Key X. |
y | KeyY | Y 키.Key Y. |
z | KeyZ | Z 키.Key Z. |
0 | Digit0 | 숫자 0 키. (글쇠 윗줄)Digit 0 key. (top row) |
1 | Digit1 | 숫자 1 키. (글쇠 윗줄)Digit 1 key. (top row) |
2 | Digit2 | 숫자 2 키. (글쇠 윗줄)Digit 2 key. (top row) |
3 | Digit3 | 숫자 3 키. (글쇠 윗줄)Digit 3 key. (top row) |
4 | Digit4 | 숫자 4 키. (글쇠 윗줄)Digit 4 key. (top row) |
5 | Digit5 | 숫자 5 키. (글쇠 윗줄)Digit 5 key. (top row) |
6 | Digit6 | 숫자 6 키. (글쇠 윗줄)Digit 6 key. (top row) |
7 | Digit7 | 숫자 7 키. (글쇠 윗줄)Digit 7 key. (top row) |
8 | Digit8 | 숫자 8 키. (글쇠 윗줄)Digit 8 key. (top row) |
9 | Digit9 | 숫자 9 키. (글쇠 윗줄)Digit 9 key. (top row) |
backspace | Backspace | 백스페이스 키.Backspace key. |
tab | Tab | 탭 키.Tab key. |
enter | Enter | 엔터 키.Enter key. |
shift | ShiftLeft | 왼쪽 시프트 키.Left Shift key. |
ctrl | ControlLeft | 왼쪽 컨트롤 키.Left Control key. |
alt | AltLeft | 왼쪽 알트 키.Left Alt key. |
capslock | CapsLock | 캡스락 키.Caps Lock key. |
escape | Escape | 이스케이프 키.Escape key. |
space | Space | 스페이스 키.Space key. |
pageup | PageUp | 페이지 업 키.Page Up key. |
pagedown | PageDown | 페이지 다운 키.Page Down key. |
end | End | 엔드 키.End key. |
home | Home | 홈 키.Home key. |
arrowleft | ArrowLeft | 왼쪽 화살표 키.Left arrow key. |
arrowup | ArrowUp | 위쪽 화살표 키.Up arrow key. |
arrowright | ArrowRight | 오른쪽 화살표 키.Right arrow key. |
arrowdown | ArrowDown | 아래쪽 화살표 키.Down arrow key. |
insert | Insert | 인서트 키.Insert key. |
delete | Delete | 딜리트 키.Delete key. |
f1 | F1 | F1 키.F1 key. |
f2 | F2 | F2 키.F2 key. |
f3 | F3 | F3 키.F3 key. |
f4 | F4 | F4 키.F4 key. |
f5 | F5 | F5 키.F5 key. |
f6 | F6 | F6 키.F6 key. |
f7 | F7 | F7 키.F7 key. |
f8 | F8 | F8 키.F8 key. |
f9 | F9 | F9 키.F9 key. |
f10 | F10 | F10 키.F10 key. |
f11 | F11 | F11 키.F11 key. |
f12 | F12 | F12 키.F12 key. |
scrolllock | ScrollLock | 스크롤 락 키.Scroll Lock key. |
semicolon | Semicolon | 세미콜론 키.Semicolon key. |
equal | Equal | 등호 키.Equal key. |
comma | Comma | 쉼표 키.Comma key. |
minus | Minus | 빼기 키.Minus key. |
period | Period | 마침표 키.Period key. |
slash | Slash | 슬래시 키.Slash key. |
backquote | Backquote | 백쿼트 키.Backquote key. |
bracketleft | BracketLeft | 왼쪽 대괄호 키.Left bracket key. |
backslash | Backslash | 역슬래시 키.Backslash key. |
bracketright | BracketRight | 오른쪽 대괄호 키.Right bracket key. |
quote | Quote | 따옴표 키.Quote key. |
meta | MetaLeft | 왼쪽 메타 키. (윈도우 키, 맥의 커맨드 키)Left Meta key. (Windows key, Command key on Mac) |
command | MetaLeft | 왼쪽 커맨드 키. (meta 와 같은 값)Left Command key. (same value as meta) |
pause | Pause | 포즈 키.Pause key. |
audiovolumeup | AudioVolumeUp | 소리 키움 키.Volume up key. |
audiovolumedown | AudioVolumeDown | 소리 줄임 키.Volume down key. |
audiomute | AudioVolumeMute | 음소거. (W3C code 표의 이름)Mute. (name from the W3C code table) |
audioplay | MediaPlayPause | 재생/멈춤. (W3C code 표의 이름, 표에 MediaPlay 는 없다)Play/pause. (name from the W3C code table, the table has no MediaPlay) |
audiostop | MediaStop | 미디어 정지 키.Media stop key. |
audioprev | MediaTrackPrevious | 이전 곡 키.Previous track key. |
audionext | MediaTrackNext | 다음 곡 키.Next track key. |
numLock | NumLock | 텐키 넘 락 키.Num Lock key. |
numpadDivide | NumpadDivide | 텐키 나누기.Numpad divide. |
numpadMultiply | NumpadMultiply | 텐키 곱하기.Numpad multiply. |
numpadSubtract | NumpadSubtract | 텐키 빼기.Numpad subtract. |
numpadDecimal | NumpadDecimal | 텐키 점.Numpad decimal point. |
numpadAdd | NumpadAdd | 텐키 더하기.Numpad add. |
numpadEnter | NumpadEnter | 텐키 엔터.Numpad enter. |
numpad0 | Numpad0 | 텐키 0.Numpad 0. |
numpad1 | Numpad1 | 텐키 1.Numpad 1. |
numpad2 | Numpad2 | 텐키 2.Numpad 2. |
numpad3 | Numpad3 | 텐키 3.Numpad 3. |
numpad4 | Numpad4 | 텐키 4.Numpad 4. |
numpad5 | Numpad5 | 텐키 5.Numpad 5. |
numpad6 | Numpad6 | 텐키 6.Numpad 6. |
numpad7 | Numpad7 | 텐키 7.Numpad 7. |
numpad8 | Numpad8 | 텐키 8.Numpad 8. |
numpad9 | Numpad9 | 텐키 9.Numpad 9. |
MouseButtonenum
마우스 단추. (MouseEvent.button 의 값)
Mouse button. (MouseEvent.button value)
| 이름Name | 값Value | 설명Description |
|---|---|---|
left | 0 | 왼쪽 단추.Left button. |
middle | 1 | 가운데 단추. (휠 누름)Middle button. (wheel press) |
right | 2 | 오른쪽 단추.Right button. |
TouchPhaseenum
손가락의 단계. (began 이번 프레임에 닿음, moved 움직임, stationary 가만히, ended 뗌, cancelled 취소)
Finger phase. (began touched this frame, moved moving, stationary still, ended lifted, cancelled cancelled)
| 이름Name | 값Value | 설명Description |
|---|---|---|
began | began | 이번 프레임에 닿음.Touched this frame. |
moved | moved | 움직임.Moved. |
stationary | stationary | 가만히 있음.Stationary. |
ended | ended | 뗌.Lifted. |
cancelled | cancelled | 취소됨. (브라우저가 터치를 거둠)Cancelled. (the browser withdrew the touch) |
InputDeviceenum
마지막으로 쓴 입력 장치.
Last used input device.
| 이름Name | 값Value | 설명Description |
|---|---|---|
keyboard | keyboard | 키보드.Keyboard. |
mouse | mouse | 마우스.Mouse. |
touch | touch | 손가락.Finger. |
gamepad | gamepad | 게임패드.Gamepad. |