Created
April 27, 2016 13:32
-
-
Save anonymous/7a7008e64eb56153d64dd516283a19d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2012,2013 Jun Wako <wakojun@gmail.com> | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. | |
You should have received a copy of the GNU General Public License | |
along with this program. If not, see <http://www.gnu.org/licenses/>. | |
*/ | |
#ifndef KEYMAP_COMMON_H | |
#define KEYMAP_COMMON_H | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <avr/pgmspace.h> | |
#include "keycode.h" | |
#include "action.h" | |
#include "action_macro.h" | |
#include "report.h" | |
#include "host.h" | |
#include "print.h" | |
#include "debug.h" | |
#include "keymap.h" | |
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; | |
extern const uint16_t fn_actions[]; | |
/* GH60 keymap definition macro | |
* K2C, K31 and K3C are extra keys for ISO | |
*/ | |
#define KEYMAP( \ | |
K00, K01, K02, K03, K04, \ | |
K11, K12, K13, K14, K15, \ | |
K21, K22, K23, K24, K25, \ | |
K31, K32, K33, K34, K35, \ | |
K43, K45 \ | |
) { \ | |
{KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_NO}, \ | |
{KC_NO, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15 }, \ | |
{KC_NO, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25 }, \ | |
{KC_NO, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35 }, \ | |
{KC_NO, KC_NO, KC_NO, KC_##K43, KC_NO, KC_##K45 } \ | |
} | |
/* ANSI valiant. No extra keys for ISO */ | |
#define KEYMAP_ANSI( \ | |
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | |
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | |
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ | |
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ | |
K40, K41, K42, K45, K4A, K4B, K4C, K4D \ | |
) KEYMAP( \ | |
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | |
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | |
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \ | |
K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, NO, K3D, \ | |
K40, K41, K42, K45, NO, K4A, K4B, K4C, K4D \ | |
) | |
#define KEYMAP_HHKB( \ | |
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49,\ | |
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | |
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ | |
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ | |
K40, K41, K42, K45, K4A, K4B, K4C, K4D \ | |
) KEYMAP( \ | |
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ | |
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ | |
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, NO, K2D, \ | |
K30, NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ | |
K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D \ | |
) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment