danvim / Procal

2 stars 0 forks source link

Convert key input to tokens to insert and make possible to easily be deleted #5

Closed danvim closed 7 years ago

danvim commented 7 years ago

When the user presses a key in a normal state or in "shift" or "alpha", the key (i.e. the ID of the input key) should be passed to a centralized method, e.g.:

boolean keyInput(String key) {
    //1. get token text from perhaps an enum, e.g. "clear memory" -> "ClrMemory"
    //   if key is invalid (safety test), return false
    //2. insert resulting token text in the matrix display at cursor, with possibility to be deleted as a whole and not character by character. (A "span" might help). Return true.
}
danvim commented 7 years ago

Done