(key_str)
| 207 | } |
| 208 | |
| 209 | function key_pressed(key_str) { |
| 210 | let key_lower = key_str.toLowerCase(); |
| 211 | let shift_pressed = false; |
| 212 | if (key_str === " ") { |
| 213 | key_str = "Space"; |
| 214 | } |
| 215 | //handle strings that are different than the actual key because they were pressed with shift |
| 216 | else if (keys_shifted_map[key_str] || key_lower != key_str) { |
| 217 | key_str = keys_shifted_map[key_str] || key_lower; |
| 218 | shift_pressed = true; |
| 219 | key_down(key_to_input_map["Shift"]); |
| 220 | } |
| 221 | |
| 222 | if (shift_pressed) key_down(key_to_input_map["Shift"]); |
| 223 | print_msg("pressed: " + key_str); |
| 224 | press_input(key_to_input_map[key_str]); |
| 225 | if (shift_pressed) key_up(key_to_input_map["Shift"]); |
| 226 | } |
| 227 | |
| 228 | set_interval(() => { |
| 229 | globalThis.getField("key_input").value = "Type here for keyboard inputs."; |
nothing calls this directly
no test coverage detected