Merge pull request #491 from fredizzimo/keycode_fixes

Some fixes for keycode processing
daktil_thumb_popravljen
Jack Humbert 2016-07-07 13:57:39 -04:00 committed by GitHub
commit e8719e10c4
4 changed files with 7 additions and 9 deletions

View File

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "chibios_test.h" #include "chibios_test.h"
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{{KC_CAPS}}, // test with KC_CAPS, KC_A, KC_BTLD {{KC_CAPS}}, // test with KC_CAPS, KC_A, RESET
}; };
const uint16_t fn_actions[] = { const uint16_t fn_actions[] = {

View File

@ -18,6 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "infinity_ergodox.h" #include "infinity_ergodox.h"
// Workaround for old keymap format
#define KC_RESET RESET
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP( // layer 0 : default KEYMAP( // layer 0 : default
// left hand // left hand
@ -63,7 +66,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP( // layer 2 : keyboard functions KEYMAP( // layer 2 : keyboard functions
// left hand // left hand
BTLD,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, RESET,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN3, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN3,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,

View File

@ -62,7 +62,7 @@ action_t action_for_key(uint8_t layer, keypos_t key)
case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE: case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE:
action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode)); action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode));
break; break;
case KC_AUDIO_MUTE ... KC_WWW_FAVORITES: case KC_AUDIO_MUTE ... KC_MEDIA_REWIND:
action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode)); action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode));
break; break;
case KC_MS_UP ... KC_MS_ACCEL2: case KC_MS_UP ... KC_MS_ACCEL2:

View File

@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF)) #define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF))
#define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE) #define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE)
#define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_WFAV) #define IS_CONSUMER(code) (KC_MUTE <= (code) && (code) <= KC_MRWD)
#define IS_FN(code) (KC_FN0 <= (code) && (code) <= KC_FN31) #define IS_FN(code) (KC_FN0 <= (code) && (code) <= KC_FN31)
#define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_ACCEL2) #define IS_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_ACCEL2)
#define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT) #define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT)
@ -156,8 +156,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define KC_WSTP KC_WWW_STOP #define KC_WSTP KC_WWW_STOP
#define KC_WREF KC_WWW_REFRESH #define KC_WREF KC_WWW_REFRESH
#define KC_WFAV KC_WWW_FAVORITES #define KC_WFAV KC_WWW_FAVORITES
/* Jump to bootloader */
#define KC_BTLD KC_BOOTLOADER
/* Transparent */ /* Transparent */
#define KC_TRANSPARENT 1 #define KC_TRANSPARENT 1
#define KC_TRNS KC_TRANSPARENT #define KC_TRNS KC_TRANSPARENT
@ -428,9 +426,6 @@ enum internal_special_keycodes {
KC_MEDIA_FAST_FORWARD, KC_MEDIA_FAST_FORWARD,
KC_MEDIA_REWIND, /* 0xBC */ KC_MEDIA_REWIND, /* 0xBC */
/* Jump to bootloader */
KC_BOOTLOADER = 0xBF,
/* Fn key */ /* Fn key */
KC_FN0 = 0xC0, KC_FN0 = 0xC0,
KC_FN1, KC_FN1,