Gergely Nagy
da2bc4d656
Expose a way to set the timeOut
...
Fixes #6 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
d2fcb75844
Expose the timeOut variable
...
Fixes #4 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
014d7f69be
Expose the timeOut
...
Fixes #1 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
263b12151c
Expose the timeOut (and rename it)
...
Fixes #1 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
cb732da530
Expose the timeOut
...
Fixes #2 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
df28f6db57
Use 20 instead of DEFAULT_TIMEOUT
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
c2fa06994b
Fix the library name in library.properties
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
79baac1eae
Updated the example for the LEDEffect-Numlock -> Numlock rename
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
89b92927e4
Rename to Keyboardio-Numlock
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Jesse Vincent
da8ed2784a
Merge pull request #94 from algernon/f/hook/drop-deprecated
...
hooks: Drop the deprecated functions
8 years ago
Jesse Vincent
b06b2fcc73
Merge pull request #2 from keyboardio/f/macroification
...
Turn the plugin into a macro
8 years ago
Jesse Vincent
ae762ee9c7
Merge pull request #1 from keyboardio/f/positions
...
Make the macros aware of the row/col they were pressed at
8 years ago
Gergely Nagy
1ded7dc1a8
Update to the new macro/toggleNumlock variants
...
Uses `Macros.row` and `Macros.col`, and the new, user-friendly aliases.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
17046f281e
Introduce two helper macros
...
`TOGGLENUMLOCK` is the index of the macro, to be used in the `macroAction`
function, and `Key_ToggleNumlock` is to be used in the keymap, instead of
`M(0)`. This is considerably friendlier than before.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
4d22c27e8d
Use Macros.row/.col instead of macroAction params
...
To make the signature of `macroAction` simple, the `row` and `col` properties
are not passed in every time anymore, but they are available as `Macros.row` and
`Macros.col`, respectively.
This keeps the function simple, but still allows access to these properties for
the rarer case of needing them.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
5646b5658d
Turn the NumLock key into a macro
...
Instead of just switching to a layer, make it a macro. The macro will toggle the
layer and the LED effect.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
051778048d
Turn the plugin into a macro
...
The expected usage is now calling `NumLock.toggle(row, col, layer)` from within
a macro.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
ace478116f
Make the macros aware of the row/col they were pressed at
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
1c8487c77a
Adjust hexToKey for the keyCode/flags swap in Key
...
For some reason, I missed this before - correcting now.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
8431e3a48a
Make LED modes automatically use LEDControl
...
This way the end-user does not have to explicitly call
`Keyboardio.use(&LEDControl)`, it is enough to use a LED effect.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
8fc1d14630
hooks: Drop the deprecated functions
...
All of the plugins have been updated, there is no need to keep the deprecated
functions around anymore.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Jesse Vincent
84d7a3ccb0
Merge pull request #90 from algernon/f/LEDs/lift-off
...
Move the LED stuff into a plugin
8 years ago
Jesse Vincent
06e5a2b981
Merge pull request #92 from algernon/h/layers/toggle-fix
...
layers: Fix the layer toggle behaviour
8 years ago
Gergely Nagy
975cd0bf04
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
dcd8d8405e
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
fbe6293655
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
2ba371c9e6
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
e5fabbce79
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
84b2b6ad62
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
6a8eb4dd48
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
6497d3ae8f
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
71815cd0f3
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
ba0b69bb89
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
5394fc834f
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
dd266fd27d
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
9a2f79e42d
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
7dbb5b39e0
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
bb2df55e09
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
93bd914296
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
a2ce233531
Use the new, double-add protected hook functions
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Jesse Vincent
572f3407da
Merge pull request #91 from algernon/f/hooks/double-register-protection
...
hooks: Double-registration protection
8 years ago
Jesse Vincent
93d6f46953
Merge pull request #93 from algernon/f/NumLock
...
key_defs: Add Key_NumLock
8 years ago
Gergely Nagy
7057b0864c
Minor code cleanup
...
Remove a stray "private", that is not used or needed anymore.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
2c24a5163e
key_defs: Add Key_NumLock
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
ed92d5109c
Fix the LED mode handling
...
First of all, to disallow switching to LEDNumlock, we need to do the check in
the `.init()` method, not in `.setup()`. Second, tracking the previous LED mode
can be done a lot simpler - and a lot reliably.
With these changes, the NumLock LED effect works as it is expected to.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
361df26094
layers: Fix the layer toggle behaviour
...
When toggling a layer, the same keycode should toggle the layer off, too.
Without this, toggling layers won't work at all, because the target layer will
never be turned off.
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
420e1e9eac
Adjusted for the separate LED effect plugins
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
563a9e9ad3
Lifted out from Keyboardio-LEDControl
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
86eaa90abd
Lifted out from Keyboardio-LEDControl
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago
Gergely Nagy
5df5b209d7
Lifted out from Keyboardio-LEDControl
...
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
8 years ago