I am trying to bind the Insert key to a default action (toggle_unread) via a plugin of mine, but all I get in the console is “keyeventToAction [some garbage character I can’t even copy to clipboard] => false”.
One would think that “(45)” would do the trick just fine (see https://keycode.info)
maybe it’s a different code in keydown? you can try changing that debugging message so it also logs keycodes (also if you do that, file a PR, this could be useful).
// Arrow buttons and escape are not reported via keypress, handle them via keydown.
// escape = 27, left = 37, up = 38, right = 39, down = 40, pgup = 33, pgdn = 34
if (event.type == "keydown" && event.which != 27 && (event.which < 33 || event.which > 40)) return;
to
// Arrow buttons and escape are not reported via keypress, handle them via keydown.
// escape = 27, left = 37, up = 38, right = 39, down = 40, pgup = 33, pgdn = 34, insert = 45, delete = 46
if (event.type == "keydown" && event.which != 27 && (event.which < 33 || event.which > 46)) return;