Skip to content

Commit

Permalink
Merge pull request qmk#13 from sadekbaroudi/fp/issue_012_config_frame…
Browse files Browse the repository at this point in the history
…work

issue 012: config framework
  • Loading branch information
sadekbaroudi authored Oct 3, 2022
2 parents 42ea5dd + 9f9de77 commit e0ecd57
Show file tree
Hide file tree
Showing 86 changed files with 4,035 additions and 1,153 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,7 @@ compile_commands.json
.cache/

# VIA(L) json files that don't belong in QMK repo
via*.json
# via*.json

# Sadek additions
.vscode/settings.json
1 change: 1 addition & 0 deletions builddefs/common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
VPATH += $(QUANTUM_DIR)/pointing_device
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_auto_mouse.c
ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom)
SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]'))
Expand Down
242 changes: 241 additions & 1 deletion docs/feature_pointing_device.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions keyboards/absolem/absolem.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@
{ K30, K29, K28, K27, K26 }, \
{ KC_NO, KC_NO, K38, K37, K36 }, \
}

#include "keyboards/fingerpunch/fp.h"
2 changes: 2 additions & 0 deletions keyboards/absolem/keymaps/sadekbaroudi/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define FP_LAYER_LIGHTING_MODE RGBLIGHT_MODE_SNAKE
#define FP_LAYER_LIGHTING_CAPS_LOCK_MODE RGBLIGHT_MODE_SNAKE
6 changes: 6 additions & 0 deletions keyboards/absolem/keymaps/sadekbaroudi/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
60 changes: 60 additions & 0 deletions keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Adding fingerpunch feature support

The purpose of this doc is mostly to make note to myself on adding the fingerpunch library support, as described in the README.md in this directory.

That said, if you are looking to leverage the features, you may be able to follow these steps for your keyboard as well. Note that this is untested.

## Required additions to the keyboard codebase

1. Add the following line to your keyboard {keyboard_name}.h file, e.g. ffkb_byomcu.h

`#include "keyboards/fingerpunch/fp.h"`

2. Include the source files in your keyboard's `rules.mk` file

Note that below is an example. You should check for the latest version of this code block as found in `keyboards/fingerpunch/ffkb_byomcu/rules.mk`

```make
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
```

## Personal notes for Sadek's keymaps

* Add the following to my keymap
* `FP_SCROLL_TOG` (pointing)
* `FP_SNIPE_TOG` (pointing)
* `FP_SUPER_TAB` (replace `S_ALT_TAB` if it exists)
* Change keymap mouse layer for pointing keyboards with pointing devices
* `__________________MOUSE_1__________________` to `_______________AUTO_MOUSE_1________________`
* Add the keyboard to my personal userspace `process_records.h` so that I can continue to use my own keycodes in addition to fingerpunch ones

```C
// Check to see which keyboard you're using, and define the PLACEHOLDER_SAFE_RANGE based on that.
#if defined(KEYBOARD_fingerpunch_arachnophobe) \
|| defined(KEYBOARD_fingerpunch_barobord) \
|| defined(KEYBOARD_fingerpunch_barobord_byomcu) \
|| defined(KEYBOARD_fingerpunch_bgkeeb) \
|| defined(KEYBOARD_fingerpunch_bigbarobord) \
|| defined(KEYBOARD_fingerpunch_euclid36) \
|| defined(KEYBOARD_fingerpunch_euclid36_proto) \
|| defined(KEYBOARD_fingerpunch_ffkb) \
|| defined(KEYBOARD_fingerpunch_ffkb_byomcu_v1) \
|| defined(KEYBOARD_fingerpunch_ffkb_byomcu_v2) \
|| defined(KEYBOARD_fingerpunch_ffkb_byomcu_v3) \
|| defined(KEYBOARD_fingerpunch_luakeeb) \
|| defined(KEYBOARD_fingerpunch_pinkiesout) \
|| defined(KEYBOARD_fingerpunch_rockon_v1) \
|| defined(KEYBOARD_fingerpunch_rockon_v2) \
|| defined(KEYBOARD_fingerpunch_rockon_bp) \
|| defined(KEYBOARD_fingerpunch_sweeeeep) \
|| defined(KEYBOARD_fingerpunch_ximi)
# define PLACEHOLDER_SAFE_RANGE FP_SAFE_RANGE
#else
# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
#endif
```
163 changes: 163 additions & 0 deletions keyboards/fingerpunch/README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions keyboards/fingerpunch/arachnophobe/arachnophobe.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@
{ K36, K18, K29, K09, K1A, K2A }, \
{ K37, K28, K08, K19, K38, K27 }, \
}

