Fix HHKB compilation.
parent
f15e6c7081
commit
fe59947392
|
@ -49,8 +49,7 @@ TARGET_DIR = .
|
|||
|
||||
|
||||
# List C source files here. (C dependencies are automatically generated.)
|
||||
SRC += keymap_common.c \
|
||||
matrix.c \
|
||||
SRC += matrix.c \
|
||||
led.c
|
||||
|
||||
CONFIG_H = config.h
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
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/>.
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include "action.h"
|
||||
#include <avr/pgmspace.h>
|
||||
#include "keymap_common.h"
|
||||
|
||||
|
||||
/* translates key to keycode */
|
||||
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
|
||||
{
|
||||
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
|
||||
}
|
||||
|
||||
/* translates Fn keycode to action */
|
||||
action_t keymap_fn_to_action(uint8_t keycode)
|
||||
{
|
||||
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
|
||||
}
|
|
@ -32,10 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "keymap.h"
|
||||
|
||||
|
||||
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
|
||||
extern const uint16_t fn_actions[];
|
||||
|
||||
|
||||
#define KEYMAP( \
|
||||
K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \
|
||||
K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \
|
||||
|
|
|
@ -45,8 +45,9 @@ const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
|
|||
* | | | | | |
|
||||
* `-------------------------------------------'
|
||||
*/
|
||||
/* DISABLE COLEMAK SWITCHING FOR THE TIME BEING ("T" key from FN1 to TRNS) */
|
||||
KEYMAP(POWER,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
|
||||
CAPS,TRNS,WAKE,SLEP,TRNS,FN1, TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS,BSPC, \
|
||||
CAPS,TRNS,WAKE,SLEP,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS,BSPC, \
|
||||
TRNS,VOLD,VOLU,MUTE,EJCT,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,PENT, \
|
||||
TRNS,FN5 ,FN6 ,TRNS,TRNS,BTLD,PPLS,PMNS,END, PGDN,DOWN,TRNS,TRNS, \
|
||||
TRNS,TRNS, TRNS, TRNS,TRNS),
|
||||
|
@ -115,7 +116,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||
* Fn action definition
|
||||
*/
|
||||
|
||||
const uint16_t fn_actions[] PROGMEM = {
|
||||
const action_t fn_actions[] PROGMEM = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(2),
|
||||
[1] = ACTION_LAYER_TOGGLE(1),
|
||||
[2] = ACTION_LAYER_TAP_KEY(3, KC_SCLN),
|
||||
|
|
Loading…
Reference in New Issue