Skip to content

Commit

Permalink
chore: Miscellaneous fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterFalken committed Mar 8, 2023
1 parent 9e6cb33 commit 58cb64e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 38 deletions.
2 changes: 1 addition & 1 deletion keyboards/adafruit/macropad/keymaps/peterfalken/rules.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Setup QMK features
ENCODER_MAP_ENABLE = yes
RGB_MATRIX_ENABLE = no # Disable RGB key matrix
RGB_MATRIX_ENABLE = no # Disable RGB key matrix
2 changes: 1 addition & 1 deletion keyboards/planck/keymaps/peterfalken/rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Setup keymap QMK features
# TODO: Check for space optimizations/saving
# TODO: Check for space optimizations
AUDIO_ENABLE = yes # Enable Audio Output
ENCODER_ENABLE = no # Disable encoder

Expand Down
4 changes: 2 additions & 2 deletions keyboards/preonic/keymaps/peterfalken/rules.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Setup keymap QMK features
# TODO: Check for space optimizations/saving
AUDIO_ENABLE = yes # Enable Audio Output
# TODO: Check for space optimizations
AUDIO_ENABLE = yes # Enable Audio Output
ENCODER_ENABLE = no # Disable encoder

ifeq ($(strip $(AUDIO_ENABLE)), yes)
Expand Down
2 changes: 1 addition & 1 deletion keyboards/work_louder/micro/keymaps/peterfalken/rules.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Setup QMK features
ENCODER_MAP_ENABLE = yes
RGB_MATRIX_ENABLE = no # Disable RGB key matrix
RGB_MATRIX_ENABLE = no # Disable RGB key matrix
17 changes: 1 addition & 16 deletions users/peterfalken/peterfalken.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,8 @@

#include "peterfalken.h"

// Process custom keycodes
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; // Skip all further processing of this key
default:
return true; // Process all other keycodes normally
}
}

#ifndef CUSTOM_LAYER_STATE
// Switch layer
#ifndef CUSTOM_LAYER_STATE
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
Expand Down
28 changes: 12 additions & 16 deletions users/peterfalken/peterfalken.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,17 @@
_RAISE,
_ADJUST
};
#endif // CUSTOM_KEYMAP_LAYERS
#endif // CUSTOM_KEYMAP_LAYERS

// Custom definitions for keys
#define CK_CW CW_TOGG // CAPS_WORD for Caps Word feature
#define CK_SLP KC_SLEP // System Sleep
#define CK_M1 C(KC_UP) // Mission Control - All apps
#define CK_M2 C(KC_DOWN) // Mission Control - One apps
#define CK_LP KC_LPAD // LaunchPad Key
#define CK_CO KC_COPY // COPY = CMD + C
#define CK_CU KC_CUT // CUT = CMD + X
#define CK_MV LAG(KC_V) // MOVE = CMD + OPT + V
#define CK_PA KC_PASTE // PASTE = CMD + V
#define CK_UN KC_UNDO // UNDO = CMD + Z
// Custom definitions for keys
#define CK_CW CW_TOGG // CAPS_WORD for Caps Word feature
#define CK_SLP KC_SLEP // System Sleep
#define CK_M1 C(KC_DOWN) // Mission Control - One apps
#define CK_CO KC_COPY // COPY = CMD + C
#define CK_CU KC_CUT // CUT = CMD + X
#define CK_MV LAG(KC_V) // MOVE = CMD + OPT + V
#define CK_PA KC_PASTE // PASTE = CMD + V

// Layer activation
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)

// Layer activation
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
2 changes: 1 addition & 1 deletion users/peterfalken/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ SPACE_CADET_ENABLE = no # Free up space
LTO_ENABLE = yes

# Include userspace files
SRC += peterfalken.c
SRC += $(USER_PATH)/peterfalken.c

0 comments on commit 58cb64e

Please sign in to comment.