Replies: 3 comments 1 reply
-
|
I'm not sure that I understand the ask, more concrete examples with minimal configurations may help. From my interpretation, seems like you could use switch to modify keys on an arbitrary layer, modifying its behaviour through TCP virtual/fake key actions. |
Beta Was this translation helpful? Give feedback.
-
|
You're absolutely right — operating on virtual keys is far safer than manipulating variables directly. Therefore, my goal is to fulfill the following use case: (defvar l_tab l_tab_default)
(defsrc
tab caps
)
(deflayermap (l_base)
tab (layer-while-held $l_tab)
caps (layer-while-held $l_edit)
)
(deflayer (l_tab_browser)
...
)
(deflayer (l_tab_code)
...
)
(defvirtualkeys
vk_browser (set $l_tab l_tab_browser)
vk_vscode (set $l_tab l_tab_code)
)External tools can trigger these behaviors using commands like: {"ActOnFakeKey":{"name":"vk_browser","action":"Tap"}}or {"ActOnFakeKey":{"name":"vk_vscode","action":"Tap"}}Of course, modifying the base layer directly could also achieve this goal. However, adding support for variable assignment would make the configuration far more flexible — enabling more combinations and reducing the overall length of the configuration code. |
Beta Was this translation helpful? Give feedback.
-
|
Got it, I understand what you mean now. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to modify only a sublayer? My idea is to achieve this by defining a sublayer as a variable + remotely modifying the variable value via TCP—this would allow us to change the binding logic of just a single sublayer (for example, altering the key-triggered ChangeVar winlayer=l_code to winlayer=l_browser), instead of switching the entire layer with ChangeLayer.
Beta Was this translation helpful? Give feedback.
All reactions