Skip to content

Commit

Permalink
Rename keymaps. Move mouse scroll. Add brightness binds
Browse files Browse the repository at this point in the history
  • Loading branch information
jiexi committed Dec 20, 2020
1 parent 48daa72 commit f5b9a8e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions keyboard/hhkb/config_rn42.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.


/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))


/* period of tapping(ms) */
#define TAPPING_TERM 300
/* tap count needed for toggling a feature */
#define TAPPING_TOGGLE 5
#define TAPPING_TOGGLE 3
/* Oneshot timeout(ms) */
#define ONESHOT_TIMEOUT 300

/* Boot Magic salt key: Space */
#define BOOTMAGIC_KEY_SALT KC_SPACE
/* Boot Magic salt key: Grave */
#define BOOTMAGIC_KEY_SALT KC_GRAVE

/* power control of key switch board */
#define HHKB_POWER_SAVING
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
* Fn action definition
*/
#ifdef KEYMAP_SECTION_ENABLE
const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
const action_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
#else
const uint16_t fn_actions[] PROGMEM = {
const action_t fn_actions[] PROGMEM = {
#endif
[0] = ACTION_LAYER_TAP_TOGGLE(1),
[1] = ACTION_LAYER_TAP_TOGGLE(2),
Expand Down
4 changes: 2 additions & 2 deletions keyboard/hhkb/keymap_jp.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* HHKB JP Layout
*/
#include "keymap_common.h"
Expand Down Expand Up @@ -28,7 +28,7 @@ const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
* |-----------------------------------------------------------|
* | || | | | | | | | | || | | |
* `-----------------------------------------------------------'
*/
*/
KEYMAP_JP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS, \
TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,TRNS,PENT, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,37 +36,37 @@ const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
* |------------------------------------------------------` |
* |Caps |Ply|Stp|Prv|Nxt| | | | | |Ins|Hom|PgU| |
* |-----------------------------------------------------------|
* | | | | | | | | | |Del|End|PgD| | |
* | |BiD|BiU| | | | | | |Del|End|PgD| | |
* |-----------------------------------------------------------|
* |Fn1|| | | | | | | | | || | | |
* `-----------------------------------------------------------'
*/
KEYMAP_JP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \
TRNS,MUTE,VOLD,VOLU, NO, NO, NO, NO, NO, NO,PSCR,SLCK,PAUS, \
CAPS,MPLY,MSTP,MPRV,MNXT, NO, NO, NO, NO, NO,INS,HOME,PGUP,TRNS, \
TRNS, NO, NO, NO, NO, NO, NO, NO, NO, DEL, END,PGDN,TRNS,TRNS, \
TRNS,BRTD,BRTI, NO, NO, NO, NO, NO, NO, DEL, END,PGDN,TRNS,TRNS, \
FN1 ,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS),

/* Layer 2: Movement mode (JIS BSLS)
* ,-----------------------------------------------------------.
* | | | | | | | | | | | | | | |BS |
* |-----------------------------------------------------------|
* | | |McU| | | | | | | |Mb4|Mb5| | |
* | |MwL|McU|MwR|MwU| | | | | |Mb4|Mb5| | |
* |------------------------------------------------------` |
* |Esc |McL|McD|McR| | | | | |Mb1|Mb3|Mb2|Fn3| |
* |Esc |McL|McD|McR|MwD| | | | |Mb1|Mb3|Mb2|Fn3| |
* |-----------------------------------------------------------|
* | | | | | | | | | |Ma0|Ma1|Ma2|MwU| |
* | | | | | | | | | |Ma0|Ma1|Ma2| | |
* |-----------------------------------------------------------|
* | || | | | | | | | | ||MwL|MwD|MwR|
* | || | | | | | | | | || | | |
* `-----------------------------------------------------------'
*/
KEYMAP_JP(NO , NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,BSPC, \
TRNS, NO,MS_U, NO, NO, NO, NO, NO, NO, NO,BTN4,BTN5, NO, \
ESC ,MS_L,MS_D,MS_R, NO, NO, NO, NO, NO,BTN1,BTN3,BTN2,FN3,TRNS, \
TRNS, NO, NO, NO, NO, NO, NO, NO, NO,ACL0,ACL1,ACL2,WH_U,TRNS, \
NO ,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,WH_L,WH_D,WH_R),
TRNS,WH_L,MS_U,WH_R,WH_U, NO, NO, NO, NO, NO,BTN4,BTN5, NO, \
ESC ,MS_L,MS_D,MS_R,WH_D, NO, NO, NO, NO,BTN1,BTN3,BTN2,FN3,TRNS, \
TRNS, NO, NO, NO, NO, NO, NO, NO, NO,ACL0,ACL1,ACL2, NO,TRNS, \
NO ,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS),

/* Layer 3: Math mode (JIS RO)
/* Layer 3: Numpad mode (JIS RO)
* ,-----------------------------------------------------------.
* | | | | | | | | | . | 0 | | | | |BS |
* |-----------------------------------------------------------|
Expand All @@ -92,9 +92,9 @@ const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
* Fn action definition
*/
#ifdef KEYMAP_SECTION_ENABLE
const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
const action_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
#else
const uint16_t fn_actions[] PROGMEM = {
const action_t fn_actions[] PROGMEM = {
#endif
[0] = ACTION_LAYER_TAP_TOGGLE(1),
[1] = ACTION_LAYER_INVERT(1, ON_RELEASE),
Expand Down
2 changes: 1 addition & 1 deletion keyboard/hhkb/rn42/rn42_task.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static void init_rn42(void)
// RN-42 configure
if (!config_mode) enter_command_mode();
SEND_COMMAND("SF,1\r\n"); // factory defaults
SEND_COMMAND("S-,TmkBT\r\n");
SEND_COMMAND("S-,HHKB\r\n");
SEND_COMMAND("SS,Keyboard/Mouse\r\n");
SEND_COMMAND("SM,4\r\n"); // auto connect(DTR)
SEND_COMMAND("SW,8000\r\n"); // Sniff disable
Expand Down
4 changes: 2 additions & 2 deletions tmk_core/common/bootmagic.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
#define BOOTMAGIC_KEY_SWAP_RALT_RGUI KC_RALT
#endif
#ifndef BOOTMAGIC_KEY_NO_GUI
#define BOOTMAGIC_KEY_NO_GUI KC_LGUI
#define BOOTMAGIC_KEY_NO_GUI KC_G
#endif
#ifndef BOOTMAGIC_KEY_SWAP_GRAVE_ESC
#define BOOTMAGIC_KEY_SWAP_GRAVE_ESC KC_GRAVE
#define BOOTMAGIC_KEY_SWAP_GRAVE_ESC KC_E
#endif
#ifndef BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE
#define BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE KC_BSLASH
Expand Down

0 comments on commit f5b9a8e

Please sign in to comment.