Commit Graph
1543 Commits
Author SHA1 Message Date
László Monda e12996d444 Light up every LED without screwing up I2C communication. 2017-01-09 15:00:57 +01:00
László Monda c44d75f1bc Enable as many LED rows as possible without interfering with I2C communication. 2017-01-09 02:40:20 +01:00
László Monda 74c965190c Explicitly run the relevant build when starting debug configurations. 2017-01-07 18:39:10 +01:00
László Monda 1433b57a46 Add update config and apply config protocol commands. 2017-01-07 03:26:44 +01:00
László Monda a74c6016f5 Disable LEDs by default because they make I2C communication unreliable on (at least) one prototype. 2017-01-06 22:48:43 +01:00
László Monda 5d1df4449e Merge pull request #29 from algernon/f/deserialize
WIP: Initial deserialization code
2017-01-06 18:55:43 +01:00
László Monda 8c29c99ef4 Merge pull request #28 from algernon/f/key_action_t/updates
Minor key_action_t updates
2017-01-06 13:17:17 +01:00
Gergely Nagy 3c817f0b1b deserialize: Initial layer deserialization
So far, the code is able to deserialize and apply a single layer, as saved by
the Agent in binary format. It does not support macros and keymap switching
yet (it parses the latter, but will choke on the former), but the rest should be
handled fine.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2017-01-06 09:05:00 +01:00
Gergely Nagy 00214eac7e action.h: Rename switchKeymap.layer to switchKeymap.keymap
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2017-01-06 08:09:03 +01:00
Gergely Nagy 901814be2f action.h: Add keystroke.longpress and switchLayer.isToggle
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2017-01-06 08:09:03 +01:00
László Monda f76d17279e Change the merge sensor pin for the v7 PCB. 2017-01-05 21:02:28 +01:00
László Monda fb79862cee Clean up coding style a bit. 2017-01-05 19:29:08 +01:00
László Monda ce1b16f406 Remove LED jumper and ISO jumper related code, as the presence of LEDs and ISO/ANSI configuration will be stored in the hardware configuration area of the EEPROM instead of using solder jumpers. 2017-01-05 19:25:39 +01:00
László Monda a817118eb3 Change test LED pin for the v7 PCB. 2017-01-03 02:29:50 +01:00
László Monda d1040653a1 Add build and debug configuration files for version 6 and version 7 of the left keyboard half. 2017-01-03 02:11:34 +01:00
László Monda ec59922a23 Tweak module and layer comments a bit. 2017-01-03 01:46:45 +01:00
László Monda e2b2f6c5a9 Rename key action fields. 2017-01-03 01:35:33 +01:00
László Monda f09cc2d89c Deduplicate the body of clearKeymasks() and rename it to clearKeymask() 2017-01-03 01:27:00 +01:00
László Monda 46891f6a7f Deduplicate the memcpy() calls of HandleKeyboardEvents() 2017-01-03 01:22:04 +01:00
László Monda c2e25b8007 Deduplicate the gist of HandleKeyboardEvents() 2017-01-03 01:20:20 +01:00
László Monda 2457f3b0e0 Add CurrentKeyStates and PreviousKeyStates globals and use them across the whole codebase. 2017-01-03 01:09:00 +01:00
László Monda 3942d089de Rename keyMatrix to KeyMatrix because it's a global. 2017-01-02 23:11:24 +01:00
László Monda c1a6eaffde Don't inline getKeycode(). Do some coding style fixes. 2017-01-02 23:09:22 +01:00
László Monda 47c7863026 Move keyMatrix to main.c and only initialize it once in main() 2017-01-02 22:55:23 +01:00
László Monda 64ca3001de Merge readLeft() into UsbKeyboardTask() 2017-01-02 22:16:08 +01:00
László Monda 0c404f324d Rename a couple of key action related type names and enum values. 2017-01-02 21:25:38 +01:00
László Monda cda497e5ac Write key instead of k. 2017-01-02 21:14:44 +01:00
László Monda 38245d9749 Zero the content of GenericHidOutBuffer before processing protocol commands. 2017-01-02 21:09:11 +01:00
László Monda af1741ae4e Use I2cRead() and I2cWrite() wherever possible. 2017-01-02 19:29:13 +01:00
László Monda 714a6a9b1a A scancode always occupies 1 byte so removing the sizeof() 2017-01-02 18:16:33 +01:00
László Monda 844a3609fc Rename key_toggled_on() to hasKeyPressed(), key_is_pressed() to isKeyPressed(), and key_toggled_off() to hasKeyReleased() 2017-01-02 18:04:44 +01:00
László Monda 3331192cfa Simplify the expression of isWheelAction. Add missing braces. 2017-01-02 17:56:52 +01:00
László Monda 8062e50091 Add separate build and debug configurations for v6 and v7 PCBs. 2017-01-02 17:15:57 +01:00
László Monda e543068df1 Use the UHK_PCB_MAJOR_VERSION macro instead of PROTOTYPE_VERSION_7 2017-01-02 14:35:30 +01:00
László Monda 30f9373e47 Enable LEDs by default. 2016-12-21 11:44:25 +01:00
László Monda 82d61d36d5 Add updated key matrix for the left half of the 7th generation prototype. 2016-12-21 09:06:05 +01:00
László Monda 1639f82e63 Add right keyboard matrix initialization for the 7th generation prototype and create a new build and debug configuration for it. KDS doesn't add the macro for some reason. 2016-12-21 08:34:11 +01:00
László Monda 61fa9c4bd8 Implement JumpToBootloader() based on Santiago's snippet. 2016-12-17 01:31:50 +01:00
László Monda ebb13da49d Merge pull request #26 from algernon/f/mouse-actions
Mouse action handling
2016-12-15 19:50:12 +01:00
Gergely Nagy 5e48da5a7a Code cleanup
Move a few defines from action.c to action.h.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2016-12-15 18:37:30 +01:00
Gergely Nagy 39dd0df58c Move keyboard event handling into action.c
Since keyboard_layout.[ch] has gained more features, and handles more than just
filling out the keyboard report, move it to action.[ch] instead. I see no sane
way to separate the keyboard and mouse report filling, unless we want to loop
over key states twice, hence them being in the same file.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2016-12-15 18:32:28 +01:00
Gergely Nagy 440c6d8ca8 Initial implementation of mouse actions
This implements the mouse action handling. There is no acceleration while
holding the mouse movement keys yet, though, that will be a separate step.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2016-12-15 18:30:51 +01:00
László Monda 21174c1b4f Merge pull request #25 from algernon/h/window-switch-fix
Fix Mod+d to be Alt+Tab
2016-12-15 11:44:18 +01:00
Gergely Nagy 981305e48d Fix Mod+d to be Alt+Tab
Due to a copy & paste error, Mod+d was doing Shift+Tab instead of Alt+Tab, this
fixes that.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2016-12-15 07:32:15 +01:00
László Monda 0842d3bbb1 Merge pull request #24 from algernon/f/factory-layout
Rearrange the layout to follow the factory layout more closely
2016-12-14 23:10:51 +01:00
Gergely Nagy 03b73b052d Initial Mouse layer layout
This sets up the `Mouse` layer to have all the keys in their right place, even
if they do nothing for now. A number of enums were introduced to make it easier
to describe mouse key behaviour.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2016-12-14 16:57:52 +01:00
Gergely Nagy 10feafdb8b Update the layout to be closer to the factory layout
Adds `Fn` and `Mouse` layers, so the switcher keys actually work. Also
rearranged `Mod` to follow the factory layout, with the added change that
`Shift` keys are also included on the layer. The `Fn` layer was laid out,
according to the factory layout. The `Mouse` layer is mostly empty, except for
some modifiers and the switcher key.

The most significant difference from the factory layout is that modifiers are
present on all layers, in the same position.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2016-12-14 16:55:04 +01:00
László Monda 8caae7f65f Merge pull request #23 from algernon/f/led-display/layer-leds
Light up LEDs on the display when switching layers
2016-12-13 23:42:28 +01:00
Gergely Nagy a59dcd1662 Lift out the LED brightness into a global
Instead of passing the same constant to LedDisplay_SetLayerLed() all the time,
lift it out into a global.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2016-12-13 23:23:16 +01:00
Gergely Nagy 2a7edbce6f Light up LEDs on the display when switching layers
When switching layers, light up the appropriate LED on the display. For this
purpose, start led_display.[ch], which as a start, has a function to set the
brightness of a layer led.

The function will also turn all other LEDs off, and turn all of them off when on
the base layer.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2016-12-13 20:34:43 +01:00