GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — libprocessing/crates/processing_input/src/keys.rs at python-api · processing/libprocessing

Expand file tree

/

keys.rs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
145 lines (141 loc) · 3.3 KB
/

keys.rs

Copy path

File metadata and controls

145 lines (141 loc) · 3.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
//! The numeric key codes front ends expose (GLFW values, see
//! `processing_core::constants`) and their Bevy `KeyCode`s.
use bevy::input::keyboard::KeyCode;
use processing_core::constants as c;
use processing_core::error::{ProcessingError, Result};
macro_rules! key_table {
($($code:ident => $key:ident),* $(,)?) => {
pub fn key_code_from_u32(code: u32) -> Result<KeyCode> {
match code {
$(c::$code => Ok(KeyCode::$key),)*
_ => Err(ProcessingError::InvalidArgument(format!("unknown key code: {code}"))),
}
}
pub fn key_code_to_u32(key: KeyCode) -> Option<u32> {
match key {
$(KeyCode::$key => Some(c::$code),)*
_ => None,
}
}
};
}
key_table! {
KEY_A => KeyA,
KEY_B => KeyB,
KEY_C => KeyC,
KEY_D => KeyD,
KEY_E => KeyE,
KEY_F => KeyF,
KEY_G => KeyG,
KEY_H => KeyH,
KEY_I => KeyI,
KEY_J => KeyJ,
KEY_K => KeyK,
KEY_L => KeyL,
KEY_M => KeyM,
KEY_N => KeyN,
KEY_O => KeyO,
KEY_P => KeyP,
KEY_Q => KeyQ,
KEY_R => KeyR,
KEY_S => KeyS,
KEY_T => KeyT,
KEY_U => KeyU,
KEY_V => KeyV,
KEY_W => KeyW,
KEY_X => KeyX,
KEY_Y => KeyY,
KEY_Z => KeyZ,
KEY_0 => Digit0,
KEY_1 => Digit1,
KEY_2 => Digit2,
KEY_3 => Digit3,
KEY_4 => Digit4,
KEY_5 => Digit5,
KEY_6 => Digit6,
KEY_7 => Digit7,
KEY_8 => Digit8,
KEY_9 => Digit9,
SPACE => Space,
QUOTE => Quote,
COMMA => Comma,
MINUS => Minus,
PERIOD => Period,
SLASH => Slash,
SEMICOLON => Semicolon,
EQUAL => Equal,
BRACKET_LEFT => BracketLeft,
BACKSLASH => Backslash,
BRACKET_RIGHT => BracketRight,
BACKQUOTE => Backquote,
ESCAPE => Escape,
ENTER => Enter,
TAB => Tab,
BACKSPACE => Backspace,
INSERT => Insert,
DELETE => Delete,
RIGHT_ARROW => ArrowRight,
LEFT_ARROW => ArrowLeft,
DOWN => ArrowDown,
UP => ArrowUp,
PAGE_UP => PageUp,
PAGE_DOWN => PageDown,
HOME => Home,
END => End,
CAPS_LOCK => CapsLock,
SCROLL_LOCK => ScrollLock,
NUM_LOCK => NumLock,
PRINT_SCREEN => PrintScreen,
PAUSE => Pause,
F1 => F1,
F2 => F2,
F3 => F3,
F4 => F4,
F5 => F5,
F6 => F6,
F7 => F7,
F8 => F8,
F9 => F9,
F10 => F10,
F11 => F11,
F12 => F12,
F13 => F13,
F14 => F14,
F15 => F15,
F16 => F16,
F17 => F17,
F18 => F18,
F19 => F19,
F20 => F20,
F21 => F21,
F22 => F22,
F23 => F23,
F24 => F24,
F25 => F25,
NUMPAD_0 => Numpad0,
NUMPAD_1 => Numpad1,
NUMPAD_2 => Numpad2,
NUMPAD_3 => Numpad3,
NUMPAD_4 => Numpad4,
NUMPAD_5 => Numpad5,
NUMPAD_6 => Numpad6,
NUMPAD_7 => Numpad7,
NUMPAD_8 => Numpad8,
NUMPAD_9 => Numpad9,
NUMPAD_DECIMAL => NumpadDecimal,
NUMPAD_DIVIDE => NumpadDivide,
NUMPAD_MULTIPLY => NumpadMultiply,
NUMPAD_SUBTRACT => NumpadSubtract,
NUMPAD_ADD => NumpadAdd,
NUMPAD_ENTER => NumpadEnter,
NUMPAD_EQUAL => NumpadEqual,
SHIFT => ShiftLeft,
CONTROL => ControlLeft,
ALT => AltLeft,
SUPER => SuperLeft,
SHIFT_RIGHT => ShiftRight,
CONTROL_RIGHT => ControlRight,
ALT_RIGHT => AltRight,
SUPER_RIGHT => SuperRight,
CONTEXT_MENU => ContextMenu,
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.