Closed aecepoglu closed 4 years ago
There is currently no way to configure the keyMap
from Hint
instances, because Krabby does create the object itself. I’m not happy with that and plan to change it.
For the time being, you can override the class method Hint.KEY_MAP
:
~/.config/krabby/config.js
Hint.KEY_MAP = () => ({
Digit1: '1', Digit2: '2', Digit3: '3', Digit4: '4', Digit5: '5', Digit6: '6', Digit7: '7', Digit8: '8', Digit9: '9', Digit0: '0',
KeyQ: 'q', KeyW: 'w', KeyE: 'e', KeyR: 'r', KeyT: 't', KeyY: 'y', KeyU: 'u', KeyI: 'i', KeyO: 'o', KeyP: 'p',
KeyA: 'a', KeyS: 's', KeyD: 'd', KeyF: 'f', KeyG: 'g', KeyH: 'h', KeyJ: 'j', KeyK: 'k', KeyL: 'l',
KeyZ: 'z', KeyX: 'x', KeyC: 'c', KeyV: 'v', KeyB: 'b', KeyN: 'n', KeyM: 'm'
})
Here are some links to figure out how things work:
EDIT
If you are looking for the keys (not the display), see the keys
class method and property in hint.js
.
the
keyMap
for instances ofHint
seem more difficult to set than those ofModal
.Can you give an example of how to do this from
config.js
? I have managed to do it by overwriting the code inpackages/hint.js
but I'd rather not do so