SjB
9843c57f13
fix: coding style with make astyle
7 years ago
SjB
49dfa476ed
CONSUMER(key) macro to his the magic constant
...
The CONSUMER(key) macro will extra the consumer keycode from the
Key. this will return a 16bit keycode as some consumer key are 10bit.
7 years ago
SjB
8ab23033e7
Replace Key_16bit macro with a more discribtive macro CONSUMER_KEY
...
replacing the Key_16bit macro with CONSUMER_KEY macro allowed us to
add the IS_CONSUMER and SYNTHETIC flags within the CONSUMER_KEY macro
and simplify the Consumer key definitions.
7 years ago
Michael Richters
0fb2abf6bc
Added better comments to CREATE_KEYMAP() & LayerCount declarations
...
Also improved comment in Layer.on() conditional
7 years ago
Michael Richters
36b461a99a
If using an old sketch, ignore LayerCount
...
If it's an old sketch, LayerCount will default to 0, so in order for
Layer.on() to function, don't bother checking for out-of-bounds if
LayerCount == 0.
7 years ago
Michael Richters
2784d0e9a9
Use weak attribute declaration for LayerCount
...
Declaring LayerCount as a weak symbol in layers.cpp lets us override
it if the CREATE_KEYMAP macro is used to define the keymap in the
sketch file, but still allows old sketch files to compile without
errors.
Still some changes necessary to allow old sketches to work
properly (Layer.on() will abort before doing anything).
7 years ago
Michael Richters
de39e20d78
Define keymap layers with CREATE_KEYMAP macro
...
This macro allows the definition of the LayerCount variable and the
keymaps[] array together. It shouldn't break old sketches, but this is
probably not all that's necessary; LayerCount still doesn't get
initialized outside the macro.
7 years ago
Gergely Nagy
877a51a575
Merge pull request #8 from jamesnvc/readme-update-max-layers
...
Explain what max_layers should be set to in README
7 years ago
James N. V. Cash
cc0d69ea2d
Explain what max_layers should be set to in README
7 years ago
James N. V. Cash
5d53d77c6f
If layer is greater than max_layer, always fall back to EEPROM
...
Current behaviour will make higher layers not work & always return Key_NoKey
7 years ago
Gergely Nagy
c194f0135c
README.md: Document that modifiers & layer keys do not cancel OneShot
...
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
81179aaf0e
Layer keys should not cancel OneShot
...
Fixes #14 .
Signed-off-by: Gergely Nagy <kaleidoscope@gergo.csillger.hu>
7 years ago
Gergely Nagy
506f8a51d9
Merge pull request #13 from tremby/fix-blazing-trail-decay
...
Fix code typo in blazing trail decay
7 years ago
SjB
d7dea8d89a
two typos using lower case k for Key casting
7 years ago
SjB
4e33428786
using Macro to convert HID_CONSUMER_CODE to Key struct
...
created a Key_16Bit to convert the HID 16bit hex code into the
Key struct used by Kaleidoscope
7 years ago
SjB
fa13851193
Merge branch 'master' into 10bitConsumerCodeSupport
...
* master:
Back out part of 374a3e136c
because it breaks our ability to pass -D defines into code
Update key_events.cpp (IS_INTERNAL Handling)
7 years ago
Jesse Vincent
d05c3cacf8
Back out part of 374a3e136c
because it breaks our ability to pass -D defines into code
...
We need this to pass the built version into the sketch when doing
official builds
7 years ago
Jesse Vincent
c0407b2775
Merge pull request #238 from ejinks4/patch-1
...
Update key_events.cpp (IS_INTERNAL Handling)
I'm merging this for now, even though I know it's not the 'right' solution. But I'd like Mute to work correctly for MP2 keyboards and we're on deadline
7 years ago
Jesse Vincent
043ba2072b
Tweak our chatter timings to hopefully have fewer false positives
7 years ago
Jesse Vincent
c0a2b43c23
Slightly clean up our startup mode to be faster and more likely to eat
...
extra keypresses
7 years ago
Gergely Nagy
7e261efb8e
Merge pull request #7 from lydell/update-example
...
Make the example more complete
7 years ago
Gergely Nagy
fb524cc0dd
Merge pull request #5 from jamesnvc/layerwise-focus-hooks
...
Add focus hook to accept theme updates for single layers
7 years ago
Gergely Nagy
42e60891d4
Merge pull request #4 from jamesnvc/layerwise-hooks
...
Add theme focus handler for layerwise themes
7 years ago
Jesse Vincent
952198a98a
It appears that when the BIOS isn't reporting the keyboard LED state back to the keyboard, the old code resulted in sending far too many key reports. (Specifically, out of controll key repeat on OSX)
7 years ago
James N. V. Cash
ed3b211561
Formatting
7 years ago
James N. V. Cash
456e1cb82b
Update function call to keep in sync with other PR
7 years ago
James N. V. Cash
1e4f37c70d
Try to name hook function better
7 years ago
James N. V. Cash
e76fc6cfa4
Add focus hook to accept theme updates for single layers
...
Requires https://github.com/keyboardio/Kaleidoscope-LED-Palette-Theme/pull/4
7 years ago
James N. V. Cash
6a5a7166c1
Add theme focus handler for layerwise themes
7 years ago
Jesse Vincent
a860afa765
astyle. no function changes
7 years ago
Jesse Vincent
b25e7e87e2
Avoid a potential overflow bug
7 years ago
Jesse Vincent
d09ac4043d
Look for chatter across 15 scans, rather than just two.
7 years ago
Jesse Vincent
5f9be8f8f0
Clear the keyscan buffer starting to look for bounce events.
7 years ago
Jesse Vincent
54cbf18e1c
Only treat "key pressed down" events as issues for the debounce counter.
...
That way, we can look for two presses a bit more easily with only one
variable.
7 years ago
Michael Richters
50ac31d0f5
Added a "sketch-trailer.h" header file
...
This file is meant to be included in sketch files in order to make
data available to Kaleidoscope functions. In particular, the size of
the keymaps[] array (i.e. the number of defined layers), which is
needed in order to prevent reading uninitialized memory past the end
of that array due to Key_KeymapNext_Momentary.
7 years ago
Jesse Vincent
8b562fe64b
Switch to a counter for 'cycles since last state change'
...
This uses a bunch more ram, but it's much, much more flexible and the
test mode is optional in user firmware.
7 years ago
Jesse Vincent
1fb97c958b
That renaming was slightly over-aggressive
7 years ago
Jesse Vincent
3de82eb6a4
Renaming
7 years ago
Jesse Vincent
1333f30252
Switch to not trying to use 'Numlock' as a toggle.
7 years ago
Jesse Vincent
75dfcf8ccb
First pass at a new chatter detection mode
7 years ago
Michael Richters
7ddc0249bb
Added `LayerCount` variable to the example sketches
...
This took some trial and error to figure out, but once I determined
that the example sketches were being built, I made this change to keep
the build working. Hopefully this will satisfy Travis-CI.
7 years ago
Jesse Vincent
c126e1b27b
astyle
7 years ago
Jesse Vincent
2e91dd4a82
Disable hardware debouncing in testmode
7 years ago
Jesse Vincent
dbb1b95d5c
Add a public API for a device-specific feature (configurable debounce
...
time)
7 years ago
Jesse Vincent
b3ea050595
Reorder definitions and add a clarifying comment
7 years ago
Michael Richters
9db5036a5c
Make `LayerCount` available in layers.cpp
7 years ago
Michael Richters
e7f9edba2d
Added a check to prevent reading past the end of the keymaps[] array
...
This relys on the 'LayerCount' variable being correct and defined in
the firmware sketch file (along with 'keymaps')
7 years ago
Simon Lydell
4d6e1a770d
Make the example more complete
7 years ago
SjB
f57aab5f71
Support all 10bit HID Consumer code.
...
By moving the IS_CONSUMER flag to B00001000 instead of
B00000010 (swap with IS_INTERNAL) we can detect the if the key is a
consumer key and strip out the flags and use the full 10bit to send to
the hid report. This enable us to use all the Consumer_* keys
7 years ago
Jesse Vincent
3f1c80366a
Merge pull request #224 from algernon/f/getKeyboardLEDs
...
Add kaleidoscope::hid::getKeyboardLEDs()
7 years ago