is it possible to detect and act on a chain of key presses that are sensitive to the time between keystrokes?
Something analogous to the double-click event for a mouse where the threshold time between clicks changes behaviour?
I’d like to emulate the behaviour of Brief, where the “Home” key moves to the start of the line on a single tap, to the first line on the page in response to a double tap, and to the first line in the file in response to a triple tap, as long as you tap quickly enough. “End” had similar behaviour.
I think you could make “Home” and “End” context sensitive in that:
- “Home” in the middle of a line goes to the start of the line
- “Home” pressed at the start of the line goes to the start of the first line on the page
- “Home” pressed at the start of the first line on the page goes to the start of the first line in the file
but I’d prefer to be able to tap in a way that was consistent irrespective of the context.