This function gives similar behavior to sticky keys for modifiers
available on most operating systems. It is considered an accessibility
feature because it alleviates the user from having to hold down
modifiers while pressing a key to produce the modified key function. It
is useful for fast touch typing because you can avoid chording motions
which both strain your hands and take your hands out of home-row
position while pressing normal alpha keys.
This function emulates the 3-state behavior which is default on OS X
and optional in Windows where the modifier cycles between
Off->Once->Locked states. This is particularly handy for symbol layers
where you typically only type one symbol before you want to return to
unmodified typing (layer 0), e.g. 'if (condition) { a = "b" + "c"; }'.
If you assign a symbol layer to a thumb key as a layer sticky cycle,
you can type the entire line of code without taking your hands out of
home row position and you do not need to toggle off the layer after
each symbol is pressed, only immediately before keying the symbol.
The exact behavior of the layer sticky cycle function is defined as
follows for each state:
1) One time down (set on key press) - The layer was not active and the
key has been pressed but not yet released. The layer is pushed in the
one time down state.
2) One time up (set on key release) - The layer was active when the
layer sticky key was released. If a key on this layer (not set to
transparent) was pressed before the key was released, the layer will be
popped. If a non-transparent key was not pressed, the layer is popped
and pushed again in the one time up state.
3) Locked (set on key press) - The layer was active and in the one time
up state when the layer sticky key was pressed again. The layer will be
popped if the function is invoked on a subsequent keypress.
i like the original one better. i'll find another way to make the
filenames small for the most current ones on dropbox, so that they're
easy for people to find.
Merge branch 'dev'
still a candidate for release with keyboard :) -- still -- gona stop
saying that with every merge, lol
- the svg/html output that documents the layout looks a lot better now
- merged in a colemak layout from jjt on github
- made a make target in the toplevel to make it easy for me to generate
a sepatate .hex file for every layout (for posting to the downloads
page)
------- jjt -------
I increased the spacing of the layout sections and made all layers follow the
spacing for consistency.
I also made changes to the positions of the layer keys, added a number symbol
row on layer 1 (I found it easier to reach) and made a QWERTY layer, mostly for
gaming. And I switched the primary thumb buttons, also for gaming.
-------------------
Merge branch 'dev'
- changed the way layers are handled!
- reorganized a bunch
- updated some documentation and such
- updated USB IDs
- now compiling in OS X (though it *should* still work in linux and
windows (except the toplevel build script is unix only) - it's a bug
if it doens't)
- toplevel build script now generates a lot more, including a bunch of
information in JSON meant for the UI, and an html file thats a
currently-very-bad picture of the layout that was compiled
- rewrote the layer functions in main() (easiest way to get the to
work.. :) )
- fixed the keymap (i had the numpad keys pushing layer 2 instead of
layer 3)
- changed the numlock keycode.. i was using the wrong one, lol
- and some minor aesthetic changes
- NOT TESTED YET. still need to do that
- also, got an idea for layer masking...
possible future changes:
- i'd like to make the layer matrices just '_kb_layout_values', and
'_kb_layout_functions'.
- i'd like to make layer masks implemented with a special function
'kbfun_layermask_transparent' or something similar. a function that
looks up what would have been pressed if that layer wasn't active.
they could be chainable, i.e. a lookup for such a function could end
up calling the same function (if two layermasks were active on top of
on another), which would then call a real key. these wouldn't be
allowed on the base layer, of course... and then, all i'd have to do
to keep track of layers would be keep a variable length array (or
not... maybe an array of length 10 or something) of which layer is
active... :)
- i'd like to have a thing (this isn't a very complete thought yet)
where keypresses are looked up first in the EEPROM, to see if there's
a definition there. if there isn't (which should usually be the case)
then the standard definition for that key from the matrices would be
used. this would allow macros (and redefinitions) without reflashing.
this would also be convenient, once the mechanism was implemented, for
assigning keys multiple decomposable actions... dunno exactly how
it'll work out yet though. layer stuff comes first.
Dev Catchup Pull Request - johnfonte
(merge branch master with dev)
See commit history. Primarily:
- the build process changed a bit to make things easier for the UI
- a couple key functions were added (including code for an integrated numpad)
- a whole bunch of stuff was reorganized
- work was started on changing the way layers and layer switching are handled
- things were updated for the new PCB prototype by Fredrik (bpiphany) (and diode direction is now selectable during compilation by setting some macros in src/keyboard/ergodox/options.h)
Everything tests out on the breadboard, and with the PCB as far as I can tell. I don't know if testing has been done with a complete keyboard using the new PCB yet.