From c08df8dc25e78958a099a4463db39f2e39d20d97 Mon Sep 17 00:00:00 2001 From: Stefan Dorn Date: Thu, 4 Feb 2016 14:18:46 +0000 Subject: [PATCH] layers are a bit easier now --- generate_layout.rb | 16 +++++++--------- src/keyboard/ergodox/layout/saneo-mod.c | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/generate_layout.rb b/generate_layout.rb index aa5ab46..e5a87c9 100755 --- a/generate_layout.rb +++ b/generate_layout.rb @@ -162,9 +162,7 @@ class Key "shift_r" => "KEY_RightShift", "scroll_lock" => "KEY_ScrollLock", # - "punc" => "1", - "nav" => "2", - "func" => "3", + "MOD" => "NULL", # "NULL" => "NULL", # @@ -302,7 +300,7 @@ keys = [ # thumb-top # letter type punc type nav type func type %w{ scroll_lock }, %w{ }, %w{ }, %w{ }, - %w{ scroll_lock }, %w{ }, %w{ }, %w{ }, + %w{ MOD func }, %w{ }, %w{ }, %w{ }, # thumb-double # letter type punc type nav type func type %w{ space }, %w{ }, %w{ }, %w{ }, @@ -353,25 +351,25 @@ keys = [ %w{ shift_r capslock }, %w{ }, %w{ }, %w{ }, # 1.5 # underbottom # letter type punc type nav type func type - %w{ nav nav }, %w{ }, %w{ }, %w{ }, + %w{ MOD nav }, %w{ }, %w{ }, %w{ }, %w{ left }, %w{ }, %w{ }, %w{ }, %w{ up }, %w{ }, %w{ }, %w{ }, %w{ down }, %w{ }, %w{ }, %w{ }, %w{ right }, %w{ }, %w{ }, %w{ }, # thumb-top # letter type punc type nav type func type - %w{ punc punc }, %w{ }, %w{ func func }, %w{ }, - %w{ nav nav }, %w{ func func }, %w{ }, %w{ }, + %w{ MOD punc }, %w{ }, %w{ MOD func }, %w{ }, + %w{ MOD nav }, %w{ MOD func }, %w{ }, %w{ }, # thumb-double # letter type punc type nav type func type %w{ menu }, %w{ }, %w{ }, %w{ }, %w{ alt }, %w{ }, %w{ }, %w{ }, - %w{ punc latch_punc }, %w{ punc punc }, %w{ NULL }, %w{ NULL }, + %w{ MOD latch_punc }, %w{ MOD punc }, %w{ NULL }, %w{ NULL }, # thumb-home # letter type punc type nav type func type %w{ menu }, %w{ }, %w{ }, %w{ }, %w{ alt }, %w{ }, %w{ }, %w{ }, - %w{ punc latch_punc }, %w{ punc punc }, %w{ NULL }, %w{ NULL }, + %w{ MOD latch_punc }, %w{ MOD punc }, %w{ NULL }, %w{ NULL }, ].each_slice(Key::Layers.size).map do |layers| Key.new layers diff --git a/src/keyboard/ergodox/layout/saneo-mod.c b/src/keyboard/ergodox/layout/saneo-mod.c index 6b6f657..52937f3 100644 --- a/src/keyboard/ergodox/layout/saneo-mod.c +++ b/src/keyboard/ergodox/layout/saneo-mod.c @@ -46,7 +46,7 @@ KEY_DownArrow, KEY_RightArrow, KEY_LeftGUI, KEY_ScrollLock, -KEY_ScrollLock, +NULL, KEY_Spacebar, KEY_LeftControl, KEY_LeftAlt, @@ -80,19 +80,19 @@ KEY_j_J, KEY_y_Y, KEY_Semicolon_Colon, KEY_RightShift, -2, +NULL, KEY_LeftArrow, KEY_UpArrow, KEY_DownArrow, KEY_RightArrow, -1, -2, +NULL, +NULL, KEY_Application, KEY_LeftAlt, -1, +NULL, KEY_Application, KEY_LeftAlt, -1), +NULL), KB_MATRIX_LAYER( NULL, @@ -169,13 +169,13 @@ NULL, NULL, NULL, NULL, -3, NULL, NULL, -1, NULL, NULL, -1), +NULL, +NULL, +NULL), KB_MATRIX_LAYER( NULL, @@ -251,7 +251,7 @@ NULL, NULL, NULL, NULL, -3, +NULL, NULL, NULL, NULL, @@ -378,7 +378,7 @@ const void_funptr_t PROGMEM _kb_layout_press[KB_LAYERS][KB_ROWS][KB_COLUMNS] = &kbfun_press_release, &kbfun_press_release, &kbfun_press_release, -&kbfun_press_release, +&kbfun_layer_enable_3, &kbfun_press_release, &kbfun_press_release, &kbfun_press_release, @@ -710,7 +710,7 @@ const void_funptr_t PROGMEM _kb_layout_release[KB_LAYERS][KB_ROWS][KB_COLUMNS] = &kbfun_press_release, &kbfun_press_release, &kbfun_press_release, -&kbfun_press_release, +&kbfun_layer_disable_3, &kbfun_press_release, &kbfun_press_release, &kbfun_press_release,