MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / button_toggle

Function button_toggle

pdflinux.js:195–207  ·  view source on GitHub ↗
(key_str)

Source from the content-addressed store, hash-verified

193
194var pressed_list = [];
195function 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
209function key_pressed(key_str) {
210 let key_lower = key_str.toLowerCase();

Callers

nothing calls this directly

Calls 2

button_upFunction · 0.85
button_downFunction · 0.85

Tested by

no test coverage detected