(key_str)
| 193 | |
| 194 | var pressed_list = []; |
| 195 | function button_toggle(key_str) { |
| 196 | if (typeof key_to_input_map[key_str] === "undefined") |
| 197 | app.alert("bad key: " + key_str); |
| 198 | if (key_status_map[key_to_input_map[key_str]]) { |
| 199 | pressed_list.splice(pressed_list.indexOf(key_str), 1); |
| 200 | button_up(key_str); |
| 201 | } |
| 202 | else { |
| 203 | pressed_list.push(key_str); |
| 204 | button_down(key_str); |
| 205 | } |
| 206 | globalThis.getField("key_status").value = "Pressed: " + pressed_list.join(", "); |
| 207 | } |
| 208 | |
| 209 | function key_pressed(key_str) { |
| 210 | let key_lower = key_str.toLowerCase(); |
nothing calls this directly
no test coverage detected