From 461109e695f163303549648d93dc7d9253e88b81 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 25 Jun 2019 13:56:52 +0200 Subject: For the top row, return the num key when a modifier is active. This is useful with a window manager like i3: without this macro it doesn't see the difference between $mod+R0C2 (switch to workspace #2) and $mod+shift+R0C2 (move focused container to workspace #2), as R0C2 triggers LSHIFT(Key_2). --- src/keymap.h | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) (limited to 'src/keymap.h') diff --git a/src/keymap.h b/src/keymap.h index 2f4d5bd..35826f3 100644 --- a/src/keymap.h +++ b/src/keymap.h @@ -19,6 +19,8 @@ #pragma once +#include "Macros.h" + /* Layers */ enum { DVORAK @@ -28,36 +30,25 @@ enum { , LAYER_MAX = NUM }; -#define Key_AT LSHIFT(Key_2) -#define Key_STAR LSHIFT(Key_8) -#define Key_DOLLR LSHIFT(Key_4) -#define Key_CARET LSHIFT(Key_6) -#define Key_PRCNT LSHIFT(Key_5) -#define Key_EXCLM LSHIFT(Key_1) -#define Key_HASH LSHIFT(Key_3) -#define Key_AND LSHIFT(Key_7) -#define Key_LCB LSHIFT(Key_LeftBracket) -#define Key_RCB LSHIFT(Key_RightBracket) -#define Key_Plus LSHIFT(Key_Equals) - #define Key_PlayPause Consumer_PlaySlashPause +#define Key_Plus LSHIFT(Key_Equals) #define Key_Underscore LSHIFT(Key_Minus) /* Keymaps */ KEYMAPS( [DVORAK] = KEYMAP_STACKED( - ___, Key_LCB, Key_AT, Key_STAR, Key_DOLLR, Key_CARET, ___ - , Key_Backtick, Key_Quote, Key_Comma, Key_Period, Key_P, Key_Y, TD(LPB) - , Key_Tab, Key_A, Key_O, Key_E, Key_U, Key_I - , Key_Menu, Key_Slash, Key_Q, Key_J, Key_K, Key_X, TD(COLON) + ___, M(LEFT_BRACKET), M(AT), M(STAR), M(DOLLAR), M(CARET), ___ + , Key_Backtick, Key_Quote, Key_Comma, Key_Period, Key_P, Key_Y, TD(LPB) + , Key_Tab, Key_A, Key_O, Key_E, Key_U, Key_I + , Key_Menu, Key_Slash, Key_Q, Key_J, Key_K, Key_X, TD(COLON) , OSM(LeftControl), Key_Backspace, OSM(LeftShift), Key_Escape , OSL(NAV) - , ___, Key_PRCNT, Key_EXCLM, Key_HASH, Key_AND, Key_RCB, ___ - , TD(RPB), Key_F, Key_G, Key_C, Key_R, Key_L, Key_Backslash - , Key_D, Key_H, Key_T, Key_N, Key_S, Key_Minus - , Key_Equals, Key_B, Key_M, Key_W, Key_V, Key_Z, ___ + , ___, M(PERCENT), M(BANG), M(HASH), M(AMPERSAND), M(RIGHT_BRACKET), ___ + , TD(RPB), Key_F, Key_G, Key_C, Key_R, Key_L, Key_Backslash + , Key_D, Key_H, Key_T, Key_N, Key_S, Key_Minus + , Key_Equals, Key_B, Key_M, Key_W, Key_V, Key_Z, ___ , ___, Key_Enter, Key_Spacebar, OSM(RightAlt) , OSL(NUM) -- cgit v1.2.3