You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to fit a more powerful keystroke capturer under Concord's keyboard handling code, but I'm ready to debug the resulting code. The problem is that none of the JavaScript key handlers will decode an existing event, they have to actually capture the event and call back to the app. Maybe there's an exception, if such a toolkit exists, that would make the systematization of Concord's keystroke handling simple enough to attempt.
$(document).on ("keydown", function (event) {
var cmdString = keyboardManager.process (event);
switch (cmdString) {
case "uparrow":
moveCursorUp ();
break;
//more cases follow
})
I get that this is hard to do given the browsers ridiculous model for keystroke handling. This kind of stuff should be baked into the browser. The event should have a string that virtualizes the keyboard. Only a videogame or serious graphics app needs the kind of power in the interface for the keyboard, but we all have to handle all the keys as separate events.
Activity
scripting commentedon Feb 18, 2020
This seems useful.
https://w3c.github.io/uievents/tools/key-event-viewer.html
interstar commentedon Feb 22, 2020
The P5 library has something like this : https://p5js.org/reference/#/p5/keyPressed
I don't know if that's useful