From e0f960a576e090808e5cc25c5368441c11f36ea6 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 20 Feb 2013 11:16:13 +0900 Subject: Add overlay framework --- common/action.h | 217 ++++++++++++++++++++++++++++++++------------------------ 1 file changed, 126 insertions(+), 91 deletions(-) (limited to 'common/action.h') diff --git a/common/action.h b/common/action.h index 46ae809cb7..c02a2e71fc 100644 --- a/common/action.h +++ b/common/action.h @@ -150,40 +150,41 @@ bool waiting_buffer_has_anykey_pressed(void); * * Mouse Keys * ---------- - * NOTE: can be combined with 'Other HID Usage'? to save action kind id. * ACT_MOUSEKEY(0110): * 0101|XXXX| keycode Mouse key * * * Layer Actions * ------------- - * ACT_LAYER_SET(1000): Set layer - * 1000|LLLL|0000 0000 set current layer on press and return to default on release(momentary) - * 1000|LLLL|0000 0001 set current layer on press - * 1000|LLLL|0000 0010 set current layer on release - * 1000|LLLL|0000 0011 set current layer on both - * 1000|LLLL| keycode set current layer on hold and send key on tap - * 1000|LLLL|1111 0000 set current layer on hold and toggle on several taps - * 1000|DDDD|1111 1111 set default layer on press - * L: 0 means default layer + * ACT_KEYMAP: + * 1000|LLLL|0000 0000 Reset default layer + * 1000|LLLL|0000 00xx Reset default layer and clear overlay + * 1000|LLLL| keycode Invert with tap key + * 1000|LLLL|1111 0000 Invert with tap toggle + * 1000|LLLL|1111 00xx Invert[^= L] + * 1000|LLLL|1111 0100 On/Off + * 1000|LLLL|1111 01xx On[|= L] + * 1000|LLLL|1111 1000 Off/On + * 1000|LLLL|1111 10xx Off[&= ~L] + * 1000|LLLL|1111 1100 Set/Set(0) + * 1000|LLLL|1111 11xx Set[= L] + * default layer: 0-15(4bit) + * xx: On {00:for special use, 01:press, 10:release, 11:both} * - * ACT_LAYER_BIT(1001): Bit-op layer - * 1001|BBBB|0000 0000 bit-on current layer on press and bit-off on release(momentary) - * 1001|BBBB|0000 0001 bit-xor current layer on press - * 1001|BBBB|0000 0010 bit-xor current layer on release - * 1001|BBBB|0000 0011 bit-xor current layer on both - * 1001|BBBB| keycode bit-xor current layer on hold and send key on tap - * 1001|BBBB|1111 0000 bit-xor current layer on hold and toggle on several taps - * 1001|BBBB|1111 1111 bit-xor default layer on both - * - * ACT_LAYER_SWITCH: Switch - * 1011|LLLL|0000 0000 On on press and Off on release(momentary) - * 1011|LLLL|0000 0001 Invert on press - * 1011|LLLL|0000 0010 Invert on release - * 1011|LLLL|0000 0011 Invert on both - * 1011|LLLL| keycode Invert on hold and send key on tap - * 1011|LLLL|1111 0000 Invert on hold and toggle on several taps - * 1011|LLLL|1111 1111 (not used) + * ACT_OVERLAY: + * 1011|0000|0000 0000 Clear overlay + * 1011|LLLL|0000 00ss Invert 4-bit chunk [^= L<<(4*ss)] + * 1011|LLLL| keycode Invert with tap key + * 1011|LLLL|1111 0000 Invert with tap toggle + * 1011|LLLL|1111 00xx Invert[^= 1<