aboutsummaryrefslogtreecommitdiff
path: root/layouts/community/ergodox/osx_neo2/visualizer.c
diff options
context:
space:
mode:
authorMorton Jonuschat <yabawock@gmail.com>2019-05-14 12:12:29 -0700
committerDrashna Jaelre <drashna@live.com>2019-05-14 12:12:29 -0700
commit7c0f2ae6d1c1d3f168a5919287b6608b092b3dba (patch)
tree27df17fe5de7d7e7dab840828277c77233c05995 /layouts/community/ergodox/osx_neo2/visualizer.c
parent93a97ec6e5a8f193bb96bba1636b7f67cd47d3fc (diff)
downloadqmk_firmware-7c0f2ae6d1c1d3f168a5919287b6608b092b3dba.tar.gz
qmk_firmware-7c0f2ae6d1c1d3f168a5919287b6608b092b3dba.zip
[Keymap] Neo2 for ErgoDox on MacOS US QWERTY / ABC Extended keymap (#5862)
This is a Neo2 inspired layout that is meant to be fully usable on MacOS when used with the default US QWERTY/ABC Extended keymap. Neo2 layers 1-4 have been almost fully implemented in hardware. Layers 5 and 6 (greek and mathematical symbols) have been left out for now as most of them aren't available on the default keymaps. Layer toggling for layer 3 on the right hand side utilizes a tap-toggle approach that is a combination of MO & LT macros. This is required to allow sending Y when tapped, @ when tapped while the SHIFT modifier is active and support momentarily toggling the layer while the key is held.
Diffstat (limited to 'layouts/community/ergodox/osx_neo2/visualizer.c')
-rw-r--r--layouts/community/ergodox/osx_neo2/visualizer.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/layouts/community/ergodox/osx_neo2/visualizer.c b/layouts/community/ergodox/osx_neo2/visualizer.c
new file mode 100644
index 000000000..653201bb8
--- /dev/null
+++ b/layouts/community/ergodox/osx_neo2/visualizer.c
@@ -0,0 +1,47 @@
1#include "layers.h"
2#include "simple_visualizer.h"
3#include "util.h"
4
5static void get_visualizer_layer_and_color(visualizer_state_t *state) {
6 uint8_t layer = biton32(state->status.layer);
7
8 // Go from highest to lowest layer to get the right text/color combination.
9 switch (layer) {
10 // #AEB2F4 / hsv(65.71%, 28.69%, 95.69%)
11 case FKEYS:
12 // #F4AEDC / hsv(89.05%, 28.69%, 95.69%)
13 state->layer_text = "FUNCTION KEYS";
14 state->target_lcd_color = LCD_COLOR(228, 73, 245);
15 break;
16 case US_1:
17 // #F4B993 / hsv(6.53%, 39.75%, 95.69%)
18 state->layer_text = "QWERTY";
19 state->target_lcd_color = LCD_COLOR(17, 102, 245);
20 break;
21 case NEO_6:
22 // #F4E393 / hsv(13.75%, 39.75%, 95.69%)
23 state->layer_text = "NEO: 6";
24 state->target_lcd_color = LCD_COLOR(35, 102, 245);
25 break;
26 case NEO_5:
27 // #C6F493 / hsv(24.57%, 39.75%, 95.69%)
28 state->layer_text = "NEO: 5";
29 state->target_lcd_color = LCD_COLOR(63, 102, 245);
30 break;
31 case NEO_4:
32 // #8EEBC9 / hsv(43.91%, 39.57%, 92.16%)
33 state->layer_text = "NEO: 4";
34 state->target_lcd_color = LCD_COLOR(112, 101, 189);
35 break;
36 case NEO_3:
37 // #93D2F4 / hsv(55.84%, 39.75%, 95.69%)
38 state->layer_text = "NEO: 3";
39 state->target_lcd_color = LCD_COLOR(143, 102, 245);
40 break;
41 default:
42 // #EEEEEE / hsv(0%, 0%, 93%)
43 state->layer_text = "NEO: 1";
44 state->target_lcd_color = LCD_COLOR(0, 0, 255);
45 break;
46 }
47}