Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2cee371bf1 | ||
|
|
a7a647b7f6 | ||
|
|
16226274c9 | ||
|
|
cbb7e91851 | ||
|
|
c8577a9a73 | ||
|
|
f2d597d1d3 | ||
|
|
bbd4b5eb88 | ||
|
|
3309e91e0b | ||
|
|
e04e55c872 | ||
|
|
83de3dff01 | ||
|
|
6f50c7eba1 | ||
|
|
2ba54690e6 | ||
|
|
222380c636 | ||
|
|
9b3f397ab2 | ||
|
|
ecdf14bb62 | ||
|
|
642f6cf14f | ||
|
|
f3bdd436a3 |
No files matched your search
@@ -246,11 +246,21 @@ endif
|
|||||||
|
|
||||||
ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
|
ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||||
|
SRC += haptic.c
|
||||||
SRC += DRV2605L.c
|
SRC += DRV2605L.c
|
||||||
SRC += i2c_master.c
|
SRC += i2c_master.c
|
||||||
|
OPT_DEFS += -DHAPTIC_ENABLE
|
||||||
OPT_DEFS += -DDRV2605L
|
OPT_DEFS += -DDRV2605L
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID)
|
||||||
|
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||||
|
SRC += haptic.c
|
||||||
|
SRC += solenoid.c
|
||||||
|
OPT_DEFS += -DHAPTIC_ENABLE
|
||||||
|
OPT_DEFS += -DSOLENOID_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||||
SRC += drivers/avr/hd44780.c
|
SRC += drivers/avr/hd44780.c
|
||||||
OPT_DEFS += -DHD44780_ENABLE
|
OPT_DEFS += -DHD44780_ENABLE
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ Additionally, hitting keys five times in a short period will lock that key. This
|
|||||||
You can control the behavior of one shot keys by defining these in `config.h`:
|
You can control the behavior of one shot keys by defining these in `config.h`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
|
#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped once again. */
|
||||||
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,11 @@ If you're using a 60% keyboard, or any other layout with no F-row, you will have
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. When pressed it will behave like `KC_ESC`, but with Shift or GUI held it will send `KC_GRAVE`.
|
Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead.
|
||||||
|
|
||||||
|
## What Your OS Sees
|
||||||
|
|
||||||
|
If Mary presses GESC on her keyboard, the OS will see an KC_ESC character. Now if Mary holds Shift down and presses GESC it will output `~`, or a shifted backtick. Now if she holds GUI/CMD/WIN, it will output a simple <code>`</code> character.
|
||||||
|
|
||||||
## Keycodes
|
## Keycodes
|
||||||
|
|
||||||
@@ -12,6 +16,10 @@ Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) w
|
|||||||
|---------|-----------|------------------------------------------------------------------|
|
|---------|-----------|------------------------------------------------------------------|
|
||||||
|`KC_GESC`|`GRAVE_ESC`|Escape when pressed, <code>`</code> when Shift or GUI are held|
|
|`KC_GESC`|`GRAVE_ESC`|Escape when pressed, <code>`</code> when Shift or GUI are held|
|
||||||
|
|
||||||
|
### Caveats
|
||||||
|
|
||||||
|
* On macOS CMD/GUI + KC_GRV is actually mapped to a hot key so it will not output a backtick.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
There are several possible key combinations this will break, among them Control+Shift+Escape on Windows and Command+Option+Escape on macOS. To work around this, you can `#define` these options in your `config.h`:
|
There are several possible key combinations this will break, among them Control+Shift+Escape on Windows and Command+Option+Escape on macOS. To work around this, you can `#define` these options in your `config.h`:
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
# Haptic Feedback
|
||||||
|
|
||||||
|
## Haptic feedback rules.mk options
|
||||||
|
|
||||||
|
The following options are currently available for haptic feedback in `rule.mk`:
|
||||||
|
|
||||||
|
`HAPTIC_ENABLE += DRV2605L`
|
||||||
|
|
||||||
|
`HAPTIC_ENABLE += SOLENOID`
|
||||||
|
|
||||||
|
## Known Supported Hardware
|
||||||
|
|
||||||
|
| Name | Description |
|
||||||
|
|--------------------|-------------------------------------------------|
|
||||||
|
| [LV061228B-L65-A](https://www.digikey.com/product-detail/en/jinlong-machinery-electronics-inc/LV061228B-L65-A/1670-1050-ND/7732325) | z-axis 2v LRA |
|
||||||
|
| [Mini Motor Disc](https://www.adafruit.com/product/1201) | small 2-5v ERM |
|
||||||
|
|
||||||
|
## Haptic Keycodes
|
||||||
|
|
||||||
|
Not all keycodes below will work depending on which haptic mechanism you have chosen.
|
||||||
|
|
||||||
|
| Name | Description |
|
||||||
|
|-----------|-------------------------------------------------------|
|
||||||
|
|`HPT_ON` | Turn haptic feedback on |
|
||||||
|
|`HPT_OFF` | Turn haptic feedback on |
|
||||||
|
|`HPT_TOG` | Toggle haptic feedback on/off |
|
||||||
|
|`HPT_RST` | Reset haptic feedback config to default |
|
||||||
|
|`HPT_FBK` | Toggle feedback to occur on keypress, release or both |
|
||||||
|
|`HPT_BUZ` | Toggle solenoid buzz on/off |
|
||||||
|
|`HPT_MODI` | Go to next DRV2605L waveform |
|
||||||
|
|`HPT_MODD` | Go to previous DRV2605L waveform |
|
||||||
|
|`HPT_DWLI` | Increase Solenoid dwell time |
|
||||||
|
|`HPT_DWLD` | Decrease Solenoid dwell time |
|
||||||
|
|
||||||
|
### Solenoids
|
||||||
|
|
||||||
|
First you will need a build a circuit to drive the solenoid through a mosfet as most MCU will not be able to provide the current needed to drive the coil in the solenoid.
|
||||||
|
|
||||||
|
[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
|
||||||
|
|
||||||
|
Select a pin that has PWM for the signal pin
|
||||||
|
|
||||||
|
```
|
||||||
|
#define SOLENOID_PIN *pin*
|
||||||
|
```
|
||||||
|
|
||||||
|
Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin.
|
||||||
|
|
||||||
|
### DRV2605L
|
||||||
|
|
||||||
|
DRV2605L is controlled over i2c protocol, and has to be connected to the SDA and SCL pins, these varies depending on the MCU in use.
|
||||||
|
|
||||||
|
#### Feedback motor setup
|
||||||
|
|
||||||
|
This driver supports 2 different feedback motors. Set the following in your `config.h` based on which motor you have selected.
|
||||||
|
|
||||||
|
##### ERM
|
||||||
|
|
||||||
|
Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight attached so when drive signal is attached, the off-set weight spins and causes a sinusoidal wave that translate into vibrations.
|
||||||
|
|
||||||
|
```
|
||||||
|
#define FB_ERM_LRA 0
|
||||||
|
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
|
||||||
|
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
||||||
|
|
||||||
|
/* Please refer to your datasheet for the optimal setting for your specific motor. */
|
||||||
|
#define RATED_VOLTAGE 3
|
||||||
|
#define V_PEAK 5
|
||||||
|
```
|
||||||
|
##### LRA
|
||||||
|
|
||||||
|
Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency.
|
||||||
|
|
||||||
|
```
|
||||||
|
#define FB_ERM_LRA 1
|
||||||
|
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
|
||||||
|
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
||||||
|
|
||||||
|
/* Please refer to your datasheet for the optimal setting for your specific motor. */
|
||||||
|
#define RATED_VOLTAGE 2
|
||||||
|
#define V_PEAK 2.8
|
||||||
|
#define V_RMS 2.0
|
||||||
|
#define V_PEAK 2.1
|
||||||
|
#define F_LRA 205 /* resonance freq */
|
||||||
|
```
|
||||||
|
|
||||||
|
#### DRV2605L waveform library
|
||||||
|
|
||||||
|
DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `DRV_pulse(*sequence name or number*)`
|
||||||
|
|
||||||
|
List of waveform sequences from the datasheet:
|
||||||
|
|
||||||
|
|seq# | Sequence name |seq# | Sequence name |seq# |Sequence name |
|
||||||
|
|-----|---------------------|-----|-----------------------------------|-----|--------------------------------------|
|
||||||
|
| 1 | strong_click | 43 | lg_dblclick_med_60 | 85 | transition_rampup_med_smooth2 |
|
||||||
|
| 2 | strong_click_60 | 44 | lg_dblsharp_tick | 86 | transition_rampup_short_smooth1 |
|
||||||
|
| 3 | strong_click_30 | 45 | lg_dblsharp_tick_80 | 87 | transition_rampup_short_smooth2 |
|
||||||
|
| 4 | sharp_click | 46 | lg_dblsharp_tick_60 | 88 | transition_rampup_long_sharp1 |
|
||||||
|
| 5 | sharp_click_60 | 47 | buzz | 89 | transition_rampup_long_sharp2 |
|
||||||
|
| 6 | sharp_click_30 | 48 | buzz_80 | 90 | transition_rampup_med_sharp1 |
|
||||||
|
| 7 | soft_bump | 49 | buzz_60 | 91 | transition_rampup_med_sharp2 |
|
||||||
|
| 8 | soft_bump_60 | 50 | buzz_40 | 92 | transition_rampup_short_sharp1 |
|
||||||
|
| 9 | soft_bump_30 | 51 | buzz_20 | 93 | transition_rampup_short_sharp2 |
|
||||||
|
| 10 | dbl_click | 52 | pulsing_strong | 94 | transition_rampdown_long_smooth1_50 |
|
||||||
|
| 11 | dbl_click_60 | 53 | pulsing_strong_80 | 95 | transition_rampdown_long_smooth2_50 |
|
||||||
|
| 12 | trp_click | 54 | pulsing_medium | 96 | transition_rampdown_med_smooth1_50 |
|
||||||
|
| 13 | soft_fuzz | 55 | pulsing_medium_80 | 97 | transition_rampdown_med_smooth2_50 |
|
||||||
|
| 14 | strong_buzz | 56 | pulsing_sharp | 98 | transition_rampdown_short_smooth1_50 |
|
||||||
|
| 15 | alert_750ms | 57 | pulsing_sharp_80 | 99 | transition_rampdown_short_smooth2_50 |
|
||||||
|
| 16 | alert_1000ms | 58 | transition_click | 100 | transition_rampdown_long_sharp1_50 |
|
||||||
|
| 17 | strong_click1 | 59 | transition_click_80 | 101 | transition_rampdown_long_sharp2_50 |
|
||||||
|
| 18 | strong_click2_80 | 60 | transition_click_60 | 102 | transition_rampdown_med_sharp1_50 |
|
||||||
|
| 19 | strong_click3_60 | 61 | transition_click_40 | 103 | transition_rampdown_med_sharp2_50 |
|
||||||
|
| 20 | strong_click4_30 | 62 | transition_click_20 | 104 | transition_rampdown_short_sharp1_50 |
|
||||||
|
| 21 | medium_click1 | 63 | transition_click_10 | 105 | transition_rampdown_short_sharp2_50 |
|
||||||
|
| 22 | medium_click2_80 | 64 | transition_hum | 106 | transition_rampup_long_smooth1_50 |
|
||||||
|
| 23 | medium_click3_60 | 65 | transition_hum_80 | 107 | transition_rampup_long_smooth2_50 |
|
||||||
|
| 24 | sharp_tick1 | 66 | transition_hum_60 | 108 | transition_rampup_med_smooth1_50 |
|
||||||
|
| 25 | sharp_tick2_80 | 67 | transition_hum_40 | 109 | transition_rampup_med_smooth2_50 |
|
||||||
|
| 26 | sharp_tick3_60 | 68 | transition_hum_20 | 110 | transition_rampup_short_smooth1_50 |
|
||||||
|
| 27 | sh_dblclick_str | 69 | transition_hum_10 | 111 | transition_rampup_short_smooth2_50 |
|
||||||
|
| 28 | sh_dblclick_str_80 | 70 | transition_rampdown_long_smooth1 | 112 | transition_rampup_long_sharp1_50 |
|
||||||
|
| 29 | sh_dblclick_str_60 | 71 | transition_rampdown_long_smooth2 | 113 | transition_rampup_long_sharp2_50 |
|
||||||
|
| 30 | sh_dblclick_str_30 | 72 | transition_rampdown_med_smooth1 | 114 | transition_rampup_med_sharp1_50 |
|
||||||
|
| 31 | sh_dblclick_med | 73 | transition_rampdown_med_smooth2 | 115 | transition_rampup_med_sharp2_50 |
|
||||||
|
| 32 | sh_dblclick_med_80 | 74 | transition_rampdown_short_smooth1 | 116 | transition_rampup_short_sharp1_50 |
|
||||||
|
| 33 | sh_dblclick_med_60 | 75 | transition_rampdown_short_smooth2 | 117 | transition_rampup_short_sharp2_50 |
|
||||||
|
| 34 | sh_dblsharp_tick | 76 | transition_rampdown_long_sharp1 | 118 | long_buzz_for_programmatic_stopping |
|
||||||
|
| 35 | sh_dblsharp_tick_80 | 77 | transition_rampdown_long_sharp2 | 119 | smooth_hum1_50 |
|
||||||
|
| 36 | sh_dblsharp_tick_60 | 78 | transition_rampdown_med_sharp1 | 120 | smooth_hum2_40 |
|
||||||
|
| 37 | lg_dblclick_str | 79 | transition_rampdown_med_sharp2 | 121 | smooth_hum3_30 |
|
||||||
|
| 38 | lg_dblclick_str_80 | 80 | transition_rampdown_short_sharp1 | 122 | smooth_hum4_20 |
|
||||||
|
| 39 | lg_dblclick_str_60 | 81 | transition_rampdown_short_sharp2 | 123 | smooth_hum5_10 |
|
||||||
|
| 40 | lg_dblclick_str_30 | 82 | transition_rampup_long_smooth1 | | |
|
||||||
|
| 41 | lg_dblclick_med | 83 | transition_rampup_long_smooth2 | | |
|
||||||
|
| 42 | lg_dblclick_med_80 | 84 | transition_rampup_med_smooth1 | | |
|
||||||
|
### Optional DRV2605L defines
|
||||||
|
|
||||||
|
```
|
||||||
|
#define DRV_GREETING *sequence name or number*
|
||||||
|
```
|
||||||
|
If haptic feedback is enabled, the keyboard will vibrate to a specific sqeuence during startup. That can be selected using the following define:
|
||||||
|
|
||||||
|
```
|
||||||
|
#define DRV_MODE_DEFAULT *sequence name or number*
|
||||||
|
```
|
||||||
|
This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed.
|
||||||
+37
-31
@@ -148,37 +148,43 @@ const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
|
|||||||
|
|
||||||
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
|
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
|
||||||
|
|
||||||
|Function |Description |
|
|Function |Description |
|
||||||
|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|`rgblight_enable()` |Turn LEDs on, based on their previous state |
|
|`rgblight_enable()` |Turn LEDs on, based on their previous state |
|
||||||
|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) |
|
|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) |
|
||||||
|`rgblight_disable()` |Turn LEDs off |
|
|`rgblight_disable()` |Turn LEDs off |
|
||||||
|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) |
|
|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) |
|
||||||
|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
|
|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
|
||||||
|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
|
||||||
|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||||
|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 |
|
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||||
|`rgblight_sethsv_noeeprom(h, s, v)`|Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_toggle()` |Toggle all LEDs between on and off |
|
|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 |
|
||||||
|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) |
|
|`rgblight_sethsv_noeeprom(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||||
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||||
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255 (not written to EEPROM) |
|
||||||
|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue |
|
|`rgblight_toggle()` |Toggle all LEDs between on and off |
|
||||||
|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) |
|
||||||
|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue |
|
|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
|
||||||
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||||
|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation |
|
|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
|
||||||
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
|
||||||
|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation |
|
|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue |
|
||||||
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) |
|
||||||
|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value |
|
|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue |
|
||||||
|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
|
|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) |
|
||||||
|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
|
|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation |
|
||||||
|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
|
|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) |
|
||||||
|
|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation |
|
||||||
|
|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) |
|
||||||
|
|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value |
|
||||||
|
|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
|
||||||
|
|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
|
||||||
|
|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
|
||||||
|
|
||||||
Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list!
|
Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list!
|
||||||
|
|
||||||
|
|||||||
Executable
+101
@@ -0,0 +1,101 @@
|
|||||||
|
/*
|
||||||
|
* APA102 lib V1.0a
|
||||||
|
*
|
||||||
|
* Controls APA102 RGB-LEDs
|
||||||
|
* Author: Mikkel (Duckle29 on github)
|
||||||
|
*
|
||||||
|
* Dec 22th, 2017 v1.0a Initial Version
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "apa102.h"
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
|
// Setleds for standard RGB
|
||||||
|
void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds){
|
||||||
|
apa102_setleds_pin(ledarray,leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF));
|
||||||
|
}
|
||||||
|
|
||||||
|
void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK){
|
||||||
|
pinMode(RGB_DI_PIN, PinDirectionOutput);
|
||||||
|
pinMode(RGB_CLK_PIN, PinDirectionOutput);
|
||||||
|
|
||||||
|
apa102_send_array((uint8_t*)ledarray,leds)
|
||||||
|
}
|
||||||
|
|
||||||
|
void apa102_send_array(uint8_t *data, uint16_t leds){ // Data is struct of 3 bytes. RGB - leds is number of leds in data
|
||||||
|
apa102_start_frame();
|
||||||
|
while(leds--){
|
||||||
|
apa102_send_frame(0xFF000000 | (data->b << 16) | (data->g << 8) | data->r);
|
||||||
|
data++;
|
||||||
|
}
|
||||||
|
apa102_end_frame(leds);
|
||||||
|
}
|
||||||
|
|
||||||
|
void apa102_send_frame(uint32_t frame){
|
||||||
|
for(uint32_t i=0xFF; i>0;){
|
||||||
|
apa102_send_byte(frame & i);
|
||||||
|
i = i << 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void apa102_start_frame(){
|
||||||
|
apa102_send_frame(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void apa102_end_frame(uint16_t leds)
|
||||||
|
{
|
||||||
|
// This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
|
||||||
|
// and adapted. The code is MIT licensed. I think thats compatible?
|
||||||
|
|
||||||
|
// We need to send some more bytes to ensure that all the LEDs in the
|
||||||
|
// chain see their new color and start displaying it.
|
||||||
|
//
|
||||||
|
// The data stream seen by the last LED in the chain will be delayed by
|
||||||
|
// (count - 1) clock edges, because each LED before it inverts the clock
|
||||||
|
// line and delays the data by one clock edge. Therefore, to make sure
|
||||||
|
// the last LED actually receives the data we wrote, the number of extra
|
||||||
|
// edges we send at the end of the frame must be at least (count - 1).
|
||||||
|
// For the APA102C, that is sufficient.
|
||||||
|
//
|
||||||
|
// The SK9822 only updates after it sees 32 zero bits followed by one more
|
||||||
|
// rising edge. To avoid having the update time depend on the color of
|
||||||
|
// the last LED, we send a dummy 0xFF byte. (Unfortunately, this means
|
||||||
|
// that partial updates of the beginning of an LED strip are not possible;
|
||||||
|
// the LED after the last one you are trying to update will be black.)
|
||||||
|
// After that, to ensure that the last LED in the chain sees 32 zero bits
|
||||||
|
// and a rising edge, we need to send at least 65 + (count - 1) edges. It
|
||||||
|
// is sufficent and simpler to just send (5 + count/16) bytes of zeros.
|
||||||
|
//
|
||||||
|
// We are ignoring the specification for the end frame in the APA102/SK9822
|
||||||
|
// datasheets because it does not actually ensure that all the LEDs will
|
||||||
|
// start displaying their new colors right away.
|
||||||
|
|
||||||
|
apa102_send_byte(0xFF);
|
||||||
|
for (uint16_t i = 0; i < 5 + leds / 16; i++){
|
||||||
|
apa102_send_byte(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void apa102_send_byte(uint8_t byte){
|
||||||
|
uint8_t i;
|
||||||
|
for (i = 0; i < 8; i++){
|
||||||
|
digitalWrite(RGB_DI_PIN, !!(byte & (1 << (7-i)));
|
||||||
|
digitalWrite(RGB_CLK_PIN, PinLevelHigh);
|
||||||
|
}
|
||||||
|
}
|
||||||
Executable
+46
@@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* light weight WS2812 lib include
|
||||||
|
*
|
||||||
|
* Version 2.3 - Nev 29th 2015
|
||||||
|
* Author: Tim ([email protected])
|
||||||
|
*
|
||||||
|
* Please do not change this file! All configuration is handled in "ws2812_config.h"
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <avr/interrupt.h>
|
||||||
|
|
||||||
|
#include "rgblight_types.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* User Interface
|
||||||
|
*
|
||||||
|
* Input:
|
||||||
|
* ledarray: An array of GRB data describing the LED colors
|
||||||
|
* number_of_leds: The number of LEDs to write
|
||||||
|
* pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0)
|
||||||
|
*
|
||||||
|
* The functions will perform the following actions:
|
||||||
|
* - Set the data-out pin as output
|
||||||
|
* - Send out the LED data
|
||||||
|
* - Wait 50�s to reset the LEDs
|
||||||
|
*/
|
||||||
|
|
||||||
|
void apa102_setleds (LED_TYPE *ledarray, uint16_t number_of_leds);
|
||||||
|
void apa102_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
|
||||||
|
void apa102_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
|
||||||
+12
-12
@@ -21,7 +21,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
uint8_t DRV2605L_transfer_buffer[20];
|
uint8_t DRV2605L_transfer_buffer[2];
|
||||||
uint8_t DRV2605L_tx_register[0];
|
uint8_t DRV2605L_tx_register[0];
|
||||||
uint8_t DRV2605L_read_buffer[0];
|
uint8_t DRV2605L_read_buffer[0];
|
||||||
uint8_t DRV2605L_read_register;
|
uint8_t DRV2605L_read_register;
|
||||||
@@ -34,6 +34,11 @@ void DRV_write(uint8_t drv_register, uint8_t settings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t DRV_read(uint8_t regaddress) {
|
uint8_t DRV_read(uint8_t regaddress) {
|
||||||
|
#ifdef __AVR__
|
||||||
|
i2c_readReg(DRV2605L_BASE_ADDRESS << 1,
|
||||||
|
regaddress, DRV2605L_read_buffer, 1, 100);
|
||||||
|
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
||||||
|
#else
|
||||||
DRV2605L_tx_register[0] = regaddress;
|
DRV2605L_tx_register[0] = regaddress;
|
||||||
if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1,
|
if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1,
|
||||||
DRV2605L_tx_register, 1,
|
DRV2605L_tx_register, 1,
|
||||||
@@ -42,14 +47,13 @@ uint8_t DRV_read(uint8_t regaddress) {
|
|||||||
printf("err reading reg \n");
|
printf("err reading reg \n");
|
||||||
}
|
}
|
||||||
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
||||||
|
#endif
|
||||||
return DRV2605L_read_register;
|
return DRV2605L_read_register;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DRV_init(void)
|
void DRV_init(void)
|
||||||
{
|
{
|
||||||
i2c_init();
|
i2c_init();
|
||||||
i2c_start(DRV2605L_BASE_ADDRESS);
|
|
||||||
|
|
||||||
/* 0x07 sets DRV2605 into calibration mode */
|
/* 0x07 sets DRV2605 into calibration mode */
|
||||||
DRV_write(DRV_MODE,0x07);
|
DRV_write(DRV_MODE,0x07);
|
||||||
|
|
||||||
@@ -104,21 +108,17 @@ void DRV_init(void)
|
|||||||
C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME;
|
C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME;
|
||||||
DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte);
|
DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte);
|
||||||
DRV_write(DRV_LIB_SELECTION,LIB_SELECTION);
|
DRV_write(DRV_LIB_SELECTION,LIB_SELECTION);
|
||||||
//start autocalibration
|
|
||||||
DRV_write(DRV_GO, 0x01);
|
DRV_write(DRV_GO, 0x01);
|
||||||
|
|
||||||
/* 0x00 sets DRV2605 out of standby and to use internal trigger
|
/* 0x00 sets DRV2605 out of standby and to use internal trigger
|
||||||
* 0x01 sets DRV2605 out of standby and to use external trigger */
|
* 0x01 sets DRV2605 out of standby and to use external trigger */
|
||||||
DRV_write(DRV_MODE,0x00);
|
DRV_write(DRV_MODE,0x00);
|
||||||
|
|
||||||
/* 0x06: LRA library */
|
|
||||||
DRV_write(DRV_WAVEFORM_SEQ_1, 0x01);
|
|
||||||
|
|
||||||
/* 0xB9: LRA, 4x brake factor, medium gain, 7.5x back EMF
|
|
||||||
* 0x39: ERM, 4x brake factor, medium gain, 1.365x back EMF */
|
|
||||||
|
|
||||||
/* TODO: setup auto-calibration as part of initiation */
|
|
||||||
|
|
||||||
|
//Play greeting sequence
|
||||||
|
DRV_write(DRV_GO, 0x00);
|
||||||
|
DRV_write(DRV_WAVEFORM_SEQ_1, DRV_GREETING);
|
||||||
|
DRV_write(DRV_GO, 0x01);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DRV_pulse(uint8_t sequence)
|
void DRV_pulse(uint8_t sequence)
|
||||||
|
|||||||
@@ -31,13 +31,6 @@
|
|||||||
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef RATED_VOLTAGE
|
|
||||||
#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
|
|
||||||
#ifndef V_PEAK
|
|
||||||
#define V_PEAK 2.8
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* LRA specific settings */
|
/* LRA specific settings */
|
||||||
#if FB_ERM_LRA == 1
|
#if FB_ERM_LRA == 1
|
||||||
#ifndef V_RMS
|
#ifndef V_RMS
|
||||||
@@ -49,6 +42,16 @@
|
|||||||
#ifndef F_LRA
|
#ifndef F_LRA
|
||||||
#define F_LRA 205
|
#define F_LRA 205
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef RATED_VOLTAGE
|
||||||
|
#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef RATED_VOLTAGE
|
||||||
|
#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
|
||||||
|
#endif
|
||||||
|
#ifndef V_PEAK
|
||||||
|
#define V_PEAK 2.8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Library Selection */
|
/* Library Selection */
|
||||||
@@ -60,6 +63,13 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef DRV_GREETING
|
||||||
|
#define DRV_GREETING alert_750ms
|
||||||
|
#endif
|
||||||
|
#ifndef DRV_MODE_DEFAULT
|
||||||
|
#define DRV_MODE_DEFAULT strong_click1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Control 1 register settings */
|
/* Control 1 register settings */
|
||||||
#ifndef DRIVE_TIME
|
#ifndef DRIVE_TIME
|
||||||
#define DRIVE_TIME 25
|
#define DRIVE_TIME 25
|
||||||
@@ -162,7 +172,6 @@ void DRV_write(const uint8_t drv_register, const uint8_t settings);
|
|||||||
uint8_t DRV_read(const uint8_t regaddress);
|
uint8_t DRV_read(const uint8_t regaddress);
|
||||||
void DRV_pulse(const uint8_t sequence);
|
void DRV_pulse(const uint8_t sequence);
|
||||||
|
|
||||||
|
|
||||||
typedef enum DRV_EFFECT{
|
typedef enum DRV_EFFECT{
|
||||||
clear_sequence = 0,
|
clear_sequence = 0,
|
||||||
strong_click = 1,
|
strong_click = 1,
|
||||||
@@ -288,6 +297,7 @@ typedef enum DRV_EFFECT{
|
|||||||
smooth_hum3_30 = 121,
|
smooth_hum3_30 = 121,
|
||||||
smooth_hum4_20 = 122,
|
smooth_hum4_20 = 122,
|
||||||
smooth_hum5_10 = 123,
|
smooth_hum5_10 = 123,
|
||||||
|
drv_effect_max = 124,
|
||||||
} DRV_EFFECT;
|
} DRV_EFFECT;
|
||||||
|
|
||||||
/* Register bit array unions */
|
/* Register bit array unions */
|
||||||
|
|||||||
@@ -0,0 +1,248 @@
|
|||||||
|
/* Copyright 2019 ishtob
|
||||||
|
* Driver for haptic feedback written for QMK
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "haptic.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
#include "progmem.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#ifdef DRV2605L
|
||||||
|
#include "DRV2605L.h"
|
||||||
|
#endif
|
||||||
|
#ifdef SOLENOID_ENABLE
|
||||||
|
#include "solenoid.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
haptic_config_t haptic_config;
|
||||||
|
|
||||||
|
void haptic_init(void) {
|
||||||
|
debug_enable = 1; //Debug is ON!
|
||||||
|
if (!eeconfig_is_enabled()) {
|
||||||
|
eeconfig_init();
|
||||||
|
}
|
||||||
|
haptic_config.raw = eeconfig_read_haptic();
|
||||||
|
if (haptic_config.mode < 1){
|
||||||
|
haptic_config.mode = 1;
|
||||||
|
}
|
||||||
|
if (!haptic_config.mode){
|
||||||
|
dprintf("No haptic config found in eeprom, setting default configs\n");
|
||||||
|
haptic_reset();
|
||||||
|
}
|
||||||
|
#ifdef SOLENOID_ENABLE
|
||||||
|
solenoid_setup();
|
||||||
|
dprintf("Solenoid driver initialized\n");
|
||||||
|
#endif
|
||||||
|
#ifdef DRV2605L
|
||||||
|
DRV_init();
|
||||||
|
dprintf("DRV2605 driver initialized\n");
|
||||||
|
#endif
|
||||||
|
eeconfig_debug_haptic();
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_task(void) {
|
||||||
|
#ifdef SOLENOID_ENABLE
|
||||||
|
solenoid_check();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void eeconfig_debug_haptic(void) {
|
||||||
|
dprintf("haptic_config eprom\n");
|
||||||
|
dprintf("haptic_config.enable = %d\n", haptic_config.enable);
|
||||||
|
dprintf("haptic_config.mode = %d\n", haptic_config.mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_enable(void) {
|
||||||
|
haptic_config.enable = 1;
|
||||||
|
xprintf("haptic_config.enable = %u\n", haptic_config.enable);
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_disable(void) {
|
||||||
|
haptic_config.enable = 0;
|
||||||
|
xprintf("haptic_config.enable = %u\n", haptic_config.enable);
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_toggle(void) {
|
||||||
|
if (haptic_config.enable) {
|
||||||
|
haptic_disable();
|
||||||
|
} else {
|
||||||
|
haptic_enable();
|
||||||
|
}
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_feedback_toggle(void){
|
||||||
|
haptic_config.feedback++;
|
||||||
|
if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX)
|
||||||
|
haptic_config.feedback = KEY_PRESS;
|
||||||
|
xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback);
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_buzz_toggle(void) {
|
||||||
|
bool buzz_stat = !haptic_config.buzz;
|
||||||
|
haptic_config.buzz = buzz_stat;
|
||||||
|
haptic_set_buzz(buzz_stat);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_mode_increase(void) {
|
||||||
|
uint8_t mode = haptic_config.mode + 1;
|
||||||
|
#ifdef DRV2605L
|
||||||
|
if (haptic_config.mode >= drv_effect_max) {
|
||||||
|
mode = 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
haptic_set_mode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_mode_decrease(void) {
|
||||||
|
uint8_t mode = haptic_config.mode -1;
|
||||||
|
#ifdef DRV2605L
|
||||||
|
if (haptic_config.mode < 1) {
|
||||||
|
mode = (drv_effect_max - 1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
haptic_set_mode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_dwell_increase(void) {
|
||||||
|
uint8_t dwell = haptic_config.dwell + 1;
|
||||||
|
#ifdef SOLENOID_ENABLE
|
||||||
|
if (haptic_config.dwell >= SOLENOID_MAX_DWELL) {
|
||||||
|
dwell = 1;
|
||||||
|
}
|
||||||
|
solenoid_set_dwell(dwell);
|
||||||
|
#endif
|
||||||
|
haptic_set_dwell(dwell);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_dwell_decrease(void) {
|
||||||
|
uint8_t dwell = haptic_config.dwell -1;
|
||||||
|
#ifdef SOLENOID_ENABLE
|
||||||
|
if (haptic_config.dwell < SOLENOID_MIN_DWELL) {
|
||||||
|
dwell = SOLENOID_MAX_DWELL;
|
||||||
|
}
|
||||||
|
solenoid_set_dwell(dwell);
|
||||||
|
#endif
|
||||||
|
haptic_set_dwell(dwell);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_reset(void){
|
||||||
|
haptic_config.enable = true;
|
||||||
|
uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT;
|
||||||
|
haptic_config.feedback = feedback;
|
||||||
|
#ifdef DRV2605L
|
||||||
|
uint8_t mode = HAPTIC_MODE_DEFAULT;
|
||||||
|
haptic_config.mode = mode;
|
||||||
|
#endif
|
||||||
|
#ifdef SOLENOID_ENABLE
|
||||||
|
uint8_t dwell = SOLENOID_DEFAULT_DWELL;
|
||||||
|
haptic_config.dwell = dwell;
|
||||||
|
#endif
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
|
||||||
|
xprintf("haptic_config.mode = %u\n", haptic_config.mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_set_feedback(uint8_t feedback) {
|
||||||
|
haptic_config.feedback = feedback;
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_set_mode(uint8_t mode) {
|
||||||
|
haptic_config.mode = mode;
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
xprintf("haptic_config.mode = %u\n", haptic_config.mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_set_buzz(uint8_t buzz) {
|
||||||
|
haptic_config.buzz = buzz;
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
xprintf("haptic_config.buzz = %u\n", haptic_config.buzz);
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_set_dwell(uint8_t dwell) {
|
||||||
|
haptic_config.dwell = dwell;
|
||||||
|
eeconfig_update_haptic(haptic_config.raw);
|
||||||
|
xprintf("haptic_config.dwell = %u\n", haptic_config.dwell);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t haptic_get_mode(void) {
|
||||||
|
if (!haptic_config.enable){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return haptic_config.mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t haptic_get_feedback(void) {
|
||||||
|
if (!haptic_config.enable){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return haptic_config.feedback;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t haptic_get_dwell(void) {
|
||||||
|
if (!haptic_config.enable){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return haptic_config.dwell;
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_play(void) {
|
||||||
|
#ifdef DRV2605L
|
||||||
|
uint8_t play_eff = 0;
|
||||||
|
play_eff = haptic_config.mode;
|
||||||
|
DRV_pulse(play_eff);
|
||||||
|
#endif
|
||||||
|
#ifdef SOLENOID_ENABLE
|
||||||
|
solenoid_fire();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_haptic(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (keycode == HPT_ON && record->event.pressed) { haptic_enable(); }
|
||||||
|
if (keycode == HPT_OFF && record->event.pressed) { haptic_disable(); }
|
||||||
|
if (keycode == HPT_TOG && record->event.pressed) { haptic_toggle(); }
|
||||||
|
if (keycode == HPT_RST && record->event.pressed) { haptic_reset(); }
|
||||||
|
if (keycode == HPT_FBK && record->event.pressed) { haptic_feedback_toggle(); }
|
||||||
|
if (keycode == HPT_BUZ && record->event.pressed) { haptic_buzz_toggle(); }
|
||||||
|
if (keycode == HPT_MODI && record->event.pressed) { haptic_mode_increase(); }
|
||||||
|
if (keycode == HPT_MODD && record->event.pressed) { haptic_mode_decrease(); }
|
||||||
|
if (keycode == HPT_DWLI && record->event.pressed) { haptic_dwell_increase(); }
|
||||||
|
if (keycode == HPT_DWLD && record->event.pressed) { haptic_dwell_decrease(); }
|
||||||
|
if (haptic_config.enable) {
|
||||||
|
if ( record->event.pressed ) {
|
||||||
|
// keypress
|
||||||
|
if (haptic_config.feedback < 2) {
|
||||||
|
haptic_play();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//keyrelease
|
||||||
|
if (haptic_config.feedback > 0) {
|
||||||
|
haptic_play();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void haptic_shutdown(void) {
|
||||||
|
#ifdef SOLENOID_ENABLE
|
||||||
|
solenoid_shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/* Copyright 2019 ishtob
|
||||||
|
* Driver for haptic feedback written for QMK
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "quantum.h"
|
||||||
|
#ifdef DRV2605L
|
||||||
|
#include "DRV2605L.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef HAPTIC_FEEDBACK_DEFAULT
|
||||||
|
#define HAPTIC_FEEDBACK_DEFAULT 0
|
||||||
|
#endif
|
||||||
|
#ifndef HAPTIC_MODE_DEFAULT
|
||||||
|
#define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* EEPROM config settings */
|
||||||
|
typedef union {
|
||||||
|
uint32_t raw;
|
||||||
|
struct {
|
||||||
|
bool enable :1;
|
||||||
|
uint8_t feedback :2;
|
||||||
|
uint8_t mode :7;
|
||||||
|
bool buzz :1;
|
||||||
|
uint8_t dwell :7;
|
||||||
|
uint16_t reserved :16;
|
||||||
|
};
|
||||||
|
} haptic_config_t;
|
||||||
|
|
||||||
|
typedef enum HAPTIC_FEEDBACK{
|
||||||
|
KEY_PRESS,
|
||||||
|
KEY_PRESS_RELEASE,
|
||||||
|
KEY_RELEASE,
|
||||||
|
HAPTIC_FEEDBACK_MAX,
|
||||||
|
} HAPTIC_FEEDBACK;
|
||||||
|
|
||||||
|
bool process_haptic(uint16_t keycode, keyrecord_t *record);
|
||||||
|
void haptic_init(void);
|
||||||
|
void haptic_task(void);
|
||||||
|
void eeconfig_debug_haptic(void);
|
||||||
|
void haptic_enable(void);
|
||||||
|
void haptic_disable(void);
|
||||||
|
void haptic_toggle(void);
|
||||||
|
void haptic_feedback_toggle(void);
|
||||||
|
void haptic_mode_increase(void);
|
||||||
|
void haptic_mode_decrease(void);
|
||||||
|
void haptic_mode(uint8_t mode);
|
||||||
|
void haptic_reset(void);
|
||||||
|
void haptic_set_feedback(uint8_t feedback);
|
||||||
|
void haptic_set_mode(uint8_t mode);
|
||||||
|
void haptic_set_dwell(uint8_t dwell);
|
||||||
|
void haptic_set_buzz(uint8_t buzz);
|
||||||
|
void haptic_buzz_toggle(void);
|
||||||
|
uint8_t haptic_get_mode(void);
|
||||||
|
uint8_t haptic_get_feedback(void);
|
||||||
|
void haptic_dwell_increase(void);
|
||||||
|
void haptic_dwell_decrease(void);
|
||||||
|
|
||||||
|
void haptic_play(void);
|
||||||
|
void haptic_shutdown(void);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
/* Copyright 2018 mtdjr - modified by ishtob
|
||||||
|
* Driver for solenoid written for QMK
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <timer.h>
|
||||||
|
#include "solenoid.h"
|
||||||
|
#include "haptic.h"
|
||||||
|
|
||||||
|
bool solenoid_on = false;
|
||||||
|
bool solenoid_buzzing = false;
|
||||||
|
uint16_t solenoid_start = 0;
|
||||||
|
uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL;
|
||||||
|
|
||||||
|
extern haptic_config_t haptic_config;
|
||||||
|
|
||||||
|
|
||||||
|
void solenoid_buzz_on(void) {
|
||||||
|
haptic_set_buzz(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_buzz_off(void) {
|
||||||
|
haptic_set_buzz(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_set_buzz(int buzz) {
|
||||||
|
haptic_set_buzz(buzz);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void solenoid_dwell_minus(uint8_t solenoid_dwell) {
|
||||||
|
if (solenoid_dwell > 0) solenoid_dwell--;
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_dwell_plus(uint8_t solenoid_dwell) {
|
||||||
|
if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_set_dwell(uint8_t dwell) {
|
||||||
|
solenoid_dwell = dwell;
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_stop(void) {
|
||||||
|
writePinLow(SOLENOID_PIN);
|
||||||
|
solenoid_on = false;
|
||||||
|
solenoid_buzzing = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_fire(void) {
|
||||||
|
if (!haptic_config.buzz && solenoid_on) return;
|
||||||
|
if (haptic_config.buzz && solenoid_buzzing) return;
|
||||||
|
|
||||||
|
solenoid_on = true;
|
||||||
|
solenoid_buzzing = true;
|
||||||
|
solenoid_start = timer_read();
|
||||||
|
writePinHigh(SOLENOID_PIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_check(void) {
|
||||||
|
uint16_t elapsed = 0;
|
||||||
|
|
||||||
|
if (!solenoid_on) return;
|
||||||
|
|
||||||
|
elapsed = timer_elapsed(solenoid_start);
|
||||||
|
|
||||||
|
//Check if it's time to finish this solenoid click cycle
|
||||||
|
if (elapsed > solenoid_dwell) {
|
||||||
|
solenoid_stop();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Check whether to buzz the solenoid on and off
|
||||||
|
if (haptic_config.buzz) {
|
||||||
|
if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){
|
||||||
|
if (!solenoid_buzzing) {
|
||||||
|
solenoid_buzzing = true;
|
||||||
|
writePinHigh(SOLENOID_PIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (solenoid_buzzing) {
|
||||||
|
solenoid_buzzing = false;
|
||||||
|
writePinLow(SOLENOID_PIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_setup(void) {
|
||||||
|
setPinOutput(SOLENOID_PIN);
|
||||||
|
solenoid_fire();
|
||||||
|
}
|
||||||
|
|
||||||
|
void solenoid_shutdown(void) {
|
||||||
|
writePinLow(SOLENOID_PIN);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
/* Copyright 2018 mtdjr - modified by ishtob
|
||||||
|
* Driver for solenoid written for QMK
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef SOLENOID_DEFAULT_DWELL
|
||||||
|
#define SOLENOID_DEFAULT_DWELL 12
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_MAX_DWELL
|
||||||
|
#define SOLENOID_MAX_DWELL 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_MIN_DWELL
|
||||||
|
#define SOLENOID_MIN_DWELL 4
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_ACTIVE
|
||||||
|
#define SOLENOID_ACTIVE false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef SOLENOID_PIN
|
||||||
|
#define SOLENOID_PIN F6
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void solenoid_buzz_on(void);
|
||||||
|
void solenoid_buzz_off(void);
|
||||||
|
void solenoid_set_buzz(int buzz);
|
||||||
|
|
||||||
|
void solenoid_dwell_minus(uint8_t solenoid_dwell);
|
||||||
|
void solenoid_dwell_plus(uint8_t solenoid_dwell);
|
||||||
|
void solenoid_set_dwell(uint8_t dwell);
|
||||||
|
|
||||||
|
void solenoid_stop(void);
|
||||||
|
void solenoid_fire(void);
|
||||||
|
|
||||||
|
void solenoid_check(void);
|
||||||
|
|
||||||
|
void solenoid_setup(void);
|
||||||
|
void solenoid_shutdown(void);
|
||||||
@@ -46,3 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#define PRODUCT "Vee's hotswappable Helidox/Corne/CRKBD split keeb"
|
#define PRODUCT "Vee's hotswappable Helidox/Corne/CRKBD split keeb"
|
||||||
|
|
||||||
|
#define NO_ACTION_MACRO
|
||||||
|
#define NO_ACTION_FUNCTION
|
||||||
@@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//,-----------------------------------------. ,-----------------------------------------.
|
//,-----------------------------------------. ,-----------------------------------------.
|
||||||
RST, LRST, XXXXX, XXXXX, XXXXX, ERST, MNXT, MPRV, MFFD, MRWD, XXXXX, EJCT,\
|
RST, LRST, XXXXX, XXXXX, XXXXX, ERST, MNXT, MPRV, MFFD, MRWD, XXXXX, EJCT,\
|
||||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\
|
LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, INS,\
|
||||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
LMOD, LHUD, LSAD, LVAD, PGDN, END, BRID, BRIU, VOLD, VOLU, MUTE, MPLY,\
|
LMOD, LHUD, LSAD, LVAD, PGDN, END, BRID, BRIU, VOLD, VOLU, MUTE, MPLY,\
|
||||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
|
EXTRAFLAGS += -flto
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
MIDI_ENABLE = no # MIDI controls
|
MIDI_ENABLE = no # MIDI controls
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
|||||||
@@ -192,4 +192,7 @@
|
|||||||
//#define DRIVER_LED_TOTAL RGBLED_NUM
|
//#define DRIVER_LED_TOTAL RGBLED_NUM
|
||||||
|
|
||||||
//#define RGB_MATRIX_KEYPRESSES
|
//#define RGB_MATRIX_KEYPRESSES
|
||||||
|
|
||||||
|
#define SOLENOID_PIN A14
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -190,8 +190,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `--------------------------------------------------------------------------------------------------------'
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = LAYOUT(
|
[_ADJUST] = LAYOUT(
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
RESET, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST , _______, _______, _______, _______, _______, _______, \
|
||||||
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
||||||
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
||||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG\
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG\
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `--------------------------------------------------------------------------------------------------------'
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = LAYOUT_wrapper(
|
[_ADJUST] = LAYOUT_wrapper(
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
_______, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST, _______, _______, _______, _______, _______, _______, \
|
||||||
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
||||||
_______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
_______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
||||||
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
||||||
|
|||||||
@@ -52,6 +52,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover
|
|||||||
CUSTOM_MATRIX = yes # Custom matrix file
|
CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
HAPTIC_ENABLE = DRV2605L
|
HAPTIC_ENABLE += DRV2605L
|
||||||
QWIIC_ENABLE += MICRO_OLED
|
QWIIC_ENABLE += MICRO_OLED
|
||||||
# SERIAL_LINK_ENABLE = yes
|
# SERIAL_LINK_ENABLE = yes
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
#include "qwiic.h"
|
#include "qwiic.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "DRV2605L.h"
|
#include "haptic.h"
|
||||||
|
|
||||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||||
|
|
||||||
@@ -167,20 +167,12 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
#ifdef DRV2605L
|
|
||||||
DRV_init();
|
|
||||||
#endif
|
|
||||||
queue_for_send = true;
|
queue_for_send = true;
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
void matrix_scan_kb(void) {
|
||||||
|
|
||||||
if (queue_for_send) {
|
if (queue_for_send) {
|
||||||
#ifdef DRV2605L
|
|
||||||
DRV_EFFECT play_eff = strong_click;
|
|
||||||
DRV_pulse(play_eff);
|
|
||||||
#endif
|
|
||||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||||
read_host_led_state();
|
read_host_led_state();
|
||||||
draw_ui();
|
draw_ui();
|
||||||
|
|||||||
@@ -10,4 +10,4 @@
|
|||||||

|

|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
To build the default keymap, simply run `make kbd75/rev2:edulpn`.
|
To build the default keymap, simply run `make kbdfans/kbd75/rev2:edulpn`.
|
||||||
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
|
|
||||||
[MAC_LAYER] = LAYOUT(
|
[MAC_LAYER] = LAYOUT(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, TG(MAC_LAYER), KC_DEL,
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, TG(WINDOWS_LAYER), KC_DEL,
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME,
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END,
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
secret.h
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||||
|
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||||
|
|
||||||
|
// Most tactile encoders have detents every 4 stages
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,196 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "secret.h"
|
||||||
|
|
||||||
|
enum planck_layers {
|
||||||
|
_DEFAULT,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
_FUNCTION,
|
||||||
|
_GAME,
|
||||||
|
_GAMERAISE
|
||||||
|
};
|
||||||
|
|
||||||
|
#define LOWER MO(_LOWER)
|
||||||
|
#define RAISE MO(_RAISE)
|
||||||
|
#define FUNCTION MO(_FUNCTION)
|
||||||
|
#define GAMER MO(_GAMERAISE)
|
||||||
|
|
||||||
|
#define NO_OE KC_SCLN
|
||||||
|
#define NO_AE KC_QUOT
|
||||||
|
#define NO_AA KC_LBRC
|
||||||
|
#define NO_EXCL LSFT(KC_1)
|
||||||
|
#define NO_QEST LSFT(KC_MINS)
|
||||||
|
#define NO_APOS KC_BSLS
|
||||||
|
#define NO_QUOT LSFT(KC_2)
|
||||||
|
#define NO_UMLA KC_RBRC
|
||||||
|
#define NO_HASH LSFT(KC_3)
|
||||||
|
#define NO_FSLS LSFT(KC_7)
|
||||||
|
#define NO_LPAR LSFT(KC_8)
|
||||||
|
#define NO_RPAR LSFT(KC_9)
|
||||||
|
#define NO_ALFA ALGR(KC_2)
|
||||||
|
#define NO_AMPE LSFT(KC_6)
|
||||||
|
#define NO_USDO ALGR(KC_4)
|
||||||
|
#define NO_PERC LSFT(KC_5)
|
||||||
|
#define NO_BSLS KC_EQL
|
||||||
|
#define NO_ASTE LSFT(KC_BSLS)
|
||||||
|
#define NO_LBRA ALGR(KC_7)
|
||||||
|
#define NO_RBRA ALGR(KC_0)
|
||||||
|
#define NO_LBRC ALGR(KC_8)
|
||||||
|
#define NO_RBRC ALGR(KC_9)
|
||||||
|
#define NO_ANBR KC_NUBS
|
||||||
|
#define NO_DASH KC_SLSH
|
||||||
|
#define NO_PLUS KC_MINS
|
||||||
|
#define NO_EQUA LSFT(KC_0)
|
||||||
|
|
||||||
|
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||||
|
#define STEAM LSFT(KC_F7)
|
||||||
|
#define WKILL LALT(KC_F4)
|
||||||
|
#define BWORD LCTL(KC_LEFT)
|
||||||
|
#define FWORD LCTL(KC_RIGHT)
|
||||||
|
|
||||||
|
float onsong[][2] = SONG(MARIO_MUSHROOM);
|
||||||
|
float offsong[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PWD = SAFE_RANGE,
|
||||||
|
MAIL,
|
||||||
|
GAMEON,
|
||||||
|
GAMEOFF
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case PWD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(pwd_str);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MAIL:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(mail_str);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GAMEON:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(onsong);
|
||||||
|
#endif
|
||||||
|
layer_on(_GAME);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case GAMEOFF:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
PLAY_SONG(offsong);
|
||||||
|
#endif
|
||||||
|
layer_off(_GAME);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Default
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | BkSp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | Ø | Æ |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | , | . | Å | Shift|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Win | Alt | Lower| Space | Enter | Raise| AltGr| Game | Fn |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DEFAULT] = LAYOUT_planck_grid(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_GESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_OE, NO_AE,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_AA, KC_RSFT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_NO, KC_SPC, KC_NO, KC_ENT, RAISE, KC_RALT, GAMEON, FUNCTION
|
||||||
|
),
|
||||||
|
/* Lower
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | <Word| Up | Word>| PgUp | | | | F7 | F8 | F9 | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | BkSp | Left | Down | Right| PgDn | | | | F4 | F5 | F6 | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
|
* | Shift| Home | | End | | | | | F1 | F2 | F3 | Shift|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Win | Alt | Lower| Space | Enter | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_planck_grid(
|
||||||
|
KC_TRNS, BWORD, KC_UP, FWORD, KC_PGUP, KC_NO, KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_DEL,
|
||||||
|
KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_F4, KC_F5, KC_F6, KC_NO,
|
||||||
|
KC_TRNS, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_F1, KC_F2, KC_F3, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
/* Raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | ! | ? | ' | " | ¨ | | / | 7 | 8 | 9 | Ins |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | BkSp | @ | & | # | $ | % | <> | \ | 4 | 5 | 6 | * |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| ( | ) | { | } | [ | ] | 0 | 1 | 2 | 3 | Shift|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | Win | Alt | | Space | Enter | Raise| - | + | = |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_planck_grid(
|
||||||
|
KC_TRNS, NO_EXCL, NO_QEST, NO_APOS, NO_QUOT, NO_UMLA, KC_NO, NO_FSLS, KC_7, KC_8, KC_9, KC_INS,
|
||||||
|
KC_BSPC, NO_ALFA, NO_AMPE, NO_HASH, NO_USDO, NO_PERC, NO_ANBR, NO_BSLS, KC_4, KC_5, KC_6, NO_ASTE,
|
||||||
|
KC_TRNS, NO_LPAR, NO_RPAR, NO_LBRA, NO_RBRA, NO_LBRC, NO_RBRC, KC_0, KC_1, KC_2, KC_3, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, NO_DASH, NO_PLUS, NO_EQUA
|
||||||
|
),
|
||||||
|
/* Function
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | | | | | |TskMgr| | | | | Pwd | Vol+ |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Reset| | | | | | | | Wkill| | | Vol- |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | Mail | | | | VolM |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | Play/Pause | Next | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FUNCTION] = LAYOUT_planck_grid(
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TSKMGR, KC_NO, KC_NO, KC_NO, KC_NO, PWD, KC_VOLU,
|
||||||
|
RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, WKILL, KC_NO, KC_NO, KC_VOLD,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MAIL, KC_NO, KC_NO, KC_NO, KC_MUTE,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MPLY, KC_NO, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
/* Game
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | BkSp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | A | S | D | F | G | H | J | K | L | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | N | M | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | | Alt | Raise| Space | Enter | | | | |
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_GAME] = LAYOUT_planck_grid(
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_NO, KC_NO,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_LCTL, KC_NO, KC_LALT, GAMER, KC_NO, KC_SPC, KC_NO, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
/* Game raise
|
||||||
|
* ,-----------------------------------------------------------------------------------.
|
||||||
|
* | Tab | 1 | 2 | 3 | 4 | 5 | | | | | | Vol+ |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
|
* | Esc | F1 | F2 | F3 | F4 | F5 | | | | | | Vol- |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| | | | | | | | | | | VolM |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Ctrl | | Alt | | Space | Enter | | | Def | Steam|
|
||||||
|
* `-----------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_GAMERAISE] = LAYOUT_planck_grid(
|
||||||
|
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLU,
|
||||||
|
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_VOLD,
|
||||||
|
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE,
|
||||||
|
KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_TRNS, KC_NO, KC_NO, GAMEOFF, STEAM
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
About
|
||||||
|
------
|
||||||
|
|
||||||
|
A simple Norwegian Layout.
|
||||||
|
|
||||||
|
Layout
|
||||||
|
-------
|
||||||
|
|
||||||
|

|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
SRC += muse.c
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
AUDIO_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
|
||||||
|
DEFAULT_FOLDER = planck/rev6
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"keyboard_name": "Prime_M",
|
"keyboard_name": "Prime_M",
|
||||||
"url": "https://www.primekb.com",
|
"url": "https://www.primekb.com",
|
||||||
@@ -5,8 +6,43 @@
|
|||||||
"width": 6,
|
"width": 6,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT_ortho_5x6": {
|
||||||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}]
|
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}]
|
||||||
|
},
|
||||||
|
"LAYOUT_numpad_5x6": {
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
{"x":4, "y":0},
|
||||||
|
{"x":5, "y":0},
|
||||||
|
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
{"x":3, "y":1},
|
||||||
|
{"x":4, "y":1},
|
||||||
|
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2},
|
||||||
|
{"x":3, "y":2},
|
||||||
|
{"x":4, "y":2},
|
||||||
|
{"x":5, "y":1, "h":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1, "y":3},
|
||||||
|
{"x":2, "y":3},
|
||||||
|
{"x":3, "y":3},
|
||||||
|
{"x":4, "y":3},
|
||||||
|
|
||||||
|
{"x":0, "y":4},
|
||||||
|
{"x":1, "y":4},
|
||||||
|
{"x":2, "y":4, "w":2},
|
||||||
|
{"x":4, "y":4},
|
||||||
|
{"x":5, "y":3, "h":2}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,28 +22,28 @@ enum custom_keycodes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT(
|
[0] = LAYOUT_ortho_5x6(
|
||||||
KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC),
|
KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, LT(2, KC_BSPC),
|
||||||
KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL,
|
KC_F1, KC_F2, KC_P7, KC_P8, KC_P9, KC_DEL,
|
||||||
KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS,
|
KC_F3, KC_F4, KC_P4, KC_P5, KC_P6, KC_PMNS,
|
||||||
KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS,
|
KC_F5, KC_F6, KC_P1, KC_P2, KC_P3, KC_PPLS,
|
||||||
KC_LCTL, KC_LALT, TO(1), KC_P0, KC_PDOT, KC_ENT
|
KC_LCTL, KC_LALT, TO(1), KC_P0, KC_PDOT, KC_PENT
|
||||||
),
|
),
|
||||||
|
|
||||||
[1] = LAYOUT(
|
[1] = LAYOUT_ortho_5x6(
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, LT(2, KC_F9),
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, LT(2, KC_F9),
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G,
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
|
||||||
KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC
|
KC_LCTL, KC_LALT, TO(0), KC_P, KC_H, KC_SPC
|
||||||
),
|
),
|
||||||
|
|
||||||
[2] = LAYOUT(
|
[2] = LAYOUT_ortho_5x6(
|
||||||
BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
BL_TOGG, BL_STEP, _______, _______, _______, _______,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
_______, _______, _______, _______, _______, _______,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
_______, _______, _______, _______, _______, _______,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
_______, _______, _______, _______, _______, KC_VOLU,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD
|
_______, _______, _______, _______, KC_MUTE, KC_VOLD
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/* Copyright 2018 Jumail Mundekkat
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/* Copyright 2018 Jumail Mundekkat
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_numpad_5x6(
|
||||||
|
KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_A, KC_B, KC_P7, KC_P8, KC_P9,
|
||||||
|
KC_C, KC_D, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_E, KC_F, KC_P1, KC_P2, KC_P3,
|
||||||
|
KC_LCTL, TG(1), KC_P0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_numpad_5x6(
|
||||||
|
RESET, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_A, KC_B, KC_HOME, KC_UP, KC_PGUP,
|
||||||
|
KC_C, KC_D, KC_LEFT, KC_NO, KC_RGHT, KC_PPLS,
|
||||||
|
KC_E, KC_F, KC_END, KC_DOWN, KC_PGDN,
|
||||||
|
KC_LCTL, _______, KC_INS, KC_DEL, KC_PENT
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for prime_m
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#ifndef PRIME_M_H
|
#pragma once
|
||||||
#define PRIME_M_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#define ___ KC_NO
|
||||||
|
|
||||||
#define LAYOUT( \
|
#define LAYOUT_ortho_5x6( \
|
||||||
K00, K01, K02, K03, K04, K05, \
|
K00, K01, K02, K03, K04, K05, \
|
||||||
K10, K11, K12, K13, K14, K15, \
|
K10, K11, K12, K13, K14, K15, \
|
||||||
K20, K21, K22, K23, K24, K25, \
|
K20, K21, K22, K23, K24, K25, \
|
||||||
@@ -32,4 +32,16 @@
|
|||||||
{ K40, K41, K42, K43, K44, K45 } \
|
{ K40, K41, K42, K43, K44, K45 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#define LAYOUT_numpad_5x6( \
|
||||||
|
K00, K01, K02, K03, K04, K05, \
|
||||||
|
K10, K11, K12, K13, K14, \
|
||||||
|
K20, K21, K22, K23, K24, K15, \
|
||||||
|
K30, K31, K32, K33, K34, \
|
||||||
|
K40, K41, K42, K44, K35 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05 }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15 }, \
|
||||||
|
{ K20, K21, K22, K23, K24, ___ }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35 }, \
|
||||||
|
{ K40, K41, K42, ___, K44, ___ } \
|
||||||
|
}
|
||||||
@@ -78,3 +78,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||||
|
|
||||||
|
LAYOUTS = ortho_5x6 numpad_5x6
|
||||||
@@ -139,12 +139,12 @@
|
|||||||
{"label":"Left", "x":13.5, "y":4},
|
{"label":"Left", "x":13.5, "y":4},
|
||||||
{"label":"Down", "x":14.5, "y":4},
|
{"label":"Down", "x":14.5, "y":4},
|
||||||
{"label":"Right", "x":15.5, "y":4},
|
{"label":"Right", "x":15.5, "y":4},
|
||||||
{"label":"Space", "x":5.5, "y":5, "H":2},
|
{"label":"Space", "x":5.5, "y":5, "h":2},
|
||||||
{"label":"Ins", "x":6.5, "y":5},
|
{"label":"Ins", "x":6.5, "y":5},
|
||||||
{"label":"Del", "x":6.5, "y":6},
|
{"label":"Del", "x":6.5, "y":6},
|
||||||
{"label":"Home", "x":9.5, "y":5},
|
{"label":"Home", "x":9.5, "y":5},
|
||||||
{"label":"End", "x":9.5, "y":6},
|
{"label":"End", "x":9.5, "y":6},
|
||||||
{"label":"Space", "x":10.5, "y":5, "H":2}
|
{"label":"Space", "x":10.5, "y":5, "h":2}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap _BL: (Base Layer) Default Layer
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |Del |
|
||||||
|
* |------------------------------------------------------- -----|
|
||||||
|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|PgUp|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|PgDn|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* |Ctrl|Alt |LGUI| Space |Alt| FN|Ctrl|Lef|Dow|Rig |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BL] = LAYOUT_iso(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, \
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, \
|
||||||
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Keymap _FL1: Function Layer 1
|
||||||
|
* ,----------------------------------------------------------------.
|
||||||
|
* | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | :D |
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | |LMB| Up|RMB| | | | | | | | | | | |
|
||||||
|
* |------------------------------------------------------- -----|
|
||||||
|
* | |Lef|Dow|Rig| | | | | | | | | | |Home|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | | L+|LED| L-| | V+| V-|Mut| | MsBtn|↑ | End|
|
||||||
|
* |----------------------------------------------------------------|
|
||||||
|
* | | | | Reset | | | | ← | ↓ | → |
|
||||||
|
* `----------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FL] = LAYOUT_iso(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \
|
||||||
|
_______, KC_BTN1, KC_UP, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, \
|
||||||
|
_______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, KC_MS_U, KC_END, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# Custom Tada68 layout for ISO UK with Apple-y tweaks
|
||||||
|
|
||||||
|
This layout is based on the [ISO UK](../iso-uk) layout, with the following
|
||||||
|
changes:
|
||||||
|
|
||||||
|
Swap Win and Alt on the left side (Option and Command on macOS)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Please see the [Tada68 readme](../../readme.md). Make the firmware wih the
|
||||||
|
following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
make tada68:mattgemmell:flashbin
|
||||||
|
```
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
#define _BL 0
|
#define _BL 0
|
||||||
#define _FL 1
|
#define _FL 1
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
|
|
||||||
enum rys_keycodes {
|
enum rys_keycodes {
|
||||||
PSTOKEN = SAFE_RANGE,
|
PSTOKEN = SAFE_RANGE,
|
||||||
QSTOKEN
|
QSTOKEN
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define _BL0 0
|
||||||
|
#define _FL1 1
|
||||||
|
#define _FL2 2
|
||||||
|
#define _FL3 3
|
||||||
|
|
||||||
|
#define MACOSLK LCTL(LGUI(KC_Q)) // CTRL+CMD+Q == screen lock in macOS 10.13+
|
||||||
|
|
||||||
|
enum rys_keycodes {
|
||||||
|
STOKEN1 = SAFE_RANGE,
|
||||||
|
STOKEN2,
|
||||||
|
STOKEN3,
|
||||||
|
STOKEN4
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch(keycode) {
|
||||||
|
case STOKEN1:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(RYS_STOKEN1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case STOKEN2:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(RYS_STOKEN2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case STOKEN3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(RYS_STOKEN3);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case STOKEN4:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING(RYS_STOKEN4);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* Keymap base layer (_BL0) - default layer
|
||||||
|
* ,---------------------------.
|
||||||
|
* | ST1 | ST2 | ST3 | ST4 |
|
||||||
|
* |---------------------------|
|
||||||
|
* | | LOCK | VOL- | VOL+ |
|
||||||
|
* `---------------------------'
|
||||||
|
*/
|
||||||
|
[_BL0] = LAYOUT(
|
||||||
|
STOKEN1, STOKEN2, STOKEN3, STOKEN4,
|
||||||
|
_______, MACOSLK, KC__VOLDOWN, KC__VOLUP),
|
||||||
|
/* Keymap base layer (_FL1) - function layer 1
|
||||||
|
* ,---------------------------.
|
||||||
|
* | | | | |
|
||||||
|
* |---------------------------|
|
||||||
|
* | | | | |
|
||||||
|
* `---------------------------'
|
||||||
|
*/
|
||||||
|
[_FL1] = LAYOUT(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______),
|
||||||
|
/* Keymap base layer (_FL2) - function layer 2
|
||||||
|
* ,---------------------------.
|
||||||
|
* | | | | |
|
||||||
|
* |---------------------------|
|
||||||
|
* | | | | |
|
||||||
|
* `---------------------------'
|
||||||
|
*/
|
||||||
|
[_FL2] = LAYOUT(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______),
|
||||||
|
/* Keymap base layer (_FL3) - function layer 3
|
||||||
|
* ,---------------------------.
|
||||||
|
* | | | | |
|
||||||
|
* |---------------------------|
|
||||||
|
* | | | | |
|
||||||
|
* `---------------------------'
|
||||||
|
*/
|
||||||
|
[_FL3] = LAYOUT(
|
||||||
|
_______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______),
|
||||||
|
};
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
RYS_STOKEN1 = "$(shell security find-generic-password -a qmk -s wt8a-1 -w)"
|
||||||
|
RYS_STOKEN2 = "$(shell security find-generic-password -a qmk -s wt8a-2 -w)"
|
||||||
|
RYS_STOKEN3 = "$(shell security find-generic-password -a qmk -s wt8a-3 -w)"
|
||||||
|
RYS_STOKEN4 = "$(shell security find-generic-password -a qmk -s wt8a-4 -w)"
|
||||||
|
|
||||||
|
CFLAGS += -DRYS_STOKEN1=\"$(RYS_STOKEN1)\"
|
||||||
|
CFLAGS += -DRYS_STOKEN2=\"$(RYS_STOKEN2)\"
|
||||||
|
CFLAGS += -DRYS_STOKEN3=\"$(RYS_STOKEN3)\"
|
||||||
|
CFLAGS += -DRYS_STOKEN4=\"$(RYS_STOKEN4)\"
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define _BL 0
|
||||||
|
#define _FL 1
|
||||||
|
#define _LL 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
MACRO_STRING
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
// 0: Base Layer
|
||||||
|
[_BL] = LAYOUT_all(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, \
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
MO(_LL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \
|
||||||
|
KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, \
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(_FL), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||||
|
|
||||||
|
// 1: Function Layer
|
||||||
|
[_FL] = LAYOUT_all(
|
||||||
|
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
|
||||||
|
XXXXXXX, RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, RGB_HUD, XXXXXXX, RGB_VAI, RGB_VAD, XXXXXXX, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, MACRO_STRING, XXXXXXX, F(0), KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT),
|
||||||
|
|
||||||
|
[_LL] = LAYOUT_all(
|
||||||
|
XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, \
|
||||||
|
XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC__MUTE, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MPLY, \
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, F(0), KC_MRWD, KC_VOLD, KC_MFFD),
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
// Macros
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case MACRO_STRING:
|
||||||
|
if(record->event.pressed){
|
||||||
|
SEND_STRING("My Custom String");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Loop
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
// Empty
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# Keyboard Layout by Styr
|
||||||
|
|
||||||
|
## Additional Notes
|
||||||
|
Default Keymap for XD60 as indicated on the original sale page.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
To build the default keymap, simply run `make xd60/rev3:styr`.
|
||||||
@@ -6,11 +6,16 @@ Compact 60% with arrows.
|
|||||||

|

|
||||||
|
|
||||||
Keyboard Maintainer: QMK Community
|
Keyboard Maintainer: QMK Community
|
||||||
Hardware Supported: XD60 PCB
|
Hardware Supported: XD60 PCB rev2 & rev3
|
||||||
Hardware Availability: https://www.massdrop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open
|
Hardware Availability: https://www.massdrop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
With the implementation of Rev3 you need to specify the Rev you want to build.
|
||||||
|
To build for a Rev2 with a default keymap:
|
||||||
|
|
||||||
make xd60:default
|
```make xd60/rev2:default```
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
To build for a Rev3 with a default keymap:
|
||||||
|
|
||||||
|
```make xd60/rev3:default```
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2019 Rodrigo Feijao <hello@rodrigofeijao.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6363
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER XIUDI
|
||||||
|
#define PRODUCT XD60rev3
|
||||||
|
#define DESCRIPTION XD60 rev3 Keyboard PCB by XIUDI
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
|
||||||
|
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Backlight Setup */
|
||||||
|
#define BACKLIGHT_PIN F5
|
||||||
|
#define BACKLIGHT_LEVELS 6
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* RGB Underglow
|
||||||
|
* F6 PIN for XD60v3 that has pre-soldered LEDs
|
||||||
|
*/
|
||||||
|
#define RGB_DI_PIN F6
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 12
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
# MCU name
|
||||||
|
# MCU = at90usb1287
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
# LUFA specific
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
LAYOUTS = 60_ansi
|
||||||
@@ -11,9 +11,6 @@
|
|||||||
#define SFLOCK 11 // symbols arrows and F keys on F held down
|
#define SFLOCK 11 // symbols arrows and F keys on F held down
|
||||||
#define SJLOCK 12 // same as Flock but with fall thru J and mapped to J held down
|
#define SJLOCK 12 // same as Flock but with fall thru J and mapped to J held down
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
// Sends macro when key is tapped, presses mod when key is held
|
// Sends macro when key is tapped, presses mod when key is held
|
||||||
#define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \
|
#define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \
|
||||||
( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \
|
( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include "eeprom.h"
|
#include "eeprom.h"
|
||||||
|
|
||||||
#define LAYER_ON(pos) ((layer_state) & (1<<(pos)))
|
#define LAYER_ON(pos) ((layer_state) & (1<<(pos)))
|
||||||
#define _______ KC_TRNS
|
|
||||||
|
|
||||||
#define EECONFIG_BELAK_MAGIC (uint16_t)0xBE42
|
#define EECONFIG_BELAK_MAGIC (uint16_t)0xBE42
|
||||||
|
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ SRC += ../drashna/keymap.c
|
|||||||
ifneq (,$(findstring ergodox_ez,$(KEYBOARD)))
|
ifneq (,$(findstring ergodox_ez,$(KEYBOARD)))
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
RGB_MATRIX_ENABLE = yes
|
RGB_MATRIX_ENABLE = yes
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
endif
|
endif
|
||||||
@@ -10,10 +10,6 @@
|
|||||||
#define NUMP 3 // numpad
|
#define NUMP 3 // numpad
|
||||||
#define ARRW 4 // function, media, arrow keys
|
#define ARRW 4 // function, media, arrow keys
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
// Tap Dancing
|
// Tap Dancing
|
||||||
void dance_lock (qk_tap_dance_state_t *state, void *user_data) {
|
void dance_lock (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (state->count == 1) { // Press once for NUMLOCK
|
if (state->count == 1) { // Press once for NUMLOCK
|
||||||
|
|||||||
@@ -9,8 +9,6 @@
|
|||||||
#define SYMBOLS 1 // symbols
|
#define SYMBOLS 1 // symbols
|
||||||
#define MEDIA 2 // media keys
|
#define MEDIA 2 // media keys
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TD_BSPC = 0
|
TD_BSPC = 0
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ enum custom_keycodes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Redefine Key Names for Readaibilty
|
//Redefine Key Names for Readaibilty
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
#define SCRN_CLIPB LCTL(LGUI(LSFT(KC_4)))
|
#define SCRN_CLIPB LCTL(LGUI(LSFT(KC_4)))
|
||||||
#define CHRM_L LALT(LGUI(KC_LEFT)) //Move left one tab in Chrome
|
#define CHRM_L LALT(LGUI(KC_LEFT)) //Move left one tab in Chrome
|
||||||
#define CHRM_R LALT(LGUI(KC_RIGHT)) //Move right one tab in Chrome
|
#define CHRM_R LALT(LGUI(KC_RIGHT)) //Move right one tab in Chrome
|
||||||
|
|||||||
@@ -31,11 +31,6 @@ extern keymap_config_t keymap_config;
|
|||||||
#define QWERTY M(_QW)
|
#define QWERTY M(_QW)
|
||||||
#define COLEMAK M(_CM)
|
#define COLEMAK M(_CM)
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Layer 0 : Dvorak
|
/* Layer 0 : Dvorak
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ enum custom_keycodes {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define KC_ KC_TRNS
|
#define KC_ KC_TRNS
|
||||||
#define _______ KC_TRNS
|
|
||||||
|
|
||||||
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
#define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen
|
||||||
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
#define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen
|
||||||
|
|||||||
@@ -20,10 +20,6 @@ enum custom_keycodes {
|
|||||||
ADJUST,
|
ADJUST,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Colemak
|
/* Colemak
|
||||||
|
|||||||
@@ -33,10 +33,6 @@ enum custom_keycodes {
|
|||||||
EXT_PLV
|
EXT_PLV
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Qwerty
|
/* Qwerty
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ enum custom_keycodes {
|
|||||||
ADJUST,
|
ADJUST,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Qwerty
|
/* Qwerty
|
||||||
@@ -211,4 +207,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -54,10 +54,6 @@ enum custom_keycodes {
|
|||||||
#define HYPR_1 HYPR(KC_EXLM) // Send Hyper + !.
|
#define HYPR_1 HYPR(KC_EXLM) // Send Hyper + !.
|
||||||
#define HYPR_2 HYPR(KC_AT) // Send Hyper + @.
|
#define HYPR_2 HYPR(KC_AT) // Send Hyper + @.
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Qwerty
|
/* Qwerty
|
||||||
|
|||||||
@@ -33,10 +33,6 @@ const uint8_t flicker_max_levels = 7;
|
|||||||
uint8_t flicker_restore_level = 0;
|
uint8_t flicker_restore_level = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
#define LOWER MO(_LOWER)
|
#define LOWER MO(_LOWER)
|
||||||
#define RAISE MO(_RAISE)
|
#define RAISE MO(_RAISE)
|
||||||
|
|
||||||
|
|||||||
@@ -19,12 +19,6 @@ enum custom_keycodes {
|
|||||||
R_RAISE
|
R_RAISE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Qwerty
|
/* Qwerty
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ enum custom_keycodes {
|
|||||||
ADJUST
|
ADJUST
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
// Aliases to keep the keymap tidy
|
// Aliases to keep the keymap tidy
|
||||||
#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped.
|
#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped.
|
||||||
#define RGB_SWR RGB_M_SW // Swirl Animation alias
|
#define RGB_SWR RGB_M_SW // Swirl Animation alias
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ enum custom_keycodes {
|
|||||||
ADJUST,
|
ADJUST,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
// Aliases to keep the keymap tidy
|
// Aliases to keep the keymap tidy
|
||||||
#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped.
|
#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped.
|
||||||
#define RGB_SWR RGB_M_SW // Swirl Animation alias
|
#define RGB_SWR RGB_M_SW // Swirl Animation alias
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_numpad_5x4(
|
[0] = LAYOUT_numpad_5x4(
|
||||||
TG(1), KC_PSLS, KC_PAST, KC_PMNS, \
|
TG(1), KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT_numpad_5x6(
|
||||||
|
KC_ESC, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_A, KC_B, KC_P7, KC_P8, KC_P9,
|
||||||
|
KC_C, KC_D, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_E, KC_F, KC_P1, KC_P2, KC_P3,
|
||||||
|
KC_LCTL, TG(1), KC_P0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_numpad_5x6(
|
||||||
|
RESET, KC_LPRN, KC_RPRN, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_A, KC_B, KC_HOME, KC_UP, KC_PGUP,
|
||||||
|
KC_C, KC_D, KC_LEFT, KC_NO, KC_RGHT, KC_PPLS,
|
||||||
|
KC_E, KC_F, KC_END, KC_DOWN, KC_PGDN,
|
||||||
|
KC_LCTL, _______, KC_INS, KC_DEL, KC_PENT
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
["","","",""],
|
||||||
|
[{y:0.5},"","","",""],
|
||||||
|
["","","",{h:2},""],
|
||||||
|
["","",""],
|
||||||
|
["","","",{h:2},""],
|
||||||
|
[{w:2},"",""]
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# numpad_5x6
|
||||||
|
|
||||||
|
LAYOUT_numpad_5x6
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
KC_P00 = SAFE_RANGE
|
KC_P00 = SAFE_RANGE
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ extern backlight_config_t backlight_config;
|
|||||||
#include "process_midi.h"
|
#include "process_midi.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAPTIC_ENABLE
|
||||||
|
#include "haptic.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENCODER_ENABLE
|
#ifdef ENCODER_ENABLE
|
||||||
#include "encoder.h"
|
#include "encoder.h"
|
||||||
@@ -179,6 +182,9 @@ void reset_keyboard(void) {
|
|||||||
shutdown_user();
|
shutdown_user();
|
||||||
wait_ms(250);
|
wait_ms(250);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAPTIC_ENABLE
|
||||||
|
haptic_shutdown();
|
||||||
|
#endif
|
||||||
// this is also done later in bootloader.c - not sure if it's neccesary here
|
// this is also done later in bootloader.c - not sure if it's neccesary here
|
||||||
#ifdef BOOTLOADER_CATERINA
|
#ifdef BOOTLOADER_CATERINA
|
||||||
*(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
|
*(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
|
||||||
@@ -257,6 +263,9 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||||||
#if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY)
|
#if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY)
|
||||||
process_clicky(keycode, record) &&
|
process_clicky(keycode, record) &&
|
||||||
#endif //AUDIO_CLICKY
|
#endif //AUDIO_CLICKY
|
||||||
|
#ifdef HAPTIC_ENABLE
|
||||||
|
process_haptic(keycode, record) &&
|
||||||
|
#endif //HAPTIC_ENABLE
|
||||||
process_record_kb(keycode, record) &&
|
process_record_kb(keycode, record) &&
|
||||||
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYPRESSES)
|
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_KEYPRESSES)
|
||||||
process_rgb_matrix(keycode, record) &&
|
process_rgb_matrix(keycode, record) &&
|
||||||
@@ -1049,6 +1058,9 @@ void matrix_init_quantum() {
|
|||||||
#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)
|
#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)
|
||||||
unicode_input_mode_init();
|
unicode_input_mode_init();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAPTIC_ENABLE
|
||||||
|
haptic_init();
|
||||||
|
#endif
|
||||||
matrix_init_kb();
|
matrix_init_kb();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1091,6 +1103,10 @@ void matrix_scan_quantum() {
|
|||||||
encoder_read();
|
encoder_read();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAPTIC_ENABLE
|
||||||
|
haptic_task();
|
||||||
|
#endif
|
||||||
|
|
||||||
matrix_scan_kb();
|
matrix_scan_kb();
|
||||||
}
|
}
|
||||||
#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN)
|
#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_PIN)
|
||||||
|
|||||||
@@ -139,6 +139,10 @@ extern uint32_t default_layer_state;
|
|||||||
#include "hd44780.h"
|
#include "hd44780.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAPTIC_ENABLE
|
||||||
|
#include "haptic.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
//Function substitutions to ease GPIO manipulation
|
//Function substitutions to ease GPIO manipulation
|
||||||
#ifdef __AVR__
|
#ifdef __AVR__
|
||||||
#define PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset)
|
#define PIN_ADDRESS(p, offset) _SFR_IO8(ADDRESS_BASE + (p >> PORT_SHIFTER) + offset)
|
||||||
|
|||||||
+26
-15
@@ -446,25 +446,36 @@ enum quantum_keycodes {
|
|||||||
KC_LOCK,
|
KC_LOCK,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TERMINAL_ENABLE
|
#ifdef TERMINAL_ENABLE
|
||||||
TERM_ON,
|
TERM_ON,
|
||||||
TERM_OFF,
|
TERM_OFF,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EEPROM_RESET,
|
EEPROM_RESET,
|
||||||
|
|
||||||
UNICODE_MODE_FORWARD,
|
UNICODE_MODE_FORWARD,
|
||||||
UNICODE_MODE_REVERSE,
|
UNICODE_MODE_REVERSE,
|
||||||
|
|
||||||
UNICODE_MODE_OSX,
|
UNICODE_MODE_OSX,
|
||||||
UNICODE_MODE_LNX,
|
UNICODE_MODE_LNX,
|
||||||
UNICODE_MODE_WIN,
|
UNICODE_MODE_WIN,
|
||||||
UNICODE_MODE_BSD,
|
UNICODE_MODE_BSD,
|
||||||
UNICODE_MODE_WINC,
|
UNICODE_MODE_WINC,
|
||||||
|
|
||||||
// always leave at the end
|
HPT_ON,
|
||||||
SAFE_RANGE
|
HPT_OFF,
|
||||||
};
|
HPT_TOG,
|
||||||
|
HPT_RST,
|
||||||
|
HPT_FBK,
|
||||||
|
HPT_BUZ,
|
||||||
|
HPT_MODI,
|
||||||
|
HPT_MODD,
|
||||||
|
HPT_DWLI,
|
||||||
|
HPT_DWLD,
|
||||||
|
|
||||||
|
// always leave at the end
|
||||||
|
SAFE_RANGE
|
||||||
|
};
|
||||||
|
|
||||||
// Ability to use mods in layouts
|
// Ability to use mods in layouts
|
||||||
#define LCTL(kc) (QK_LCTL | (kc))
|
#define LCTL(kc) (QK_LCTL | (kc))
|
||||||
|
|||||||
@@ -611,6 +611,42 @@ void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index) {
|
|||||||
rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index);
|
rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) {
|
||||||
|
if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) { return; }
|
||||||
|
|
||||||
|
for (uint8_t i = start; i < end; i++) {
|
||||||
|
led[i].r = r;
|
||||||
|
led[i].g = g;
|
||||||
|
led[i].b = b;
|
||||||
|
}
|
||||||
|
rgblight_set();
|
||||||
|
wait_ms(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgblight_sethsv_range(uint16_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) {
|
||||||
|
if (!rgblight_config.enable) { return; }
|
||||||
|
|
||||||
|
LED_TYPE tmp_led;
|
||||||
|
sethsv(hue, sat, val, &tmp_led);
|
||||||
|
rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) {
|
||||||
|
rgblight_setrgb_range(r, g, b, 0 , (uint8_t) RGBLED_NUM/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) {
|
||||||
|
rgblight_setrgb_range(r, g, b, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgblight_sethsv_master(uint16_t hue, uint8_t sat, uint8_t val) {
|
||||||
|
rgblight_sethsv_range(hue, sat, val, 0, (uint8_t) RGBLED_NUM/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val) {
|
||||||
|
rgblight_sethsv_range(hue, sat, val, (uint8_t) RGBLED_NUM/2, (uint8_t) RGBLED_NUM);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef RGBLIGHT_CUSTOM_DRIVER
|
#ifndef RGBLIGHT_CUSTOM_DRIVER
|
||||||
void rgblight_set(void) {
|
void rgblight_set(void) {
|
||||||
if (rgblight_config.enable) {
|
if (rgblight_config.enable) {
|
||||||
|
|||||||
@@ -187,6 +187,12 @@ uint8_t rgblight_get_val(void);
|
|||||||
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
|
void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b);
|
||||||
void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
|
void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index);
|
||||||
void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index);
|
void rgblight_sethsv_at(uint16_t hue, uint8_t sat, uint8_t val, uint8_t index);
|
||||||
|
void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end);
|
||||||
|
void rgblight_sethsv_range(uint16_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end);
|
||||||
|
void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b);
|
||||||
|
void rgblight_sethsv_master(uint16_t hue, uint8_t sat, uint8_t val);
|
||||||
|
void rgblight_sethsv_slave(uint16_t hue, uint8_t sat, uint8_t val);
|
||||||
|
|
||||||
uint32_t eeconfig_read_rgblight(void);
|
uint32_t eeconfig_read_rgblight(void);
|
||||||
void eeconfig_update_rgblight(uint32_t val);
|
void eeconfig_update_rgblight(uint32_t val);
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ void eeconfig_init_quantum(void) {
|
|||||||
eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
|
eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default
|
||||||
eeprom_update_dword(EECONFIG_RGBLIGHT, 0);
|
eeprom_update_dword(EECONFIG_RGBLIGHT, 0);
|
||||||
eeprom_update_byte(EECONFIG_STENOMODE, 0);
|
eeprom_update_byte(EECONFIG_STENOMODE, 0);
|
||||||
|
eeprom_update_dword(EECONFIG_HAPTIC, 0);
|
||||||
|
|
||||||
eeconfig_init_kb();
|
eeconfig_init_kb();
|
||||||
}
|
}
|
||||||
@@ -177,3 +178,11 @@ uint32_t eeconfig_read_user(void) { return eeprom_read_dword(EECONFIG_USER)
|
|||||||
void eeconfig_update_user(uint32_t val) { eeprom_update_dword(EECONFIG_USER, val); }
|
void eeconfig_update_user(uint32_t val) { eeprom_update_dword(EECONFIG_USER, val); }
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAPTIC); }
|
||||||
|
/** \brief eeconfig update user
|
||||||
|
*
|
||||||
|
* FIXME: needs doc
|
||||||
|
*/
|
||||||
|
void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); }
|
||||||
|
|
||||||
|
|
||||||
@@ -41,6 +41,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define EECONFIG_KEYBOARD (uint32_t *)15
|
#define EECONFIG_KEYBOARD (uint32_t *)15
|
||||||
#define EECONFIG_USER (uint32_t *)19
|
#define EECONFIG_USER (uint32_t *)19
|
||||||
|
|
||||||
|
#define EECONFIG_HAPTIC (uint32_t*)24
|
||||||
|
|
||||||
/* debug bit */
|
/* debug bit */
|
||||||
#define EECONFIG_DEBUG_ENABLE (1<<0)
|
#define EECONFIG_DEBUG_ENABLE (1<<0)
|
||||||
#define EECONFIG_DEBUG_MATRIX (1<<1)
|
#define EECONFIG_DEBUG_MATRIX (1<<1)
|
||||||
@@ -94,4 +96,9 @@ void eeconfig_update_kb(uint32_t val);
|
|||||||
uint32_t eeconfig_read_user(void);
|
uint32_t eeconfig_read_user(void);
|
||||||
void eeconfig_update_user(uint32_t val);
|
void eeconfig_update_user(uint32_t val);
|
||||||
|
|
||||||
|
#ifdef HAPTIC_ENABLE
|
||||||
|
uint32_t eeconfig_read_haptic(void);
|
||||||
|
void eeconfig_update_haptic(uint32_t val);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
// Use 7 wide characters for keymaps
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXX KC_NO
|
#define XXX KC_NO
|
||||||
|
|
||||||
// Layers
|
// Layers
|
||||||
|
|||||||
@@ -44,8 +44,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
|||||||
#define KC_ADJS TT(_ADJUST)
|
#define KC_ADJS TT(_ADJUST)
|
||||||
#define KC_NUMS TT(_LOWER)
|
#define KC_NUMS TT(_LOWER)
|
||||||
#define KC_GAME TT(_DIABLO)
|
#define KC_GAME TT(_DIABLO)
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
|
|
||||||
// Other Keycodes
|
// Other Keycodes
|
||||||
#define KC_RST RESET
|
#define KC_RST RESET
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
// and when this option isn't enabled, z rapidly followed by x
|
// and when this option isn't enabled, z rapidly followed by x
|
||||||
// actually sends Ctrl-x. That's bad.)
|
// actually sends Ctrl-x. That's bad.)
|
||||||
#define IGNORE_MOD_TAP_INTERRUPT
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
// #define PERMISSIVE_HOLD
|
#undef PERMISSIVE_HOLD
|
||||||
//#define TAPPING_FORCE_HOLD
|
//#define TAPPING_FORCE_HOLD
|
||||||
//#define RETRO_TAPPING
|
//#define RETRO_TAPPING
|
||||||
|
|
||||||
|
|||||||
+11
-3
@@ -122,11 +122,17 @@ void matrix_init_user(void) {
|
|||||||
get_unicode_input_mode();
|
get_unicode_input_mode();
|
||||||
#endif //UNICODE_ENABLE
|
#endif //UNICODE_ENABLE
|
||||||
matrix_init_keymap();
|
matrix_init_keymap();
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
matrix_init_rgb();
|
|
||||||
#endif //RGBLIGHT_ENABLE
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((weak))
|
||||||
|
void keyboard_post_init_keymap(void){ }
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void){
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
keyboard_post_init_rgb();
|
||||||
|
#endif
|
||||||
|
keyboard_post_init_keymap();
|
||||||
|
}
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
void shutdown_keymap(void) {}
|
void shutdown_keymap(void) {}
|
||||||
@@ -208,9 +214,11 @@ uint32_t default_layer_state_set_keymap (uint32_t state) {
|
|||||||
// Runs state check and changes underglow color and animation
|
// Runs state check and changes underglow color and animation
|
||||||
uint32_t default_layer_state_set_user(uint32_t state) {
|
uint32_t default_layer_state_set_user(uint32_t state) {
|
||||||
state = default_layer_state_set_keymap(state);
|
state = default_layer_state_set_keymap(state);
|
||||||
|
#if 0
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
state = default_layer_state_set_rgb(state);
|
state = default_layer_state_set_rgb(state);
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
#endif
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+20
-18
@@ -243,25 +243,25 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void matrix_init_rgb(void) {
|
void keyboard_post_init_rgb(void) {
|
||||||
|
|
||||||
// #ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
// if (userspace_config.rgb_layer_change) {
|
if (userspace_config.rgb_layer_change) {
|
||||||
// rgblight_enable_noeeprom();
|
rgblight_enable_noeeprom();
|
||||||
// switch (biton32(eeconfig_read_default_layer())) {
|
switch (biton32(eeconfig_read_default_layer())) {
|
||||||
// case _COLEMAK:
|
case _COLEMAK:
|
||||||
// rgblight_sethsv_noeeprom_magenta(); break;
|
rgblight_sethsv_noeeprom_magenta(); break;
|
||||||
// case _DVORAK:
|
case _DVORAK:
|
||||||
// rgblight_sethsv_noeeprom_springgreen(); break;
|
rgblight_sethsv_noeeprom_springgreen(); break;
|
||||||
// case _WORKMAN:
|
case _WORKMAN:
|
||||||
// rgblight_sethsv_noeeprom_goldenrod(); break;
|
rgblight_sethsv_noeeprom_goldenrod(); break;
|
||||||
// default:
|
default:
|
||||||
// rgblight_sethsv_noeeprom_cyan(); break;
|
rgblight_sethsv_noeeprom_cyan(); break;
|
||||||
// }
|
}
|
||||||
// rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||||
// }
|
}
|
||||||
// #endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_rgb(void) {
|
void matrix_scan_rgb(void) {
|
||||||
#ifdef RGBLIGHT_TWINKLE
|
#ifdef RGBLIGHT_TWINKLE
|
||||||
@@ -336,6 +336,7 @@ uint32_t layer_state_set_rgb(uint32_t state) {
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
uint32_t default_layer_state_set_rgb(uint32_t state) {
|
uint32_t default_layer_state_set_rgb(uint32_t state) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
if (userspace_config.rgb_layer_change) {
|
if (userspace_config.rgb_layer_change) {
|
||||||
@@ -371,3 +372,4 @@ uint32_t default_layer_state_set_rgb(uint32_t state) {
|
|||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
@@ -13,7 +13,7 @@ typedef struct {
|
|||||||
|
|
||||||
bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record);
|
bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record);
|
||||||
void scan_rgblight_fadeout(void);
|
void scan_rgblight_fadeout(void);
|
||||||
void matrix_init_rgb(void);
|
void keyboard_post_init_rgb(void);
|
||||||
void matrix_scan_rgb(void);
|
void matrix_scan_rgb(void);
|
||||||
uint32_t layer_state_set_rgb(uint32_t state);
|
uint32_t layer_state_set_rgb(uint32_t state);
|
||||||
uint32_t default_layer_state_set_rgb(uint32_t state);
|
uint32_t default_layer_state_set_rgb(uint32_t state);
|
||||||
|
|||||||
@@ -6,11 +6,9 @@
|
|||||||
|
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
// Fillers to make layering more clear
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define ________ KC_TRNS
|
#define ________ KC_TRNS
|
||||||
#define _________ KC_TRNS
|
#define _________ KC_TRNS
|
||||||
#define _XXXXXX_ KC_TRNS
|
#define _XXXXXX_ KC_TRNS
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
// KC codes that are too long
|
// KC codes that are too long
|
||||||
#define DOLLAR KC_DOLLAR
|
#define DOLLAR KC_DOLLAR
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ enum userspace_keycodes {
|
|||||||
#define LOWER MO(_LOWER)
|
#define LOWER MO(_LOWER)
|
||||||
#define RAISE MO(_RAISE)
|
#define RAISE MO(_RAISE)
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
// Custom macros
|
// Custom macros
|
||||||
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
|
#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
|
||||||
#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl
|
#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl
|
||||||
@@ -237,4 +234,4 @@ NOTE: These are all the same length. If you do a search/replace
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // !USERSPACE
|
#endif // !USERSPACE
|
||||||
@@ -3,9 +3,6 @@
|
|||||||
|
|
||||||
/* Custom keys & combinations to be shorter for keymaps */
|
/* Custom keys & combinations to be shorter for keymaps */
|
||||||
#define KC_LCA LCA(KC_NO)
|
#define KC_LCA LCA(KC_NO)
|
||||||
/* Fillers to make layering more clear */
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
#define OSM_LSFT OSM(MOD_LSFT)
|
#define OSM_LSFT OSM(MOD_LSFT)
|
||||||
#define TD_CTL TD(TD_CTL_CTLALT)
|
#define TD_CTL TD(TD_CTL_CTLALT)
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ enum user_tapdance {
|
|||||||
|
|
||||||
// Custom Keycodes
|
// Custom Keycodes
|
||||||
#define KC_ KC_TRNS
|
#define KC_ KC_TRNS
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
#define KC_xxxx KC_NO
|
#define KC_xxxx KC_NO
|
||||||
#define KC_LOWR LOWER
|
#define KC_LOWR LOWER
|
||||||
#define KC_RASE RAISE
|
#define KC_RASE RAISE
|
||||||
|
|||||||
@@ -6,9 +6,4 @@
|
|||||||
This file holds some commen NQN definitions
|
This file holds some commen NQN definitions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
// #define L_LL_I 10
|
// #define L_LL_I 10
|
||||||
|
|
||||||
// Keyboard aliases
|
// Keyboard aliases
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define ooooooo KC_TRNS
|
#define ooooooo KC_TRNS
|
||||||
|
|
||||||
#define MO_FUNC MO(L_FUNC)
|
#define MO_FUNC MO(L_FUNC)
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
// Use 7 wide characters for keymaps
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXX KC_NO
|
#define XXX KC_NO
|
||||||
|
|
||||||
// Layers
|
// Layers
|
||||||
|
|||||||
@@ -35,9 +35,6 @@ enum tap_dancers {
|
|||||||
TD_QUOTE,
|
TD_QUOTE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
#define MO_NAV MO(_NAV)
|
#define MO_NAV MO(_NAV)
|
||||||
#define MO_ADJ MO(_ADJUST)
|
#define MO_ADJ MO(_ADJUST)
|
||||||
#define MO_RST MO(_RESET)
|
#define MO_RST MO(_RESET)
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ enum custom_keycodes {
|
|||||||
NEW_SAFE_RANGE
|
NEW_SAFE_RANGE
|
||||||
};
|
};
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define KC_RGUP RGUP
|
#define KC_RGUP RGUP
|
||||||
#define KC_RGDWN RGDWN
|
#define KC_RGDWN RGDWN
|
||||||
#define KC_YREG YREG
|
#define KC_YREG YREG
|
||||||
|
|||||||
Reference in new issue
Block a user