#include "keyboards/fingerpunch/fp.h"
7 changes: 7 additions & 0 deletions keyboards/fingerpunch/arachnophobe/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ ENCODER_ENABLE = no
OLED_ENABLE = no # this can be yes or no depending on if you have an OLED
EXTRAFLAGS += -flto # macros enable or disable
MOUSEKEY_ENABLE = yes

SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
2 changes: 2 additions & 0 deletions keyboards/fingerpunch/barobord/barobord.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@
{ K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K50 }, \
{ K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K51 } \
}

#include "keyboards/fingerpunch/fp.h"
9 changes: 8 additions & 1 deletion keyboards/fingerpunch/barobord/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,11 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
POINTING_DEVICE_ENABLE := yes
POINTING_DEVICE_DRIVER := pimoroni_trackball
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif
endif

SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
2 changes: 2 additions & 0 deletions keyboards/fingerpunch/barobord_byomcu/barobord_byomcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@
{ K31, K32, K33, K34, K35, K36, K37, K38, K39 }, \
{ KC_NO, KC_NO, KC_NO, K36, K35, K10, K20, K30, K40 }, \
}

#include "keyboards/fingerpunch/fp.h"
9 changes: 8 additions & 1 deletion keyboards/fingerpunch/barobord_byomcu/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,11 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
POINTING_DEVICE_ENABLE := yes
POINTING_DEVICE_DRIVER := pimoroni_trackball
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif
endif

SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
1 change: 1 addition & 0 deletions keyboards/fingerpunch/bgkeeb/bgkeeb.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@

#define LAYOUT LAYOUT_split_3x5_4

#include "keyboards/fingerpunch/fp.h"
7 changes: 7 additions & 0 deletions keyboards/fingerpunch/bgkeeb/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ ENCODER_ENABLE = no
SPLIT_KEYBOARD = yes

LAYOUTS = split_3x5_3

SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
2 changes: 2 additions & 0 deletions keyboards/fingerpunch/bigbarobord/bigbarobord.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@
{ K41, K42, K43, K44, K45, K46, K47, K48, K49 }, \
{ ___, K3B, K3C, K0A, K2B, K1A, K2A, K3A, K4A } \
}

#include "keyboards/fingerpunch/fp.h"
9 changes: 8 additions & 1 deletion keyboards/fingerpunch/bigbarobord/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,11 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
POINTING_DEVICE_ENABLE := yes
POINTING_DEVICE_DRIVER := pimoroni_trackball
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif
endif

SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
2 changes: 2 additions & 0 deletions keyboards/fingerpunch/ffkb/ffkb.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@
{ K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \
{ KC_NO, K32, KC_NO, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO } \
}

#include "keyboards/fingerpunch/fp.h"
9 changes: 8 additions & 1 deletion keyboards/fingerpunch/ffkb/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,11 @@ endif
ifeq ($(strip $(FP_EVQ_UNDER_PALMS)), yes)
ENCODER_ENABLE := yes
OPT_DEFS += -DFP_EVQ_UNDER_PALMS
endif
endif

SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
1 change: 0 additions & 1 deletion keyboards/fingerpunch/ffkb_byomcu/ffkb_byomcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ led_config_t g_led_config = { {
4, 4, 4, 1, 1, 1
} };


// 5 column config
/*
led_config_t g_led_config = { {
Expand Down
4 changes: 3 additions & 1 deletion keyboards/fingerpunch/ffkb_byomcu/ffkb_byomcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@
# include "v2.h"
#elif defined(KEYBOARD_fingerpunch_ffkb_byomcu_v3)
# include "v3.h"
#endif
#endif

#include "keyboards/fingerpunch/fp.h"
6 changes: 6 additions & 0 deletions keyboards/fingerpunch/ffkb_byomcu/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SRC += keyboards/fingerpunch/fp.c \
keyboards/fingerpunch/fp_haptic.c \
keyboards/fingerpunch/fp_keyhandler.c \
keyboards/fingerpunch/fp_pointing.c \
keyboards/fingerpunch/fp_rgblight.c \
keyboards/fingerpunch/fp_rgb_matrix.c
Loading

0 comments on commit e0ecd57

Please sign in to comment.