1
0
Fork 0

Merge pull request #491 from fredizzimo/keycode_fixes

Some fixes for keycode processing
This commit is contained in:
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"
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[] = {

View file

@ -18,6 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "infinity_ergodox.h"
// Workaround for old keymap format
#define KC_RESET RESET
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP( // layer 0 : default
// left hand
@ -63,7 +66,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP( // layer 2 : keyboard functions
// 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,
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:
action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode));
break;
case KC_AUDIO_MUTE ... KC_WWW_FAVORITES:
case KC_AUDIO_MUTE ... KC_MEDIA_REWIND:
action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode));
break;
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_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_MOUSEKEY(code) (KC_MS_UP <= (code) && (code) <= KC_MS_ACCEL2)
#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_WREF KC_WWW_REFRESH
#define KC_WFAV KC_WWW_FAVORITES
/* Jump to bootloader */
#define KC_BTLD KC_BOOTLOADER
/* Transparent */
#define KC_TRANSPARENT 1
#define KC_TRNS KC_TRANSPARENT
@ -428,9 +426,6 @@ enum internal_special_keycodes {
KC_MEDIA_FAST_FORWARD,
KC_MEDIA_REWIND, /* 0xBC */
/* Jump to bootloader */
KC_BOOTLOADER = 0xBF,
/* Fn key */
KC_FN0 = 0xC0,
KC_FN1,