Managed to refactor the keypress handling…
It doesn’t actually do anything different yet. But given that is +553 lines, -449 lines of code, I feel the need to tell people about it.
Next up tweak the way we deal with key codes and mod masks.
Then move out the implementation of each event to it’s own function, e.g. updating a pattern, the line editor.
Then maybe actually work on some features! I’m hoping to add some extra keybindings to the line editor too… e.g. C-a, C-e, C-b, C-f, C-h, C-d, C-w, M-b and M-f.