Commented out everything I want other than the vim home keys

This commit is contained in:
2022-08-22 21:15:16 -06:00
committed by GitHub
parent f4aa0fa923
commit debed25db2

View File

@@ -331,9 +331,11 @@ vector<InterceptedKey *> *initInterceptedKeys() {
InterceptedKeyLayer *space = new InterceptedKeyLayer(KEY_SPACE, KEY_SPACE); InterceptedKeyLayer *space = new InterceptedKeyLayer(KEY_SPACE, KEY_SPACE);
// special chars // special chars
/*
space->addMapping(KEY_E, KEY_ESC); space->addMapping(KEY_E, KEY_ESC);
space->addMapping(KEY_D, KEY_DELETE); space->addMapping(KEY_D, KEY_DELETE);
space->addMapping(KEY_B, KEY_BACKSPACE); space->addMapping(KEY_B, KEY_BACKSPACE);
*/
// vim home row // vim home row
space->addMapping(KEY_H, KEY_LEFT); space->addMapping(KEY_H, KEY_LEFT);
@@ -341,6 +343,7 @@ vector<InterceptedKey *> *initInterceptedKeys() {
space->addMapping(KEY_K, KEY_UP); space->addMapping(KEY_K, KEY_UP);
space->addMapping(KEY_L, KEY_RIGHT); space->addMapping(KEY_L, KEY_RIGHT);
/*
// vim above home row // vim above home row
space->addMapping(KEY_Y, KEY_HOME); space->addMapping(KEY_Y, KEY_HOME);
space->addMapping(KEY_U, KEY_PAGEDOWN); space->addMapping(KEY_U, KEY_PAGEDOWN);
@@ -371,9 +374,11 @@ vector<InterceptedKey *> *initInterceptedKeys() {
space->addMapping(BTN_RIGHT, BTN_FORWARD); space->addMapping(BTN_RIGHT, BTN_FORWARD);
// @FIXME: this is not working, even though `wev` says keycode 99 is Print // @FIXME: this is not working, even though `wev` says keycode 99 is Print
// PrtSc -> Context Menu
space->addMapping(KEY_SYSRQ, KEY_CONTEXT_MENU);
PrtSc -> Context Menu
space->addMapping(KEY_SYSRQ, KEY_CONTEXT_MENU);
*/
/*
// tap caps for esc, hold for ctrl // tap caps for esc, hold for ctrl
InterceptedKeyModifier *caps = InterceptedKeyModifier *caps =
new InterceptedKeyModifier(KEY_CAPSLOCK, KEY_ESC, KEY_LEFTCTRL); new InterceptedKeyModifier(KEY_CAPSLOCK, KEY_ESC, KEY_LEFTCTRL);
@@ -381,14 +386,14 @@ vector<InterceptedKey *> *initInterceptedKeys() {
// tap enter for enter, hold for ctrl // tap enter for enter, hold for ctrl
InterceptedKeyModifier *enter = InterceptedKeyModifier *enter =
new InterceptedKeyModifier(KEY_ENTER, KEY_ENTER, KEY_RIGHTCTRL); new InterceptedKeyModifier(KEY_ENTER, KEY_ENTER, KEY_RIGHTCTRL);
*/
// @NOTE: modifier keys must go first because layerKey.processInterceptedHeld // @NOTE: modifier keys must go first because layerKey.processInterceptedHeld
// emits mapped key as soon as the for loop calls layerKey.process.. // emits mapped key as soon as the for loop calls layerKey.process..
// if that process is run before modifierKey.process, the modifier key will // if that process is run before modifierKey.process, the modifier key will
// not be emitted // not be emitted
vector<InterceptedKey *> *interceptedKeys = new vector<InterceptedKey *>(); vector<InterceptedKey *> *interceptedKeys = new vector<InterceptedKey *>();
interceptedKeys->push_back(caps); //interceptedKeys->push_back(caps);
interceptedKeys->push_back(enter); //interceptedKeys->push_back(enter);
interceptedKeys->push_back(space); interceptedKeys->push_back(space);
return interceptedKeys; return interceptedKeys;
} }