Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8cff1489a | ||
|
|
c4f910b1b3 | ||
|
|
edebe56f6b | ||
|
|
3a8e13a74a | ||
|
|
1afb394d59 | ||
|
|
1aacbc44d1 | ||
|
|
793de76bb4 | ||
|
|
f176daa1ca | ||
|
|
459ccb681f | ||
|
|
1fe7743af8 | ||
|
|
a0467fda38 | ||
|
|
9e9b604234 | ||
|
|
eb4cf713bc | ||
|
|
9395a8700c | ||
|
|
4bbef61d60 | ||
|
|
266ff3339a | ||
|
|
c01eb55109 | ||
|
|
6e9b4a8309 | ||
|
|
1e5df7117d | ||
|
|
6888165b48 | ||
|
|
8070b1ba88 | ||
|
|
726499553c | ||
|
|
1d7e57ab85 | ||
|
|
0cb7133e0d | ||
|
|
f63a60a72a | ||
|
|
f68bb0cc3d | ||
|
|
2f01c6ee18 | ||
|
|
10f5767010 | ||
|
|
b5d6f287d9 | ||
|
|
a13e918d47 | ||
|
|
b31df1af94 | ||
|
|
7a2124db6b | ||
|
|
45f044907c | ||
|
|
01d2a03258 | ||
|
|
1960e25048 | ||
|
|
8fbea13a8f | ||
|
|
d78a2b8145 | ||
|
|
76e35e02cc | ||
|
|
272b3309dd | ||
|
|
11c308d436 | ||
|
|
482c9fbbf2 | ||
|
|
5ecb1b2d39 | ||
|
|
8b90822f6e | ||
|
|
9f36aa640e | ||
|
|
284a5267d5 | ||
|
|
d844f5af70 | ||
|
|
2eeb30cd5a | ||
|
|
c7599bf49f | ||
|
|
45c2a05e3a | ||
|
|
fbdc65e2e9 | ||
|
|
34b9c51d9c | ||
|
|
50835bb138 | ||
|
|
e7acd39b78 | ||
|
|
70fce6564f | ||
|
|
323c6dfe72 | ||
|
|
28ff51175b | ||
|
|
c16ee22784 | ||
|
|
1b7101f065 | ||
|
|
c4cc697aef | ||
|
|
ef7c79b781 | ||
|
|
8711dda0d3 | ||
|
|
a0305f5e7e | ||
|
|
c2a0cebf8b | ||
|
|
ef1b050b32 | ||
|
|
4bee445c2f | ||
|
|
7921c5d9b8 | ||
|
|
72b1ff5899 | ||
|
|
eee6dd3544 | ||
|
|
510138f525 | ||
|
|
07e37c857c | ||
|
|
a21e487fbc |
No files matched your search
+6
-6
@@ -35,30 +35,30 @@
|
|||||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
OPT_DEFS += -DBOOTLOADER_LUFA_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||||
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
OPT_DEFS += -DBOOTLOADER_QMK_DFU
|
||||||
OPT_DEFS += -DBOOTLOADER_DFU
|
OPT_DEFS += -DBOOTLOADER_DFU
|
||||||
ifneq (,$(filter $(MCU), at90usb646 atmega16u2 atmega16u4 atmega32u2 atmega32u4))
|
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647))
|
||||||
BOOTLOADER_SIZE = 4096
|
BOOTLOADER_SIZE = 4096
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(MCU)), at90usb1286)
|
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||||
BOOTLOADER_SIZE = 8192
|
BOOTLOADER_SIZE = 8192
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
+55
-84
@@ -13,65 +13,76 @@ An example of using `sudo`, when your controller is ATMega32u4:
|
|||||||
|
|
||||||
or just:
|
or just:
|
||||||
|
|
||||||
$ sudo make <keyboard>:<keymap>:dfu
|
$ sudo make <keyboard>:<keymap>:flash
|
||||||
|
|
||||||
Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible.
|
Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible.
|
||||||
|
|
||||||
### Linux `udev` Rules
|
### Linux `udev` Rules
|
||||||
On Linux, you'll need proper privileges to access the MCU. You can either use
|
|
||||||
`sudo` when flashing firmware, or place these files in `/etc/udev/rules.d/`. Once added run the following:
|
On Linux, you'll need proper privileges to communicate with the bootloader device. You can either use `sudo` when flashing firmware, or place this file in `/etc/udev/rules.d/`:
|
||||||
```console
|
|
||||||
|
**/etc/udev/rules.d/50-qmk.rules:**
|
||||||
|
```
|
||||||
|
# Atmel DFU
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega16U2
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U2
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega16U4
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess" # ATmega32U4
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB64
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess" # AT90USB128
|
||||||
|
|
||||||
|
# Input Club
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
|
||||||
|
# STM32duino
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
# STM32 DFU
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
|
||||||
|
# BootloadHID
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
|
||||||
|
# USBAspLoader
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||||
|
|
||||||
|
# ModemManager should ignore the following devices
|
||||||
|
# Atmel SAM-BA (Massdrop)
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||||
|
|
||||||
|
# Caterina (Pro Micro)
|
||||||
|
# Spark Fun Electronics
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pro Micro 3V3/8MHz
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Pro Micro 5V/16MHz
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # LilyPad 3V3/8MHz (and some Pro Micro clones)
|
||||||
|
# Pololu Electronics
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # A-Star 32U4
|
||||||
|
# Arduino SA
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Leonardo
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Micro
|
||||||
|
# Adafruit Industries LLC
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Feather 32U4
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # ItsyBitsy 32U4 3V3/8MHz
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # ItsyBitsy 32U4 5V/16MHz
|
||||||
|
# dog hunter AG
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Leonardo
|
||||||
|
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Micro
|
||||||
|
```
|
||||||
|
|
||||||
|
Once added, run the following:
|
||||||
|
|
||||||
|
```
|
||||||
sudo udevadm control --reload-rules
|
sudo udevadm control --reload-rules
|
||||||
sudo udevadm trigger
|
sudo udevadm trigger
|
||||||
```
|
```
|
||||||
|
|
||||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
**Note:** With older versions of ModemManager (< 1.12), filtering only works when not in strict mode. The following commands can update that setting:
|
||||||
```
|
|
||||||
# Atmel ATMega32U4
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
# Atmel USBKEY AT90USB1287
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
# Atmel ATMega32U2
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
```
|
|
||||||
|
|
||||||
**/etc/udev/rules.d/54-input-club-keyboard.rules:**
|
|
||||||
|
|
||||||
```
|
```
|
||||||
# Input Club keyboard bootloader
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
```
|
|
||||||
|
|
||||||
**/etc/udev/rules.d/55-caterina.rules:**
|
|
||||||
```
|
|
||||||
# ModemManager should ignore the following devices
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
```
|
|
||||||
|
|
||||||
**Note:** With older (before 1.12) ModemManager, filtering only works when not in strict mode, the following commands can update that settings:
|
|
||||||
```console
|
|
||||||
printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf
|
printf '[Service]\nExecStart=\nExecStart=/usr/sbin/ModemManager --filter-policy=default' | sudo tee /etc/systemd/system/ModemManager.service.d/policy.conf
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl restart ModemManager
|
sudo systemctl restart ModemManager
|
||||||
```
|
```
|
||||||
|
|
||||||
**/etc/udev/rules.d/56-dfu-util.rules:**
|
|
||||||
```
|
|
||||||
# stm32duino
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
# Generic stm32
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
```
|
|
||||||
|
|
||||||
**/etc/udev/rules.d/57-bootloadhid.rules:**
|
|
||||||
```
|
|
||||||
# bootloadHID
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess", RUN{builtin}+="uaccess"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Serial device is not detected in bootloader mode on Linux
|
### Serial device is not detected in bootloader mode on Linux
|
||||||
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
|
Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
|
||||||
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
|
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
|
||||||
@@ -96,46 +107,6 @@ You can buy a really unique VID:PID here. I don't think you need this for person
|
|||||||
- http://www.obdev.at/products/vusb/license.html
|
- http://www.obdev.at/products/vusb/license.html
|
||||||
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
|
||||||
|
|
||||||
## BOOTLOADER_SIZE for AVR
|
|
||||||
Note that Teensy2.0++ bootloader size is 2048byte. Some Makefiles may have wrong comment.
|
|
||||||
|
|
||||||
```
|
|
||||||
# Boot Section Size in *bytes*
|
|
||||||
# Teensy halfKay 512
|
|
||||||
# Teensy++ halfKay 2048
|
|
||||||
# Atmel DFU loader 4096 (TMK Alt Controller)
|
|
||||||
# LUFA bootloader 4096
|
|
||||||
# USBaspLoader 2048
|
|
||||||
OPT_DEFS += -DBOOTLOADER_SIZE=2048
|
|
||||||
```
|
|
||||||
|
|
||||||
## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS
|
|
||||||
|
|
||||||
This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
|
|
||||||
|
|
||||||
The solution is to remove and reinstall all affected modules.
|
|
||||||
|
|
||||||
```
|
|
||||||
brew rm avr-gcc avr-gcc@8 dfu-programmer dfu-util gcc-arm-none-eabi arm-gcc-bin@8 avrdude qmk
|
|
||||||
brew install qmk/qmk/qmk
|
|
||||||
brew link --force avr-gcc@8
|
|
||||||
brew link --force arm-gcc-bin@8
|
|
||||||
```
|
|
||||||
|
|
||||||
### `avr-gcc` and LUFA
|
|
||||||
|
|
||||||
If you updated your `avr-gcc` and you see errors involving LUFA, for example:
|
|
||||||
|
|
||||||
`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'`
|
|
||||||
|
|
||||||
For now, you need to rollback `avr-gcc` to 8 in Homebrew.
|
|
||||||
|
|
||||||
```
|
|
||||||
brew uninstall --force avr-gcc
|
|
||||||
brew install avr-gcc@8
|
|
||||||
brew link --force avr-gcc@8
|
|
||||||
```
|
|
||||||
|
|
||||||
### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
|
### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
|
||||||
Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this.
|
Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this.
|
||||||
|
|
||||||
|
|||||||
@@ -31,20 +31,6 @@ Check:
|
|||||||
- try using 'print' function instead of debug print. See **common/print.h**.
|
- try using 'print' function instead of debug print. See **common/print.h**.
|
||||||
- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
|
- disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
|
||||||
|
|
||||||
## Linux or UNIX Like System Requires Super User Privilege
|
|
||||||
Just use 'sudo' to execute *hid_listen* with privilege.
|
|
||||||
```
|
|
||||||
$ sudo hid_listen
|
|
||||||
```
|
|
||||||
|
|
||||||
Or add an *udev rule* for TMK devices with placing a file in rules directory. The directory may vary on each system.
|
|
||||||
|
|
||||||
File: /etc/udev/rules.d/52-tmk-keyboard.rules(in case of Ubuntu)
|
|
||||||
```
|
|
||||||
# tmk keyboard products https://github.com/tmk/tmk_keyboard
|
|
||||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
|
|
||||||
```
|
|
||||||
|
|
||||||
***
|
***
|
||||||
|
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
|
|||||||
@@ -2,21 +2,24 @@
|
|||||||
|
|
||||||
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|
These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent.
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------|-------------------------------|----------------------------------------------------|
|
|----------|-------------------------------|------------------------------------------------------|
|
||||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` |
|
||||||
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` |
|
||||||
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
|`LALT(kc)`|`A(kc)`, `LOPT(kc)` |Hold Left Alt and press `kc` |
|
||||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||||
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
|`RSFT(kc)`| |Hold Right Shift and press `kc` |
|
||||||
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
|`RALT(kc)`|`ROPT(kc)`, `ALGR(kc)` |Hold Right Alt and press `kc` |
|
||||||
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` |
|
||||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
||||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||||
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
||||||
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) and press `kc` |
|
||||||
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`|
|
|`RCS(kc)` | |Hold Right Control and Right Shift and press `kc` |
|
||||||
|
|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` |
|
||||||
|
|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` |
|
||||||
|
|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc` |
|
||||||
|
|
||||||
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
You can also chain them, for example `LCTL(LALT(KC_DEL))` or `C(A(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress.
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
* `height`
|
* `height`
|
||||||
* オプション: キー単位でのレイアウトの高さ
|
* オプション: キー単位でのレイアウトの高さ
|
||||||
* `key_count`
|
* `key_count`
|
||||||
* **必須**: このレイアウトのキーの数
|
* オプション: このレイアウトのキーの数
|
||||||
* `layout`
|
* `layout`
|
||||||
* 物理レイアウトを説明するキー辞書のリスト。詳細は次のセクションを見てください。
|
* 物理レイアウトを説明するキー辞書のリスト。詳細は次のセクションを見てください。
|
||||||
|
|
||||||
|
|||||||
+19
-16
@@ -27,22 +27,25 @@ This key would activate Left Control and Left Shift when held, and send Escape w
|
|||||||
|
|
||||||
For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap:
|
For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap:
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|------------|-----------------------------------------------------------------|-------------------------------------------------------|
|
|------------|-----------------------------------------------------------------|--------------------------------------------------------------|
|
||||||
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped |
|
||||||
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped |
|
||||||
|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
|`LALT_T(kc)`|`LOPT_T(kc)`, `ALT_T(kc)`, `OPT_T(kc)` |Left Alt when held, `kc` when tapped |
|
||||||
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped |
|
||||||
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped |
|
||||||
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped |
|
||||||
|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
|`RALT_T(kc)`|`ROPT_T(kc)`, `ALGR_T(kc)` |Right Alt when held, `kc` when tapped |
|
||||||
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped |
|
||||||
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||||
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped |
|
||||||
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
||||||
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
|`RCS_T(kc)` | |Right Control and Right Shift when held, `kc` when tapped |
|
||||||
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped|
|
|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped |
|
||||||
|
|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped |
|
||||||
|
|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped |
|
||||||
|
|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped |
|
||||||
|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)|
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Within our `info.json` file the `layouts` portion of the dictionary contains sev
|
|||||||
* `height`
|
* `height`
|
||||||
* Optional: The height of the layout in Key Units
|
* Optional: The height of the layout in Key Units
|
||||||
* `key_count`
|
* `key_count`
|
||||||
* **Required**: The number of keys in this layout
|
* Optional: The number of keys in this layout
|
||||||
* `layout`
|
* `layout`
|
||||||
* A list of Key Dictionaries describing the physical layout. See the next section for more details.
|
* A list of Key Dictionaries describing the physical layout. See the next section for more details.
|
||||||
|
|
||||||
|
|||||||
+21
-21
@@ -1,22 +1,22 @@
|
|||||||
# Tap-Hold Configuration Options
|
# Tap-Hold Configuration Options
|
||||||
|
|
||||||
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people.
|
While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonable defaults, but that may still cause issues for some people.
|
||||||
|
|
||||||
These options let you modify the behavior of the Tap-Hold keys.
|
These options let you modify the behavior of the Tap-Hold keys.
|
||||||
|
|
||||||
## Tapping Term
|
## Tapping Term
|
||||||
|
|
||||||
The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key.
|
The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key.
|
||||||
|
|
||||||
You can set the global time for this by adding the following setting to your `config.h`:
|
You can set the global time for this by adding the following setting to your `config.h`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define TAPPING_TERM 200
|
#define TAPPING_TERM 200
|
||||||
```
|
```
|
||||||
|
|
||||||
This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people.
|
This setting is defined in milliseconds, and does default to 200ms. This is a good average for a majority of people.
|
||||||
|
|
||||||
For more granular control of this feature, you can add the following to your `config.h`:
|
For more granular control of this feature, you can add the following to your `config.h`:
|
||||||
```c
|
```c
|
||||||
#define TAPPING_TERM_PER_KEY
|
#define TAPPING_TERM_PER_KEY
|
||||||
```
|
```
|
||||||
@@ -45,9 +45,9 @@ As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new
|
|||||||
#define PERMISSIVE_HOLD
|
#define PERMISSIVE_HOLD
|
||||||
```
|
```
|
||||||
|
|
||||||
This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings.
|
This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings.
|
||||||
|
|
||||||
If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the "tapping" function for both keys.
|
If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the tapping function for both keys.
|
||||||
|
|
||||||
For Instance:
|
For Instance:
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ For Instance:
|
|||||||
- `KC_X` Up
|
- `KC_X` Up
|
||||||
- `SFT_T(KC_A)` Up
|
- `SFT_T(KC_A)` Up
|
||||||
|
|
||||||
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`).
|
Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`).
|
||||||
|
|
||||||
?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.
|
?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`.
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ To enable this setting, add this to your `config.h`:
|
|||||||
#define IGNORE_MOD_TAP_INTERRUPT
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
```
|
```
|
||||||
|
|
||||||
Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the "tapping" function for both keys. This may not be desirable for rolling combo keys.
|
Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the tapping function for both keys. This may not be desirable for rolling combo keys.
|
||||||
|
|
||||||
Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod).
|
Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod).
|
||||||
|
|
||||||
@@ -126,27 +126,27 @@ bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
## Tapping Force Hold
|
## Tapping Force Hold
|
||||||
|
|
||||||
To enable `tapping force hold`, add the following to your `config.h`:
|
To enable `tapping force hold`, add the following to your `config.h`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define TAPPING_FORCE_HOLD
|
#define TAPPING_FORCE_HOLD
|
||||||
```
|
```
|
||||||
|
|
||||||
When the user holds a key after tap, this repeats the tapped key rather to hold a modifier key. This allows to use auto repeat for the tapped key.
|
When the user holds a key after tapping it, the tapping function is repeated by default, rather than activating the hold function. This allows keeping the ability to auto-repeat the tapping function of a dual-role key. `TAPPING_FORCE_HOLD` removes that ability to let the user activate the hold function instead, in the case of holding the dual-role key after having tapped it.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
- SFT_T(KC_A) Down
|
- `SFT_T(KC_A)` Down
|
||||||
- SFT_T(KC_A) Up
|
- `SFT_T(KC_A)` Up
|
||||||
- SFT_T(KC_A) Down
|
- `SFT_T(KC_A)` Down
|
||||||
- wait more than tapping term...
|
- wait until the tapping term expires...
|
||||||
- SFT_T(KC_A) Up
|
- `SFT_T(KC_A)` Up
|
||||||
|
|
||||||
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function.
|
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto repeat function.
|
||||||
|
|
||||||
With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
|
With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
|
||||||
|
|
||||||
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tapping Toggle).
|
!> `TAPPING_FORCE_HOLD` will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tap Toggle).
|
||||||
|
|
||||||
For more granular control of this feature, you can add the following to your `config.h`:
|
For more granular control of this feature, you can add the following to your `config.h`:
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
## Retro Tapping
|
## Retro Tapping
|
||||||
|
|
||||||
To enable `retro tapping`, add the following to your `config.h`:
|
To enable `retro tapping`, add the following to your `config.h`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#define RETRO_TAPPING
|
#define RETRO_TAPPING
|
||||||
@@ -179,11 +179,11 @@ Holding and releasing a dual function key without pressing another key will resu
|
|||||||
|
|
||||||
For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead.
|
For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead.
|
||||||
|
|
||||||
## Why do we include the key record for the per key functions?
|
## Why do we include the key record for the per key functions?
|
||||||
|
|
||||||
One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that.
|
One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that.
|
||||||
|
|
||||||
Well, it's simply really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing.
|
Well, it's simple really: customization. But specifically, it depends on how your keyboard is wired up. For instance, if each row is actually using a row in the keyboard's matrix, then it may be simpler to use `if (record->event.row == 3)` instead of checking a whole bunch of keycodes. Which is especially good for those people using the Tap Hold type keys on the home row. So you could fine tune those to not interfere with your normal typing.
|
||||||
|
|
||||||
## Why is there no `*_kb` or `*_user` functions?!
|
## Why is there no `*_kb` or `*_user` functions?!
|
||||||
|
|
||||||
|
|||||||
@@ -97,14 +97,13 @@ bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
|||||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0);
|
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM0);
|
||||||
|
|
||||||
for (int i = 0; i < 342; i += 18) {
|
for (int i = 0; i < 342; i += 18) {
|
||||||
g_twi_transfer_buffer[0] = i % 180;
|
|
||||||
|
|
||||||
if (i == 180) {
|
if (i == 180) {
|
||||||
// unlock the command register and select PG2
|
// unlock the command register and select PG2
|
||||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1);
|
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_twi_transfer_buffer[0] = i % 180;
|
||||||
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18);
|
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 18);
|
||||||
|
|
||||||
#if ISSI_PERSISTENCE > 0
|
#if ISSI_PERSISTENCE > 0
|
||||||
@@ -251,4 +250,6 @@ void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t
|
|||||||
g_scaling_registers[pled->driver][pled->r] = red;
|
g_scaling_registers[pled->driver][pled->r] = red;
|
||||||
g_scaling_registers[pled->driver][pled->g] = green;
|
g_scaling_registers[pled->driver][pled->g] = green;
|
||||||
g_scaling_registers[pled->driver][pled->b] = blue;
|
g_scaling_registers[pled->driver][pled->b] = blue;
|
||||||
|
|
||||||
|
g_scaling_registers_update_required[pled->driver] = true;
|
||||||
}
|
}
|
||||||
@@ -23,14 +23,13 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
typedef struct is31_led {
|
typedef struct is31_led {
|
||||||
uint8_t driver : 2;
|
uint32_t driver : 2;
|
||||||
uint16_t r;
|
uint32_t r : 10;
|
||||||
uint16_t g;
|
uint32_t g : 10;
|
||||||
uint16_t b;
|
uint32_t b : 10;
|
||||||
} __attribute__((packed)) is31_led;
|
} __attribute__((packed)) is31_led;
|
||||||
|
|
||||||
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
|
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
|
||||||
extern const is31_led g_is31_indicator_leds[DRIVER_INDICATOR_LED_TOTAL];
|
|
||||||
|
|
||||||
void IS31FL3741_init(uint8_t addr);
|
void IS31FL3741_init(uint8_t addr);
|
||||||
void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data);
|
void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data);
|
||||||
|
|||||||
+31
-17
@@ -75,8 +75,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define CHARGE_PUMP 0x8D
|
#define CHARGE_PUMP 0x8D
|
||||||
|
|
||||||
// Misc defines
|
// Misc defines
|
||||||
#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
|
#ifndef OLED_BLOCK_COUNT
|
||||||
#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
|
# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
|
||||||
|
#endif
|
||||||
|
#ifndef OLED_BLOCK_SIZE
|
||||||
|
# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1)
|
||||||
|
|
||||||
// i2c defines
|
// i2c defines
|
||||||
#define I2C_CMD 0x00
|
#define I2C_CMD 0x00
|
||||||
@@ -212,7 +218,7 @@ __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
|||||||
void oled_clear(void) {
|
void oled_clear(void) {
|
||||||
memset(oled_buffer, 0, sizeof(oled_buffer));
|
memset(oled_buffer, 0, sizeof(oled_buffer));
|
||||||
oled_cursor = &oled_buffer[0];
|
oled_cursor = &oled_buffer[0];
|
||||||
oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type
|
oled_dirty = OLED_ALL_BLOCKS_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) {
|
static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) {
|
||||||
@@ -262,13 +268,14 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
|
|||||||
|
|
||||||
void oled_render(void) {
|
void oled_render(void) {
|
||||||
// Do we have work to do?
|
// Do we have work to do?
|
||||||
|
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
||||||
if (!oled_dirty || oled_scrolling) {
|
if (!oled_dirty || oled_scrolling) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find first dirty block
|
// Find first dirty block
|
||||||
uint8_t update_start = 0;
|
uint8_t update_start = 0;
|
||||||
while (!(oled_dirty & (1 << update_start))) {
|
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
|
||||||
++update_start;
|
++update_start;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,7 +321,7 @@ void oled_render(void) {
|
|||||||
oled_on();
|
oled_on();
|
||||||
|
|
||||||
// Clear dirty flag
|
// Clear dirty flag
|
||||||
oled_dirty &= ~(1 << update_start);
|
oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
void oled_set_cursor(uint8_t col, uint8_t line) {
|
void oled_set_cursor(uint8_t col, uint8_t line) {
|
||||||
@@ -404,9 +411,9 @@ void oled_write_char(const char data, bool invert) {
|
|||||||
// Dirty check
|
// Dirty check
|
||||||
if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) {
|
if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) {
|
||||||
uint16_t index = oled_cursor - &oled_buffer[0];
|
uint16_t index = oled_cursor - &oled_buffer[0];
|
||||||
oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
|
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE));
|
||||||
// Edgecase check if the written data spans the 2 chunks
|
// Edgecase check if the written data spans the 2 chunks
|
||||||
oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE));
|
oled_dirty |= ((OLED_BLOCK_TYPE)1 << ((index + OLED_FONT_WIDTH - 1) / OLED_BLOCK_SIZE));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally move to the next char
|
// Finally move to the next char
|
||||||
@@ -441,7 +448,7 @@ void oled_pan(bool left) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
oled_dirty = ~((OLED_BLOCK_TYPE)0);
|
oled_dirty = OLED_ALL_BLOCKS_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
oled_buffer_reader_t oled_read_raw(uint16_t start_index) {
|
oled_buffer_reader_t oled_read_raw(uint16_t start_index) {
|
||||||
@@ -456,7 +463,7 @@ void oled_write_raw_byte(const char data, uint16_t index) {
|
|||||||
if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE;
|
if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE;
|
||||||
if (oled_buffer[index] == data) return;
|
if (oled_buffer[index] == data) return;
|
||||||
oled_buffer[index] = data;
|
oled_buffer[index] = data;
|
||||||
oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
|
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE));
|
||||||
}
|
}
|
||||||
|
|
||||||
void oled_write_raw(const char *data, uint16_t size) {
|
void oled_write_raw(const char *data, uint16_t size) {
|
||||||
@@ -464,21 +471,28 @@ void oled_write_raw(const char *data, uint16_t size) {
|
|||||||
for (uint16_t i = 0; i < size; i++) {
|
for (uint16_t i = 0; i < size; i++) {
|
||||||
if (oled_buffer[i] == data[i]) continue;
|
if (oled_buffer[i] == data[i]) continue;
|
||||||
oled_buffer[i] = data[i];
|
oled_buffer[i] = data[i];
|
||||||
oled_dirty |= (1 << (i / OLED_BLOCK_SIZE));
|
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void oled_write_pixel(uint8_t x, uint8_t y, bool on) {
|
void oled_write_pixel(uint8_t x, uint8_t y, bool on) {
|
||||||
if (x >= OLED_DISPLAY_WIDTH || y >= OLED_DISPLAY_HEIGHT) {
|
if (x >= oled_rotation_width) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uint16_t index = x + (y / 8) * OLED_DISPLAY_WIDTH;
|
uint16_t index = x + (y / 8) * oled_rotation_width;
|
||||||
|
if (index >= OLED_MATRIX_SIZE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uint8_t data = oled_buffer[index];
|
||||||
if (on) {
|
if (on) {
|
||||||
oled_buffer[index] |= (1 << (y % 8));
|
data |= (1 << (y % 8));
|
||||||
} else {
|
} else {
|
||||||
oled_buffer[index] &= ~(1 << (y % 8));
|
data &= ~(1 << (y % 8));
|
||||||
|
}
|
||||||
|
if (oled_buffer[index] != data) {
|
||||||
|
oled_buffer[index] = data;
|
||||||
|
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE));
|
||||||
}
|
}
|
||||||
oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__AVR__)
|
#if defined(__AVR__)
|
||||||
@@ -501,7 +515,7 @@ void oled_write_raw_P(const char *data, uint16_t size) {
|
|||||||
uint8_t c = pgm_read_byte(data++);
|
uint8_t c = pgm_read_byte(data++);
|
||||||
if (oled_buffer[i] == c) continue;
|
if (oled_buffer[i] == c) continue;
|
||||||
oled_buffer[i] = c;
|
oled_buffer[i] = c;
|
||||||
oled_dirty |= (1 << (i / OLED_BLOCK_SIZE));
|
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // defined(__AVR__)
|
#endif // defined(__AVR__)
|
||||||
@@ -597,7 +611,7 @@ bool oled_scroll_off(void) {
|
|||||||
return oled_scrolling;
|
return oled_scrolling;
|
||||||
}
|
}
|
||||||
oled_scrolling = false;
|
oled_scrolling = false;
|
||||||
oled_dirty = -1;
|
oled_dirty = OLED_ALL_BLOCKS_MASK;
|
||||||
}
|
}
|
||||||
return !oled_scrolling;
|
return !oled_scrolling;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x3430 // "40"
|
||||||
#define PRODUCT_ID 0x0A0C
|
#define PRODUCT_ID 0x9999
|
||||||
#define DEVICE_VER 0x9999
|
#define DEVICE_VER 0x9999
|
||||||
#define MANUFACTURER di0ib
|
#define MANUFACTURER di0ib
|
||||||
#define PRODUCT The nein Keyboard
|
#define PRODUCT The nein Keyboard
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "nein",
|
"keyboard_name": "nein",
|
||||||
"url": "",
|
"url": "http://www.40percent.club/2019/04/nein.html",
|
||||||
"maintainer": "qmk",
|
"maintainer": "qmk",
|
||||||
"width": 3,
|
"width": 3,
|
||||||
"height": 3,
|
"height": 3,
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
/* Copyright 2019
|
||||||
|
*
|
||||||
|
* 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_ortho_3x3(
|
||||||
|
KC_MUTE, KC_HOME, KC_MPLY,
|
||||||
|
MO(1), KC_UP, KC_END,
|
||||||
|
KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_ortho_3x3(
|
||||||
|
RESET, _______, KC_STOP,
|
||||||
|
_______, _______, RGB_MOD,
|
||||||
|
KC_MPRV, _______, KC_MNXT
|
||||||
|
),
|
||||||
|
[2] = LAYOUT_ortho_3x3(
|
||||||
|
_______, _______, _______,
|
||||||
|
_______, _______, _______,
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
[3] = LAYOUT_ortho_3x3(
|
||||||
|
_______, _______, _______,
|
||||||
|
_______, _______, _______,
|
||||||
|
_______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
# Sendy YK's Numpad 5x4 Layout and Keymap
|
|
||||||
|
|
||||||
[https://mr.sendyyk.com](https://mr.sendyyk.com)
|
|
||||||
|
|
||||||
## Numpad 5x4 Layout
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Keymap
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Build The Firmware
|
|
||||||
|
|
||||||
You will need to build the firmware. To do so go to your terminal window and run the compile command:
|
|
||||||
|
|
||||||
qmk compile -kb ai03/soyuz -km mrsendyyk
|
|
||||||
|
|
||||||
See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs).
|
|
||||||
@@ -1,3 +1 @@
|
|||||||
# Compile with this keymap to use VIA
|
# Compile with this keymap to use VIA
|
||||||
|
|
||||||
Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work.
|
|
||||||
@@ -1,3 +1 @@
|
|||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
MOUSEKEY_ENABLE = no
|
|
||||||
EXTRAKEY_ENABLE = no
|
|
||||||
@@ -1,15 +1,18 @@
|
|||||||
{
|
{
|
||||||
"keyboard_name": "slice",
|
"keyboard_name": "slice",
|
||||||
"url": "https://www.basekeys.com",
|
"url": "https://www.basekeys.com",
|
||||||
"maintainer": "2Moons",
|
"maintainer": "2Moons",
|
||||||
"width": 17.72,
|
"width": 17.72,
|
||||||
"height": 5,
|
"height": 5,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}]
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":2.75}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}]
|
||||||
},
|
},
|
||||||
"LAYOUT_split_left_space": {
|
"LAYOUT_split_left_space": {
|
||||||
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.6600000000000001, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.3900000000000001, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}]
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":1.75}, {"x":7.5, "y":4}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}]
|
||||||
|
},
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.660, "y":0}, {"label":"!", "x":2.66, "y":0}, {"label":"@", "x":3.66, "y":0}, {"label":"#", "x":4.66, "y":0}, {"label":"$", "x":5.66, "y":0}, {"label":"%", "x":6.66, "y":0}, {"label":"^", "x":7.66, "y":0}, {"label":"&", "x":9.32, "y":0}, {"label":"*", "x":10.32, "y":0}, {"label":"(", "x":11.32, "y":0}, {"label":")", "x":12.32, "y":0}, {"label":"_", "x":13.32, "y":0}, {"label":"+", "x":14.32, "y":0}, {"label":"Backspace", "x":15.32, "y":0, "w":2}, {"x":0, "y":1}, {"label":"Tab", "x":1.53, "y":1, "w":1.5}, {"label":"Q", "x":3.03, "y":1}, {"label":"W", "x":4.03, "y":1}, {"label":"E", "x":5.03, "y":1}, {"label":"R", "x":6.03, "y":1}, {"label":"T", "x":7.03, "y":1}, {"label":"Y", "x":9, "y":1}, {"label":"U", "x":10, "y":1}, {"label":"I", "x":11, "y":1}, {"label":"O", "x":12, "y":1}, {"label":"P", "x":13, "y":1}, {"label":"{", "x":14, "y":1}, {"label":"}", "x":15.05, "y":1}, {"label":"|", "x":16.1, "y":1, "w":1.5}, {"x":0, "y":2}, {"label":"Caps Lock", "x":1.390, "y":2, "w":1.75}, {"label":"A", "x":3.14, "y":2}, {"label":"S", "x":4.14, "y":2}, {"label":"D", "x":5.14, "y":2}, {"label":"F", "x":6.14, "y":2}, {"label":"G", "x":7.14, "y":2}, {"label":"H", "x":9.34, "y":2}, {"label":"J", "x":10.34, "y":2}, {"label":"K", "x":11.34, "y":2}, {"label":"L", "x":12.34, "y":2}, {"label":":", "x":13.34, "y":2}, {"label":"\"", "x":14.34, "y":2}, {"label":"Enter", "x":15.34, "y":2, "w":2.25}, {"x":0, "y":3}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":7.5, "y":3}, {"label":"B", "x":8.97, "y":3}, {"label":"N", "x":9.97, "y":3}, {"label":"M", "x":10.97, "y":3}, {"label":"<", "x":11.97, "y":3}, {"label":">", "x":12.97, "y":3}, {"label":"?", "x":13.97, "y":3}, {"label":"Shift", "x":14.97, "y":3, "w":1.75}, {"label":"Shift", "x":16.72, "y":3}, {"x":0, "y":4}, {"label":"Ctrl", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.25}, {"label":"\u21d3", "x":4.75, "y":4}, {"x":5.75, "y":4, "w":0.917}, {"x":6.667, "y":4, "w":0.916}, {"x":7.583, "y":4, "w":0.917}, {"x":8.97, "y":4, "w":2.25}, {"label":"\u21d1", "x":11.22, "y":4}, {"label":"Alt", "x":13.98, "y":4, "w":1.25}, {"label":"Ctrl", "x":15.23, "y":4, "w":1.25}, {"label":"Fn", "x":16.48, "y":4}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
/* Copyright 2020 2Moons
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
#include "split_util.h"
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
enum layer_number {
|
||||||
|
_QWERTY,
|
||||||
|
_FN,
|
||||||
|
_LOWER,
|
||||||
|
_RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT_all(
|
||||||
|
//,------------------------------------------------------------------------| |---------------------------------------------------------------------------.
|
||||||
|
KC_ESC, KC_GRAVE, 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_BSPACE,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_FORWARD, 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,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_GRADIENT, 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,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN)
|
||||||
|
//`------------------------------------------------------------------------| |---------------------------------------------------------------------------'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN] = LAYOUT_all(
|
||||||
|
//,-------------------------------------------------------------------------| |---------------------------------------------------------------------------.
|
||||||
|
KC_ESC, KC_GRAVE, 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_BSPACE,
|
||||||
|
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUSE, KC_UP, _______, _______, _______,
|
||||||
|
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_LEFT,KC_RIGHT, _______, _______,
|
||||||
|
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______,
|
||||||
|
//|-------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
//`-------------------------------------------------------------------------| |---------------------------------------------------------------------------'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_all(
|
||||||
|
//,------------------------------------------------------------------------| |---------------------------------------------------------------------------.
|
||||||
|
KC_ESC, KC_GRAVE, 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_BSPACE,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_FORWARD, 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,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_GRADIENT, 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,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN)
|
||||||
|
//`------------------------------------------------------------------------| |---------------------------------------------------------------------------'
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT_all(
|
||||||
|
//,------------------------------------------------------------------------| |---------------------------------------------------------------------------.
|
||||||
|
KC_ESC, KC_GRAVE, 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_BSPACE,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_FORWARD, 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,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_GRADIENT, 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,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_MODE_XMAS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||||
|
//|------------------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+----------+----------|
|
||||||
|
RGB_TOG, KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_FN)
|
||||||
|
//`------------------------------------------------------------------------| |---------------------------------------------------------------------------'
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
|
|
||||||
|
static void render_qmk_logo(void) {
|
||||||
|
static const char PROGMEM qmk_logo[] = {
|
||||||
|
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||||
|
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||||
|
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||||
|
0};
|
||||||
|
oled_write_P(qmk_logo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
// Host Keyboard Layer Status
|
||||||
|
oled_write_P(PSTR("Layer: "), false);
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
oled_write_P(PSTR("Default\n"), false);
|
||||||
|
break;
|
||||||
|
case _FN:
|
||||||
|
oled_write_P(PSTR("Function\n"), false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||||
|
oled_write_ln_P(PSTR("Undefined"), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Host Keyboard LED Status
|
||||||
|
led_t led_usb_state = host_keyboard_led_state();
|
||||||
|
oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
|
||||||
|
} else {
|
||||||
|
render_qmk_logo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
Executable → Regular
File renamed without changes.
@@ -76,5 +76,23 @@
|
|||||||
{ R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \
|
{ R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, \
|
||||||
|
L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, R17, \
|
||||||
|
L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \
|
||||||
|
L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, R37,\
|
||||||
|
L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ L00, L01, L02, L03, L04, L05, L06, L07, KC_NO }, \
|
||||||
|
{ L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO }, \
|
||||||
|
{ L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO }, \
|
||||||
|
{ L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO }, \
|
||||||
|
{ L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO }, \
|
||||||
|
{ R00, R01, R02, R03, R04, R05, R06, KC_NO, KC_NO }, \
|
||||||
|
{ R10, R11, R12, R13, R14, R15, R16, R17, KC_NO }, \
|
||||||
|
{ R20, R21, R22, R23, R24, R25, R26, KC_NO, KC_NO }, \
|
||||||
|
{ R30, R31, R32, R33, R34, R35, R36, R37, KC_NO }, \
|
||||||
|
{ R40, R41, R42, R43, R44, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ enum layer_names {
|
|||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_BASE] = LAYOUT(
|
[_BASE] = LAYOUT(
|
||||||
KC_ESC, RGB_TOG, 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_DEL, KC_DEL,
|
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_DEL, KC_DEL,
|
||||||
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_HOME,
|
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_HOME,
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/* Copyright 2020 ipetepete
|
||||||
|
*
|
||||||
|
* 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 "bm60poker.h"
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
led_config_t g_led_config = { {
|
||||||
|
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 },
|
||||||
|
{ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 },
|
||||||
|
{ 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 },
|
||||||
|
{ NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52 },
|
||||||
|
{ 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, NO_LED, 59, 60 }
|
||||||
|
}, {
|
||||||
|
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace
|
||||||
|
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 },
|
||||||
|
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], ,
|
||||||
|
{ 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 },
|
||||||
|
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter
|
||||||
|
{ 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 },
|
||||||
|
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up,
|
||||||
|
{ 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 },
|
||||||
|
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
|
||||||
|
{ 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 },
|
||||||
|
// UNDERGLOW
|
||||||
|
{ 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 }
|
||||||
|
}, {
|
||||||
|
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace
|
||||||
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
|
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], ,
|
||||||
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
|
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter
|
||||||
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
|
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up,
|
||||||
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
|
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
|
||||||
|
1, 1, 1, 4, 1, 1, 1, 1,
|
||||||
|
// UNDERGLOW
|
||||||
|
2, 2, 2, 2, 2, 2
|
||||||
|
} };
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/* Copyright 2020 ipetepete
|
||||||
|
*
|
||||||
|
* 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 "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_60_ansi( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
|
||||||
|
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \
|
||||||
|
K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \
|
||||||
|
K40, K41, K42, K46, K49, K4A, K4C, K4D \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \
|
||||||
|
{ K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \
|
||||||
|
{ KC_NO, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \
|
||||||
|
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 ipetepete
|
||||||
|
|
||||||
|
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 0x4B50 // "KP"
|
||||||
|
#define PRODUCT_ID 0xEF8E
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER KP Republic
|
||||||
|
#define PRODUCT BM60POKER
|
||||||
|
|
||||||
|
/* 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 { B0, B1, B2, B3, E6 }
|
||||||
|
#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
#define RGB_DI_PIN E2
|
||||||
|
#define DRIVER_LED_TOTAL 67
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#define RGBLED_NUM 67
|
||||||
|
#define RGB_MATRIX_KEYPRESSES
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 5 /* The maximum brightness level */
|
||||||
|
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
|
||||||
|
/*== all animations enable ==*/
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
// /*== or choose animations ==*/
|
||||||
|
// #define RGBLIGHT_EFFECT_BREATHING
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||||
|
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||||
|
// #define RGBLIGHT_EFFECT_SNAKE
|
||||||
|
// #define RGBLIGHT_EFFECT_KNIGHT
|
||||||
|
// #define RGBLIGHT_EFFECT_CHRISTMAS
|
||||||
|
// #define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||||
|
// #define RGBLIGHT_EFFECT_RGB_TEST
|
||||||
|
// #define RGBLIGHT_EFFECT_ALTERNATING
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "BM60POKER",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_60_ansi": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"K00 (B0,D0)", "x":0, "y":0},
|
||||||
|
{"label":"K01 (B0,D1)", "x":1, "y":0},
|
||||||
|
{"label":"K02 (B0,D2)", "x":2, "y":0},
|
||||||
|
{"label":"K03 (B0,D3)", "x":3, "y":0},
|
||||||
|
{"label":"K04 (B0,D5)", "x":4, "y":0},
|
||||||
|
{"label":"K05 (B0,D4)", "x":5, "y":0},
|
||||||
|
{"label":"K06 (B0,D6)", "x":6, "y":0},
|
||||||
|
{"label":"K07 (B0,D7)", "x":7, "y":0},
|
||||||
|
{"label":"K08 (B0,B4)", "x":8, "y":0},
|
||||||
|
{"label":"K09 (B0,B5)", "x":9, "y":0},
|
||||||
|
{"label":"K0A (B0,B6)", "x":10, "y":0},
|
||||||
|
{"label":"K0B (B0,C6)", "x":11, "y":0},
|
||||||
|
{"label":"K0C (B0,C7)", "x":12, "y":0},
|
||||||
|
{"label":"K0D (B0,F7)", "x":13, "y":0, "w":2},
|
||||||
|
{"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5},
|
||||||
|
{"label":"K11 (B1,D1)", "x":1.5, "y":1},
|
||||||
|
{"label":"K12 (B1,D2)", "x":2.5, "y":1},
|
||||||
|
{"label":"K13 (B1,D3)", "x":3.5, "y":1},
|
||||||
|
{"label":"K14 (B1,D5)", "x":4.5, "y":1},
|
||||||
|
{"label":"K15 (B1,D4)", "x":5.5, "y":1},
|
||||||
|
{"label":"K16 (B1,D6)", "x":6.5, "y":1},
|
||||||
|
{"label":"K17 (B1,D7)", "x":7.5, "y":1},
|
||||||
|
{"label":"K18 (B1,B4)", "x":8.5, "y":1},
|
||||||
|
{"label":"K19 (B1,B5)", "x":9.5, "y":1},
|
||||||
|
{"label":"K1A (B1,B6)", "x":10.5, "y":1},
|
||||||
|
{"label":"K1B (B1,C6)", "x":11.5, "y":1},
|
||||||
|
{"label":"K1C (B1,C7)", "x":12.5, "y":1},
|
||||||
|
{"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5},
|
||||||
|
{"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75},
|
||||||
|
{"label":"K22 (B2,D2)", "x":1.75, "y":2},
|
||||||
|
{"label":"K23 (B2,D3)", "x":2.75, "y":2},
|
||||||
|
{"label":"K24 (B2,D5)", "x":3.75, "y":2},
|
||||||
|
{"label":"K25 (B2,D4)", "x":4.75, "y":2},
|
||||||
|
{"label":"K26 (B2,D6)", "x":5.75, "y":2},
|
||||||
|
{"label":"K27 (B2,D7)", "x":6.75, "y":2},
|
||||||
|
{"label":"K28 (B2,B4)", "x":7.75, "y":2},
|
||||||
|
{"label":"K29 (B2,B5)", "x":8.75, "y":2},
|
||||||
|
{"label":"K2A (B2,B6)", "x":9.75, "y":2},
|
||||||
|
{"label":"K2B (B2,C6)", "x":10.75, "y":2},
|
||||||
|
{"label":"K2C (B2,C7)", "x":11.75, "y":2},
|
||||||
|
{"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25},
|
||||||
|
{"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25},
|
||||||
|
{"label":"K32 (B3,D2)", "x":2.25, "y":3},
|
||||||
|
{"label":"K33 (B3,D3)", "x":3.25, "y":3},
|
||||||
|
{"label":"K34 (B3,D5)", "x":4.25, "y":3},
|
||||||
|
{"label":"K35 (B3,D4)", "x":5.25, "y":3},
|
||||||
|
{"label":"K36 (B3,D6)", "x":6.25, "y":3},
|
||||||
|
{"label":"K37 (B3,D7)", "x":7.25, "y":3},
|
||||||
|
{"label":"K38 (B3,B4)", "x":8.25, "y":3},
|
||||||
|
{"label":"K39 (B3,B5)", "x":9.25, "y":3},
|
||||||
|
{"label":"K3A (B3,B6)", "x":10.25, "y":3},
|
||||||
|
{"label":"K3B (B3,C6)", "x":11.25, "y":3},
|
||||||
|
{"label":"K3D (B3,F7)", "x":12.25, "y":3, "w":2.75},
|
||||||
|
{"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25},
|
||||||
|
{"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25},
|
||||||
|
{"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25},
|
||||||
|
{"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25},
|
||||||
|
{"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25},
|
||||||
|
{"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25},
|
||||||
|
{"label":"K4C (E6,C7)", "x":12.5, "y":4, "w":1.25},
|
||||||
|
{"label":"K4D (E6,F7)", "x":13.75, "y":4, "w":1.25}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/* Copyright 2020 ipetepete
|
||||||
|
*
|
||||||
|
* 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_60_ansi(
|
||||||
|
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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_60_ansi(
|
||||||
|
RESET, 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_DEL,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
/* Copyright 2020 ipetepete
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_qwerty,
|
||||||
|
_gamer,
|
||||||
|
_colemak,
|
||||||
|
_fn,
|
||||||
|
_rgb,
|
||||||
|
_spcfn
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
enum keycodes {
|
||||||
|
gamer = SAFE_RANGE,
|
||||||
|
qwerty,
|
||||||
|
colemak
|
||||||
|
};
|
||||||
|
|
||||||
|
#define KC_SPFN LT(_spcfn, KC_SPC) // press for space, hold for function layer (aka spacefn)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_qwerty] = LAYOUT_60_ansi(
|
||||||
|
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_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,
|
||||||
|
CTL_T(KC_ESC), 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPFN, KC_RALT, KC_RCTL, MO(_fn), MO(_rgb)
|
||||||
|
),
|
||||||
|
// Gamer standard qwerty layout but with normal space for jumping etc
|
||||||
|
[_gamer] = LAYOUT_60_ansi(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_SPACE, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_colemak] = LAYOUT_60_ansi(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______,
|
||||||
|
_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______,
|
||||||
|
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_SPFN, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_fn] = LAYOUT_60_ansi(
|
||||||
|
KC_GESC, 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_DEL,
|
||||||
|
_______, _______, KC_UP, _______, _______, _______, KC_CALC, _______, KC_INS, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET,
|
||||||
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______,
|
||||||
|
KC_MPLY, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, NK_TOGG, _______, _______, KC_END, KC_PGDN, KC_MNXT,
|
||||||
|
qwerty, colemak, gamer, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_rgb] = LAYOUT_60_ansi(
|
||||||
|
_______, 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_DEL,
|
||||||
|
_______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, _______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[_spcfn] = LAYOUT_60_ansi(
|
||||||
|
_______, SGUI(1), SGUI(2), SGUI(3), SGUI(4), SGUI(5), SGUI(6), SGUI(7), SGUI(8), SGUI(9), SGUI(0), _______, _______, KC_DEL,
|
||||||
|
_______, _______, _______, KC_PGUP, _______, KC_LBRC, KC_RBRC, _______, KC_UP, _______, _______, _______, _______, _______,
|
||||||
|
KC_CAPS, _______, _______, KC_PGDN, _______, KC_LCBR, KC_RCBR, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case qwerty:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_clear();
|
||||||
|
layer_on(_qwerty);
|
||||||
|
set_single_persistent_default_layer(_qwerty);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case colemak:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_clear();
|
||||||
|
layer_on(_colemak);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case gamer:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_clear();
|
||||||
|
layer_on(_gamer);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void rgb_matrix_indicators_kb(void)
|
||||||
|
{
|
||||||
|
if (!g_suspend_state && rgb_matrix_config.enable) {
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
//case _qwerty:
|
||||||
|
// rgb_matrix_set_color(26, 0xFF, 0x00, 0x00);
|
||||||
|
// break;
|
||||||
|
case _colemak:
|
||||||
|
rgb_matrix_set_color(55, 0xFF, 0xFF, 0xFF);
|
||||||
|
break;
|
||||||
|
case _spcfn:
|
||||||
|
rgb_matrix_set_color(22, 0xFF, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(35, 0xFF, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(36, 0xFF, 0x00, 0x00);
|
||||||
|
rgb_matrix_set_color(37, 0xFF, 0x00, 0x00);
|
||||||
|
break;
|
||||||
|
case _gamer:
|
||||||
|
rgb_matrix_set_color(16, 0xFF, 0x00, 0xFF);
|
||||||
|
rgb_matrix_set_color(29, 0xFF, 0x00, 0xFF);
|
||||||
|
rgb_matrix_set_color(30, 0xFF, 0x00, 0xFF);
|
||||||
|
rgb_matrix_set_color(31, 0xFF, 0x00, 0xFF);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# Simple 60% for coding
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# BM60 Poker 60% Mechanical Keyboard RGB PCB
|
||||||
|
|
||||||
|
A 60% hotswap inswitch RGB (north facing) keyboard from KP Republic.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [ipetepete](https://github.com/ipetepete)
|
||||||
|
* Hardware Supported: BM60 POKER RGB
|
||||||
|
* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-poker-60-gh60-hot-swap-custom-mechanical-keyboard-pcb-program-qmk-underglow-type-c)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make bm60poker: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).
|
||||||
|
|
||||||
|
Video tutorials for customizing the layout: [QMK Tutorials](https://www.youtube.com/playlist?list=PLZlceRZZjRugJFL-vnenYnDrbMc6wu_e_) - By MechMerlin
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
RGB_MATRIX_ENABLE = WS2812
|
||||||
|
LAYOUTS = 60_ansi
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define LAYOUT( \
|
#define LAYOUT_60_iso_arrow( \
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \
|
||||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
|
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \
|
||||||
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1D, \
|
K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K1D, \
|
||||||
@@ -30,3 +30,5 @@
|
|||||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \
|
||||||
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D }, \
|
{ K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D }, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define LAYOUT LAYOUT_60_iso_arrow
|
||||||
@@ -16,19 +16,18 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT(
|
[0] = LAYOUT_60_iso_arrow(
|
||||||
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_GESC, 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_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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT,
|
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_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH,
|
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
[1] = LAYOUT(
|
[1] = LAYOUT_60_iso_arrow(
|
||||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
RESET, 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_DEL,
|
||||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______,
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
),
|
),
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -35,12 +35,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
),
|
),
|
||||||
|
|
||||||
[3] = LAYOUT_ortho_5x12(
|
[3] = LAYOUT_ortho_5x12(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
)
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_FN,
|
||||||
|
_RAISE,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Base Layer
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | LCTRL | LGUI | FN | LALT | RAISE | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | RCTRL |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BASE] = LAYOUT_ortho_2x2u(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_LCTL, KC_LGUI, MO(_FN), KC_LALT, MO(_RAISE), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Function Layer
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | | | MENU | | | | | | | | | | PRT SC | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | | | | | | | | | | | | | | RESET |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FN] = LAYOUT_ortho_2x2u(
|
||||||
|
KC_GRV, 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_DEL,
|
||||||
|
_______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise Layer
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | | | MENU | | | | | | | | | | PRT SC | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | | | | | | | | | | | | | | RESET |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | | | | | | | | | MUTE | VOL DN | VOL UP | \ | |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | | | | | | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_ortho_2x2u(
|
||||||
|
KC_GRV, 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_DEL,
|
||||||
|
_______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSLS, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default_2x2u keymap for Boardwalk
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
/*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
enum layer_names {
|
||||||
|
_BASE,
|
||||||
|
_QWERTY,
|
||||||
|
_FN,
|
||||||
|
_NUM,
|
||||||
|
_ADJ,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
COLEMAK,
|
||||||
|
FN,
|
||||||
|
NUM,
|
||||||
|
ADJ,
|
||||||
|
MACWIN
|
||||||
|
};
|
||||||
|
|
||||||
|
#define QWERTY DF(_QWERTY)
|
||||||
|
#define COLEMAK DF(_BASE)
|
||||||
|
#define FN MO(_FN)
|
||||||
|
#define NUM TT(_NUM)
|
||||||
|
#define ADJ MO(_ADJ)
|
||||||
|
#define MACWIN AG_TOGG
|
||||||
|
#define RGB_ON RGB_MODE_PLAIN
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Base Layer (Colemak)
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | F | P | G | [ | ] | J | L | U | Y | ; | \ |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | _FN | A | R | S | T | D | HOME | PG UP | H | N | E | I | O | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | END | PG DN | K | M | , | . | / | RSHIFT |
|
||||||
|
* '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------'
|
||||||
|
* | LCTRL | LALT | LGUI | TG_NUM | ENTER | SPACE | LEFT | DOWN | UP | RIGHT |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_BASE] = LAYOUT_ortho_hhkb(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||||
|
FN, KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, NUM, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* QWERTY
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | \ |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | _FN | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ' |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
|
||||||
|
* '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------'
|
||||||
|
* | LCTRL | LALT | LGUI | TG_NUM | ENTER | SPACE | LEFT | DOWN | UP | RIGHT |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT_ortho_hhkb(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
FN, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, NUM, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FN
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | F1 | F2 | F3 | F4 | F5 | F11 | F12 | F6 | F7 | F8 | F9 | F10 | DEL |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | | Prev | Play | Next | | | | | | Pg Up | Up | Pg Dn | PRT SC | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | XXXXXX | | Mute | Vol Dn | Vol Up | | | | | Left | Down | Right | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | | | | | | | | | Home | | End | | CapsLk |
|
||||||
|
* '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------'
|
||||||
|
* | | | | _ADJ | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_FN] = LAYOUT_ortho_hhkb(
|
||||||
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||||
|
_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, _______,
|
||||||
|
_______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, KC_END, _______, KC_CAPS,
|
||||||
|
_______, _______, _______, ADJ, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Num Pad (NUM)
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | Num Lk | KP / | KP * | KP - | Scr Lk | Pause |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | | | | | | | | | KP 7 | KP 8 | KP 9 | KP + | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | _ADJ | | | | | | | | KP 4 | KP 5 | KP 6 | KP + | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | | | | | | | | KP 1 | KP 2 | KP 3 | KP Ent | | |
|
||||||
|
* '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------'
|
||||||
|
* | | | | XXXXXX | | KP 0 | KP 0 | KP . | KP Ent | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_NUM] = LAYOUT_ortho_hhkb(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_SLCK, KC_PAUS,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, _______,
|
||||||
|
ADJ, _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* ADJUST + RGB Control
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | Static | Breath | Rainbw | Swirl | Gradnt | Test | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | | On/Off | ModeUp | Hue Up | Sat Up | Val Up | | | | | | | RESET | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | XXXXXX | MACWIN | | Hue Dn | Sat Dn | Val Dn | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | Colemak| QWERTY | | | | | | | | | | | |
|
||||||
|
* '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------'
|
||||||
|
* | | | | XXXXXX | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJ] = LAYOUT_ortho_hhkb(
|
||||||
|
_______, RGB_ON, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_G, RGB_M_T, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, RESET, _______,
|
||||||
|
_______, MACWIN, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, COLEMAK, QWERTY, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Nic Lake's Boardwalk Layout
|
||||||
|
|
||||||
|
This is Nic's Boardwalk layout, which is based off of the default Pok3r layout.
|
||||||
|
|
||||||
|
- Colemak base layer w/ QWERTY support
|
||||||
|
- Bottom row set up for Mac usage (use `MACWIN`/`AG_TOGG` to toggle)
|
||||||
|
- Latching Numpad layer for data entry
|
||||||
|
- Uses [Space Cadet shift keys](https://docs.qmk.fm/#/feature_space_cadet?id=usage)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
COMMAND_ENABLE = no
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
BOOTMAGIC_ENABLE = full
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
|
||||||
|
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 0x7767
|
||||||
|
#define PRODUCT_ID 0x481C
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER AlisGraveNil
|
||||||
|
#define PRODUCT FightPad
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 2
|
||||||
|
#define MATRIX_COLS 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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 { B5, B6 }
|
||||||
|
#define MATRIX_COL_PINS { D7, E6, B4, B2, B3, B1, F7 }
|
||||||
|
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/* Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
*
|
||||||
|
* 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 "fightpad.h"
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/* Copyright 2020 AAClawson (AlisGraveNil)
|
||||||
|
*
|
||||||
|
* 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 "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
K01, K03, K04, K05, K06, \
|
||||||
|
K10, K11, K12, K13, K14, K15, K16 \
|
||||||
|
) { \
|
||||||
|
{ KC_NO, K01, KC_NO, K03, K04, K05, K06 }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16 }, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "FightPad",
|
||||||
|
"url": "www.clawboards.xyz",
|
||||||
|
"maintainer": "AAClawson (AlisGraveNil)",
|
||||||
|
"width": 8,
|
||||||
|
"height": 2,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"K01 (B5,E6)", "x":1, "y":0},
|
||||||
|
{"label":"K03 (B5,B2)", "x":4, "y":0},
|
||||||
|
{"label":"K04 (B5,B3)", "x":5, "y":0},
|
||||||
|
{"label":"K05 (B5,B1)", "x":6, "y":0},
|
||||||
|
{"label":"K06 (B5,F7)", "x":7, "y":0},
|
||||||
|
{"label":"K10 (B6,D7)", "x":0, "y":1},
|
||||||
|
{"label":"K11 (B6,E6)", "x":1, "y":1},
|
||||||
|
{"label":"K12 (B6,B4)", "x":2, "y":1},
|
||||||
|
{"label":"K13 (B6,B2)", "x":4, "y":1},
|
||||||
|
{"label":"K14 (B6,B3)", "x":5, "y":1},
|
||||||
|
{"label":"K15 (B6,B1)", "x":6, "y":1},
|
||||||
|
{"label":"K16 (B6,F7)", "x":7, "y":1}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/* Copyright 2020 REPLACE_WITH_YOUR_NAME
|
||||||
|
*
|
||||||
|
* 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(
|
||||||
|
KC_W, KC_U, KC_I, KC_O, KC_P,
|
||||||
|
KC_A, KC_S, KC_D, KC_H, KC_J, KC_K, KC_L
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# FightPad
|
||||||
|
|
||||||
|
This is a 2x7 macropad.
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil)
|
||||||
|
* Hardware Supported: FightPad; Pro Micro or Elite-C
|
||||||
|
* Hardware Availability: [Clawsome Boards](https://www.clawboards.xyz/)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make clawsome/fightpad: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).
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
@@ -155,6 +155,7 @@ void matrix_init(void)
|
|||||||
|
|
||||||
uint8_t _matrix_scan(void)
|
uint8_t _matrix_scan(void)
|
||||||
{
|
{
|
||||||
|
bool changed = false;
|
||||||
// Right hand is stored after the left in the matirx so, we need to offset it
|
// Right hand is stored after the left in the matirx so, we need to offset it
|
||||||
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
|
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
|
||||||
|
|
||||||
@@ -163,6 +164,7 @@ uint8_t _matrix_scan(void)
|
|||||||
_delay_us(30); // without this wait read unstable value.
|
_delay_us(30); // without this wait read unstable value.
|
||||||
matrix_row_t cols = read_cols();
|
matrix_row_t cols = read_cols();
|
||||||
if (matrix_debouncing[i+offset] != cols) {
|
if (matrix_debouncing[i+offset] != cols) {
|
||||||
|
changed = true;
|
||||||
matrix_debouncing[i+offset] = cols;
|
matrix_debouncing[i+offset] = cols;
|
||||||
debouncing = DEBOUNCE;
|
debouncing = DEBOUNCE;
|
||||||
}
|
}
|
||||||
@@ -179,7 +181,7 @@ uint8_t _matrix_scan(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_MATRIX_I2C
|
#ifdef USE_MATRIX_I2C
|
||||||
@@ -237,16 +239,17 @@ int serial_transaction(int master_changed) {
|
|||||||
|
|
||||||
uint8_t matrix_scan(void)
|
uint8_t matrix_scan(void)
|
||||||
{
|
{
|
||||||
|
bool changed = false;
|
||||||
if (is_master) {
|
if (is_master) {
|
||||||
matrix_master_scan();
|
changed |= matrix_master_scan();
|
||||||
}else{
|
}else{
|
||||||
matrix_slave_scan();
|
changed |= matrix_slave_scan();
|
||||||
int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
|
int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
|
||||||
memcpy(&matrix[offset],
|
memcpy(&matrix[offset],
|
||||||
(void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH);
|
(void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH);
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
}
|
}
|
||||||
return 1;
|
return (uint8_t) changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -297,8 +300,8 @@ uint8_t matrix_master_scan(void) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_slave_scan(void) {
|
uint8_t matrix_slave_scan(void) {
|
||||||
_matrix_scan();
|
int ret = _matrix_scan();
|
||||||
|
|
||||||
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
|
||||||
|
|
||||||
@@ -314,7 +317,7 @@ void matrix_slave_scan(void) {
|
|||||||
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
for (int i = 0; i < ROWS_PER_HAND; ++i) {
|
||||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||||
if( serial_slave_buffer[i] != matrix[offset+i] )
|
if( serial_slave_buffer[i] != matrix[offset+i] )
|
||||||
change = 1;
|
change = 1;
|
||||||
#endif
|
#endif
|
||||||
serial_slave_buffer[i] = matrix[offset+i];
|
serial_slave_buffer[i] = matrix[offset+i];
|
||||||
}
|
}
|
||||||
@@ -322,6 +325,7 @@ void matrix_slave_scan(void) {
|
|||||||
slave_buffer_change_count += change;
|
slave_buffer_change_count += change;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool matrix_is_modified(void)
|
bool matrix_is_modified(void)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
extern volatile bool isLeftHand;
|
extern volatile bool isLeftHand;
|
||||||
|
|
||||||
// slave version of matix scan, defined in matrix.c
|
// slave version of matix scan, defined in matrix.c
|
||||||
void matrix_slave_scan(void);
|
uint8_t matrix_slave_scan(void);
|
||||||
|
|
||||||
void split_keyboard_setup(void);
|
void split_keyboard_setup(void);
|
||||||
bool has_usb(void);
|
bool has_usb(void);
|
||||||
|
|||||||
@@ -1,98 +0,0 @@
|
|||||||
/* Copyright (C) 2020 Sendy YK (https://mr.sendyyk.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 3 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 <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
|
||||||
|
|
||||||
enum layer_names {
|
|
||||||
_BASE, // Default Layer
|
|
||||||
_FN, // Fn Layer 1
|
|
||||||
_SETTINGS // Fn Layer 2
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
// Default Layer
|
|
||||||
[_BASE] = LAYOUT_60_ansi_arrow(
|
|
||||||
KC_GESC, 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_SLSH,
|
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, LT(2, KC_RALT), LT(1, KC_RCTL), KC_LEFT, KC_DOWN, KC_RGHT
|
|
||||||
),
|
|
||||||
// Fn Layer 1
|
|
||||||
[_FN] = LAYOUT_60_ansi_arrow(
|
|
||||||
KC_GRV, 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_DEL,
|
|
||||||
KC_BRIU, KC_TRNS, KC_TRNS, KC_END, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_TRNS, KC_TRNS, KC_EJCT,
|
|
||||||
KC_BRID, KC_TRNS, KC_SLCK, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE,
|
|
||||||
KC_VOLU, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_NLCK, KC_MAIL, KC_TRNS, KC_TRNS, KC_PAUS, KC_PGUP, KC_TRNS,
|
|
||||||
KC_VOLD, KC_MRWD, KC_MFFD, KC_MPLY, KC_MSTP, KC_TRNS, KC_MPRV, KC_PGDN, KC_MNXT
|
|
||||||
),
|
|
||||||
// Fn Layer 2
|
|
||||||
[_SETTINGS] = LAYOUT_60_ansi_arrow(
|
|
||||||
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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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_TRNS,
|
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, 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
|
|
||||||
)
|
|
||||||
};
|
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
|
||||||
rgblight_enable_noeeprom();
|
|
||||||
rgblight_sethsv_noeeprom(0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator
|
|
||||||
void update_led(void) {
|
|
||||||
// Num Lock Indicator
|
|
||||||
if (host_keyboard_led_state().num_lock) {
|
|
||||||
rgblight_setrgb(225, 8, 0);
|
|
||||||
}
|
|
||||||
// Scroll Lock Indicator
|
|
||||||
if (host_keyboard_led_state().scroll_lock) {
|
|
||||||
rgblight_setrgb(255, 110, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_set_user(uint8_t usb_led) {
|
|
||||||
// Caps Lock Indicator
|
|
||||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
|
||||||
writePinLow(B2);
|
|
||||||
rgblight_setrgb(100, 255, 100);
|
|
||||||
}
|
|
||||||
// Layer Indicator
|
|
||||||
else {
|
|
||||||
switch (get_highest_layer(layer_state)) {
|
|
||||||
// Fn Layer 1 Indicator
|
|
||||||
case _FN:
|
|
||||||
rgblight_setrgb(100, 255, 100);
|
|
||||||
break;
|
|
||||||
// Fn Layer 2 Indicator
|
|
||||||
case _SETTINGS:
|
|
||||||
rgblight_setrgb(100, 255, 100);
|
|
||||||
break;
|
|
||||||
// Default Layer Indicator
|
|
||||||
case _BASE:
|
|
||||||
rgblight_setrgb(0, 0, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
update_led();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
|
||||||
update_led();
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
# Sendy YK's 60% ANSI Arrow Layout and Keymap
|
|
||||||
|
|
||||||
[https://mr.sendyyk.com](https://mr.sendyyk.com)
|
|
||||||
|
|
||||||
## 60% ANSI Arrow Layout
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Keymap
|
|
||||||
|
|
||||||
### Default Layer
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Fn Layer 1
|
|
||||||
|
|
||||||
Press and hold *right* **Ctrl** key.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Fn Layer 2
|
|
||||||
|
|
||||||
Press and hold *right* **Alt** key.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### RGB Lighting/LED/Underglow as Caps Lock, Num Lock, Scroll Lock, and Layer Indicator
|
|
||||||
|
|
||||||
#### Caps Lock Indicator
|
|
||||||
|
|
||||||
```c
|
|
||||||
// Caps Lock Indicator
|
|
||||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
|
||||||
writePinLow(B2);
|
|
||||||
rgblight_setrgb(100, 255, 100);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Num Lock Indicator
|
|
||||||
|
|
||||||
```c
|
|
||||||
// Num Lock Indicator
|
|
||||||
if (host_keyboard_led_state().num_lock) {
|
|
||||||
rgblight_setrgb(225, 8, 0);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Scroll Lock Indicator
|
|
||||||
```c
|
|
||||||
// Scroll Lock Indicator
|
|
||||||
if (host_keyboard_led_state().scroll_lock) {
|
|
||||||
rgblight_setrgb(255, 110, 0);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Layer Indicator
|
|
||||||
|
|
||||||
```c
|
|
||||||
// Layer Indicator
|
|
||||||
else {
|
|
||||||
switch (get_highest_layer(layer_state)) {
|
|
||||||
// Fn Layer 1 Indicator
|
|
||||||
case _FN:
|
|
||||||
rgblight_setrgb(100, 255, 100);
|
|
||||||
break;
|
|
||||||
// Fn Layer 2 Indicator
|
|
||||||
case _SETTINGS:
|
|
||||||
rgblight_setrgb(100, 255, 100);
|
|
||||||
break;
|
|
||||||
// Default Layer Indicator
|
|
||||||
case _BASE:
|
|
||||||
rgblight_setrgb(0, 0, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
update_led();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build The Firmware
|
|
||||||
|
|
||||||
You will need to build the firmware. To do so go to your terminal window and run the compile command:
|
|
||||||
|
|
||||||
qmk compile -kb dz60 -km mrsendyyk
|
|
||||||
|
|
||||||
See [The Complete Newbs Guide To QMK](https://docs.qmk.fm/#/newbs).
|
|
||||||
@@ -8,11 +8,11 @@
|
|||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[0] = LAYOUT( \
|
[0] = LAYOUT( \
|
||||||
KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QOT, SI_PLUS,XXXXXXX,KC_BSPC, \
|
KC_GESC,SI_1, SI_2, SI_3, SI_4, SI_5, SI_6, SI_7, SI_8, SI_9, SI_0, SI_QUOT, SI_PLUS,XXXXXXX,KC_BSPC, \
|
||||||
KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \
|
KC_TAB, SI_Q, SI_W, SI_E, SI_R, SI_T, SI_Z, SI_U, SI_I, SI_O, SI_P, SI_GRV, SI_TILD,CARON, \
|
||||||
MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN,KC_QUOT,KC_ENT, \
|
MO(2), SI_A, SI_S, SI_D, SI_F, SI_G, SI_H, SI_J, SI_K, SI_L, KC_SCLN, KC_QUOT,KC_ENT, \
|
||||||
KC_LSFT,XXXXXXX,SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM,SI_DOT, SI_MINS, KC_RSFT,XXXXXXX, \
|
KC_LSFT,XXXXXXX,SI_Y, SI_X, SI_C, SI_V, SI_B, SI_N, SI_M, SI_COMM,SI_DOT, SI_MINS, KC_RSFT,XXXXXXX, \
|
||||||
KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \
|
KC_LCTL,KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC, KC_RALT,MO(3), XXXXXXX,MO(1), KC_F5 \
|
||||||
),
|
),
|
||||||
|
|
||||||
[1] = LAYOUT( \
|
[1] = LAYOUT( \
|
||||||
@@ -33,9 +33,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[3] = LAYOUT( \
|
[3] = LAYOUT( \
|
||||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||||
_______, _______,_______,_______,_______,_______,SI_ZV, _______,_______,_______,_______,_______,_______,_______, \
|
_______, _______,_______,_______,_______,_______,SI_ZCAR,_______,_______,_______,_______,_______,_______,_______, \
|
||||||
_______, _______,SI_SV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
_______, _______,SI_SCAR, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||||
_______,_______,_______,_______,SI_CV, _______,_______,_______,_______,_______,_______,_______, _______,_______, \
|
_______,_______,_______,_______,SI_CCAR, _______,_______,_______,_______,_______,_______,_______, _______,_______, \
|
||||||
_______,_______, _______,_______, _______, _______, _______,_______,_______,_______,_______ \
|
_______,_______, _______,_______, _______, _______, _______,_______,_______,_______,_______ \
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include QMK_KEYBOARD_CONFIG_H
|
#include QMK_KEYBOARD_CONFIG_H
|
||||||
|
|||||||
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "333fred.h"
|
#include "333fred.h"
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
|
#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
|
||||||
#define MATRIX_COLS 6
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
#define COL_EXPANDED { true, true, true, true, true, true, true, false, false, false, false, false, false, false }
|
||||||
|
#define MATRIX_ONBOARD_ROW_PINS { 0, 0, 0, 0, 0, 0, 0, B0, B1, B2, B3, D2, D3, C6 }
|
||||||
|
#define MATRIX_ONBOARD_COL_PINS { F0, F1, F4, F5, F6, F7 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
#define EXPANDER_COL_REGISTER GPIOB
|
||||||
|
#define EXPANDER_ROW_REGISTER GPIOA
|
||||||
|
#define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 }
|
||||||
|
#define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 }
|
||||||
|
|
||||||
|
|
||||||
#define MOUSEKEY_INTERVAL 20
|
#define MOUSEKEY_INTERVAL 20
|
||||||
#define MOUSEKEY_DELAY 0
|
#define MOUSEKEY_DELAY 0
|
||||||
#define MOUSEKEY_TIME_TO_MAX 60
|
#define MOUSEKEY_TIME_TO_MAX 60
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include "ergodox_ez.h"
|
||||||
|
|
||||||
extern inline void ergodox_board_led_on(void);
|
extern inline void ergodox_board_led_on(void);
|
||||||
extern inline void ergodox_right_led_1_on(void);
|
extern inline void ergodox_right_led_1_on(void);
|
||||||
|
|||||||
@@ -4,10 +4,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "i2c_master.h"
|
#include "i2c_master.h"
|
||||||
#include <util/delay.h>
|
|
||||||
|
|
||||||
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
|
|
||||||
#define CPU_16MHz 0x00
|
|
||||||
|
|
||||||
// I2C aliases and register addresses (see "mcp23018.md")
|
// I2C aliases and register addresses (see "mcp23018.md")
|
||||||
#define I2C_ADDR 0b0100000
|
#define I2C_ADDR 0b0100000
|
||||||
|
|||||||
+126
-199
@@ -30,7 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "matrix.h"
|
#include "matrix.h"
|
||||||
#include "debounce.h"
|
#include "debounce.h"
|
||||||
#include QMK_KEYBOARD_H
|
#include "ergodox_ez.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This constant define not debouncing time in msecs, assuming eager_pr.
|
* This constant define not debouncing time in msecs, assuming eager_pr.
|
||||||
@@ -45,8 +46,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* matrix state(1:on, 0:off) */
|
/* matrix state(1:on, 0:off) */
|
||||||
static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
|
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||||
static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
|
||||||
|
|
||||||
static matrix_row_t read_cols(uint8_t row);
|
static matrix_row_t read_cols(uint8_t row);
|
||||||
static void init_cols(void);
|
static void init_cols(void);
|
||||||
@@ -54,132 +55,62 @@ static void unselect_rows(void);
|
|||||||
static void select_row(uint8_t row);
|
static void select_row(uint8_t row);
|
||||||
|
|
||||||
static uint8_t mcp23018_reset_loop;
|
static uint8_t mcp23018_reset_loop;
|
||||||
// static uint16_t mcp23018_reset_loop;
|
|
||||||
|
|
||||||
__attribute__((weak)) void matrix_init_user(void) {}
|
void matrix_init_custom(void) {
|
||||||
|
// initialize row and col
|
||||||
|
|
||||||
__attribute__((weak)) void matrix_scan_user(void) {}
|
mcp23018_status = init_mcp23018();
|
||||||
|
|
||||||
__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
|
unselect_rows();
|
||||||
|
init_cols();
|
||||||
__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
|
|
||||||
|
|
||||||
inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
|
|
||||||
|
|
||||||
inline uint8_t matrix_cols(void) { return MATRIX_COLS; }
|
|
||||||
|
|
||||||
void matrix_init(void) {
|
|
||||||
// initialize row and col
|
|
||||||
|
|
||||||
mcp23018_status = init_mcp23018();
|
|
||||||
|
|
||||||
unselect_rows();
|
|
||||||
init_cols();
|
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
matrix[i] = 0;
|
|
||||||
raw_matrix[i] = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
debounce_init(MATRIX_ROWS);
|
|
||||||
matrix_init_quantum();
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_power_up(void) {
|
|
||||||
mcp23018_status = init_mcp23018();
|
|
||||||
|
|
||||||
unselect_rows();
|
|
||||||
init_cols();
|
|
||||||
|
|
||||||
// initialize matrix state: all keys off
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
matrix[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reads and stores a row, returning
|
// Reads and stores a row, returning
|
||||||
// whether a change occurred.
|
// whether a change occurred.
|
||||||
static inline bool store_raw_matrix_row(uint8_t index) {
|
static inline bool store_raw_matrix_row(uint8_t index) {
|
||||||
matrix_row_t temp = read_cols(index);
|
matrix_row_t temp = read_cols(index);
|
||||||
if (raw_matrix[index] != temp) {
|
if (raw_matrix[index] != temp) {
|
||||||
raw_matrix[index] = temp;
|
raw_matrix[index] = temp;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t matrix_scan(void) {
|
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||||
if (mcp23018_status) { // if there was an error
|
if (mcp23018_status) { // if there was an error
|
||||||
if (++mcp23018_reset_loop == 0) {
|
if (++mcp23018_reset_loop == 0) {
|
||||||
// if (++mcp23018_reset_loop >= 1300) {
|
print("trying to reset mcp23018\n");
|
||||||
// since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
|
mcp23018_status = init_mcp23018();
|
||||||
// this will be approx bit more frequent than once per second
|
if (mcp23018_status) {
|
||||||
print("trying to reset mcp23018\n");
|
print("left side not responding\n");
|
||||||
mcp23018_status = init_mcp23018();
|
} else {
|
||||||
if (mcp23018_status) {
|
print("left side attached\n");
|
||||||
print("left side not responding\n");
|
ergodox_blink_all_leds();
|
||||||
} else {
|
|
||||||
print("left side attached\n");
|
|
||||||
ergodox_blink_all_leds();
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_matrix_init(); // re-init driver on reconnect
|
rgb_matrix_init(); // re-init driver on reconnect
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef LEFT_LEDS
|
#ifdef LEFT_LEDS
|
||||||
mcp23018_status = ergodox_left_leds_update();
|
mcp23018_status = ergodox_left_leds_update();
|
||||||
#endif // LEFT_LEDS
|
#endif // LEFT_LEDS
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||||
// select rows from left and right hands
|
// select rows from left and right hands
|
||||||
uint8_t left_index = i;
|
uint8_t left_index = i;
|
||||||
uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
|
uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
|
||||||
select_row(left_index);
|
select_row(left_index);
|
||||||
select_row(right_index);
|
select_row(right_index);
|
||||||
|
|
||||||
// we don't need a 30us delay anymore, because selecting a
|
changed |= store_raw_matrix_row(left_index);
|
||||||
// left-hand row requires more than 30us for i2c.
|
changed |= store_raw_matrix_row(right_index);
|
||||||
|
|
||||||
changed |= store_raw_matrix_row(left_index);
|
unselect_rows();
|
||||||
changed |= store_raw_matrix_row(right_index);
|
}
|
||||||
|
|
||||||
unselect_rows();
|
return changed;
|
||||||
}
|
|
||||||
|
|
||||||
debounce(raw_matrix, matrix, MATRIX_ROWS, changed);
|
|
||||||
matrix_scan_quantum();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool matrix_is_modified(void) // deprecated and evidently not called.
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
|
|
||||||
|
|
||||||
inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
|
|
||||||
|
|
||||||
void matrix_print(void) {
|
|
||||||
print("\nr/c 0123456789ABCDEF\n");
|
|
||||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
|
||||||
phex(row);
|
|
||||||
print(": ");
|
|
||||||
pbin_reverse16(matrix_get_row(row));
|
|
||||||
print("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t matrix_key_count(void) {
|
|
||||||
uint8_t count = 0;
|
|
||||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
|
||||||
count += bitpop16(matrix[i]);
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Column pin configuration
|
/* Column pin configuration
|
||||||
@@ -193,42 +124,43 @@ uint8_t matrix_key_count(void) {
|
|||||||
* pin: B5 B4 B3 B2 B1 B0
|
* pin: B5 B4 B3 B2 B1 B0
|
||||||
*/
|
*/
|
||||||
static void init_cols(void) {
|
static void init_cols(void) {
|
||||||
// init on mcp23018
|
// init on mcp23018
|
||||||
// not needed, already done as part of init_mcp23018()
|
// not needed, already done as part of init_mcp23018()
|
||||||
|
|
||||||
// init on teensy
|
// init on teensy
|
||||||
// Input with pull-up(DDR:0, PORT:1)
|
setPinInputHigh(F0);
|
||||||
DDRF &= ~(1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0);
|
setPinInputHigh(F1);
|
||||||
PORTF |= (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0);
|
setPinInputHigh(F4);
|
||||||
|
setPinInputHigh(F5);
|
||||||
|
setPinInputHigh(F6);
|
||||||
|
setPinInputHigh(F7);
|
||||||
}
|
}
|
||||||
|
|
||||||
static matrix_row_t read_cols(uint8_t row) {
|
static matrix_row_t read_cols(uint8_t row) {
|
||||||
if (row < 7) {
|
if (row < 7) {
|
||||||
if (mcp23018_status) { // if there was an error
|
if (mcp23018_status) { // if there was an error
|
||||||
return 0;
|
return 0;
|
||||||
|
} else {
|
||||||
|
uint8_t data = 0;
|
||||||
|
// reading GPIOB (column port) since in mcp23018's sequential mode
|
||||||
|
// it is addressed directly after writing to GPIOA in select_row()
|
||||||
|
mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
|
mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
|
||||||
|
data = ~((uint8_t)mcp23018_status);
|
||||||
|
mcp23018_status = I2C_STATUS_SUCCESS;
|
||||||
|
out:
|
||||||
|
i2c_stop();
|
||||||
|
return data;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uint8_t data = 0;
|
/* read from teensy
|
||||||
// reading GPIOB (column port) since in mcp23018's sequential mode
|
* bitmask is 0b11110011, but we want those all
|
||||||
// it is addressed directly after writing to GPIOA in select_row()
|
* in the lower six bits.
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT);
|
* we'll return 1s for the top two, but that's harmless.
|
||||||
if (mcp23018_status) goto out;
|
*/
|
||||||
mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT);
|
|
||||||
if (mcp23018_status < 0) goto out;
|
|
||||||
data = ~((uint8_t)mcp23018_status);
|
|
||||||
mcp23018_status = I2C_STATUS_SUCCESS;
|
|
||||||
out:
|
|
||||||
i2c_stop();
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* read from teensy
|
|
||||||
* bitmask is 0b11110011, but we want those all
|
|
||||||
* in the lower six bits.
|
|
||||||
* we'll return 1s for the top two, but that's harmless.
|
|
||||||
*/
|
|
||||||
|
|
||||||
return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2));
|
return ~((PINF & 0x03) | ((PINF & 0xF0) >> 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Row pin configuration
|
/* Row pin configuration
|
||||||
@@ -242,69 +174,64 @@ static matrix_row_t read_cols(uint8_t row) {
|
|||||||
* pin: A0 A1 A2 A3 A4 A5 A6
|
* pin: A0 A1 A2 A3 A4 A5 A6
|
||||||
*/
|
*/
|
||||||
static void unselect_rows(void) {
|
static void unselect_rows(void) {
|
||||||
// no need to unselect on mcp23018, because the select step sets all
|
// no need to unselect on mcp23018, because the select step sets all
|
||||||
// the other row bits high, and it's not changing to a different
|
// the other row bits high, and it's not changing to a different
|
||||||
// direction
|
// direction
|
||||||
|
|
||||||
// unselect on teensy
|
// unselect on teensy
|
||||||
// Hi-Z(DDR:0, PORT:0) to unselect
|
setPinInput(B0);
|
||||||
DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
|
setPinInput(B1);
|
||||||
PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
|
setPinInput(B2);
|
||||||
DDRD &= ~(1 << 2 | 1 << 3);
|
setPinInput(B3);
|
||||||
PORTD &= ~(1 << 2 | 1 << 3);
|
setPinInput(D2);
|
||||||
DDRC &= ~(1 << 6);
|
setPinInput(D3);
|
||||||
PORTC &= ~(1 << 6);
|
setPinInput(C6);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void select_row(uint8_t row) {
|
static void select_row(uint8_t row) {
|
||||||
if (row < 7) {
|
if (row < 7) {
|
||||||
// select on mcp23018
|
// select on mcp23018
|
||||||
if (mcp23018_status) { // if there was an error
|
if (!mcp23018_status) {
|
||||||
// do nothing
|
// set active row low : 0
|
||||||
|
// set other rows hi-Z : 1
|
||||||
|
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
|
mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
|
mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
|
||||||
|
out:
|
||||||
|
i2c_stop();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// set active row low : 0
|
// select on teensy
|
||||||
// set other rows hi-Z : 1
|
// Output low(DDR:1, PORT:0) to select
|
||||||
mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT);
|
switch (row) {
|
||||||
if (mcp23018_status) goto out;
|
case 7:
|
||||||
mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT);
|
setPinOutput(B0);
|
||||||
if (mcp23018_status) goto out;
|
writePinLow(B0);
|
||||||
mcp23018_status = i2c_write(0xFF & ~(1 << row), ERGODOX_EZ_I2C_TIMEOUT);
|
break;
|
||||||
if (mcp23018_status) goto out;
|
case 8:
|
||||||
out:
|
setPinOutput(B1);
|
||||||
i2c_stop();
|
writePinLow(B1);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
setPinOutput(B2);
|
||||||
|
writePinLow(B2);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
setPinOutput(B3);
|
||||||
|
writePinLow(B3);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
setPinOutput(D2);
|
||||||
|
writePinLow(D2);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
setPinOutput(D3);
|
||||||
|
writePinLow(D3);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
setPinOutput(C6);
|
||||||
|
writePinLow(C6);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// select on teensy
|
|
||||||
// Output low(DDR:1, PORT:0) to select
|
|
||||||
switch (row) {
|
|
||||||
case 7:
|
|
||||||
DDRB |= (1 << 0);
|
|
||||||
PORTB &= ~(1 << 0);
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
DDRB |= (1 << 1);
|
|
||||||
PORTB &= ~(1 << 1);
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
DDRB |= (1 << 2);
|
|
||||||
PORTB &= ~(1 << 2);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
DDRB |= (1 << 3);
|
|
||||||
PORTB &= ~(1 << 3);
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
DDRD |= (1 << 2);
|
|
||||||
PORTD &= ~(1 << 2);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
DDRD |= (1 << 3);
|
|
||||||
PORTD &= ~(1 << 3);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
DDRC |= (1 << 6);
|
|
||||||
PORTC &= ~(1 << 6);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -19,20 +19,20 @@ BOOTLOADER = halfkay
|
|||||||
# Build Options
|
# Build Options
|
||||||
# comment out to disable the options.
|
# comment out to disable the options.
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ
|
CUSTOM_MATRIX = lite # Custom matrix file for the ErgoDox EZ
|
||||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
UNICODE_ENABLE = yes # Unicode
|
UNICODE_ENABLE = yes # Unicode
|
||||||
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
||||||
SLEEP_LED_ENABLE = no
|
SLEEP_LED_ENABLE = no
|
||||||
API_SYSEX_ENABLE = no
|
API_SYSEX_ENABLE = no
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
|
|
||||||
RGB_MATRIX_ENABLE = no # enable later
|
RGB_MATRIX_ENABLE = no # enable later
|
||||||
DEBOUNCE_TYPE = eager_pr
|
DEBOUNCE_TYPE = eager_pr
|
||||||
|
|
||||||
# project specific files
|
# project specific files
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2018 Fredric Silberberg (333fred)
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
it under the terms of the GNU General Public License as published by
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
the Free Software Foundation, either version 2 of the License, or
|
in the Software without restriction, including without limitation the rights
|
||||||
(at your option) any later version.
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
The above copyright notice and this permission notice shall be included in all
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
copies or substantial portions of the Software.
|
||||||
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
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Long tapping term on the big switch, because it takes so long to press
|
// Long tapping term on the big switch, because it takes so long to press
|
||||||
|
|||||||
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,
|
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,
|
||||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, 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_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_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_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
[2] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */
|
[2] = LAYOUT_60_iso_split_bs_rshift( /* Empty for dynamic keymaps */
|
||||||
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_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,
|
||||||
|
|||||||
@@ -1,3 +1 @@
|
|||||||
# Compile with this keymap to use VIA
|
# Compile with this keymap to use VIA
|
||||||
|
|
||||||
Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work.
|
|
||||||
@@ -1,3 +1 @@
|
|||||||
VIA_ENABLE = yes
|
VIA_ENABLE = yes
|
||||||
MOUSEKEY_ENABLE = no
|
|
||||||
EXTRAKEY_ENABLE = no
|
|
||||||
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
|
|||||||
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "333fred.h"
|
#include "333fred.h"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
#define EE_HANDS
|
||||||
|
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
|
#define OLED_DISPLAY_128X64
|
||||||
|
|
||||||
|
#define ENCODERS_PAD_A { F4 }
|
||||||
|
#define ENCODERS_PAD_B { F5 }
|
||||||
|
|
||||||
|
#undef SOFT_SERIAL_PIN
|
||||||
|
#define SOFT_SERIAL_PIN D2
|
||||||
|
|
||||||
|
#undef OLED_TIMEOUT
|
||||||
|
#define OLED_TIMEOUT 240000
|
||||||
@@ -0,0 +1,579 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "333fred.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[BASE] = LAYOUT_5x6_5(
|
||||||
|
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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
OSM(MOD_LSFT), CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), OSM(MOD_RSFT),
|
||||||
|
KC_F4, KC_LALT, KC_BSPC, TD(TD_SYM_VIM), KC_DEL, KC_UP, KC_ENT, KC_SPC, OSL(VIM), KC_EQL,
|
||||||
|
KC_LGUI, TD(TD_COPY_PASTE), KC_DOWN, OSM(MOD_RCTL)
|
||||||
|
),
|
||||||
|
|
||||||
|
[SYMB] = LAYOUT_5x6_5(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
|
_______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, _______, KC_7, KC_8, KC_9, _______, KC_F12,
|
||||||
|
_______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, _______, KC_4, KC_5, KC_6, _______, _______,
|
||||||
|
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, KC_1, KC_2, KC_3, _______, _______,
|
||||||
|
KC_F7, _______, _______, _______, _______, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, KC_ENT,
|
||||||
|
_______, _______, KC_VOLD, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[VIM] = LAYOUT_5x6_5(
|
||||||
|
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______,
|
||||||
|
_______, _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, DLEFT, DRIGHT, KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______,_______, _______, TG(GAME), _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[GAME] = LAYOUT_5x6_5(
|
||||||
|
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_T, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
|
||||||
|
KC_G, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
|
KC_B, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
KC_LOCK, KC_LALT, KC_SPC, KC_ENT, KC_GRV, TG(GAME), _______, _______, _______, KC_EQL,
|
||||||
|
KC_BSPC, KC_F5, KC_F6, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
uint32_t quote_timer;
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) { quote_timer = 0; }
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
tap_dance_process_keycode(keycode);
|
||||||
|
return !try_handle_macro(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void render_logo(void) {
|
||||||
|
static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00};
|
||||||
|
|
||||||
|
oled_write_P(qmk_logo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void render_led_status(void) {
|
||||||
|
led_t led_state = host_keyboard_led_state();
|
||||||
|
if (led_state.num_lock || led_state.caps_lock || led_state.scroll_lock) {
|
||||||
|
oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false);
|
||||||
|
oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false);
|
||||||
|
oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void render_mods_status(void) {
|
||||||
|
uint8_t mods = get_mods() | get_oneshot_mods();
|
||||||
|
bool ctrl = mods & MOD_MASK_CTRL;
|
||||||
|
bool shft = mods & MOD_MASK_SHIFT;
|
||||||
|
bool alt = mods & MOD_MASK_ALT;
|
||||||
|
bool gui = mods & MOD_MASK_GUI;
|
||||||
|
|
||||||
|
oled_write_P(ctrl ? PSTR("CTRL ") : PSTR(" "), false);
|
||||||
|
oled_write_P(shft ? PSTR("SHIFT ") : PSTR(" "), false);
|
||||||
|
oled_write_P(alt ? PSTR("ALT ") : PSTR(" "), false);
|
||||||
|
oled_write_ln_P(gui ? PSTR("GUI ") : PSTR(" "), false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MAX_LINES 8
|
||||||
|
|
||||||
|
void write_quote(const char* data, const uint8_t num_lines) {
|
||||||
|
uint8_t current_line = 0;
|
||||||
|
for (; current_line < (MAX_LINES - num_lines) / 2; current_line++) {
|
||||||
|
oled_advance_page(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
oled_write_ln_P(data, false);
|
||||||
|
|
||||||
|
for (current_line += num_lines; current_line < MAX_LINES; current_line++)
|
||||||
|
{
|
||||||
|
oled_advance_page(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
if (is_keyboard_master()) {
|
||||||
|
render_logo();
|
||||||
|
oled_advance_page(/* clearPageRemainder */ true);
|
||||||
|
oled_write_P(PSTR("Layer: "), false);
|
||||||
|
switch (get_highest_layer(layer_state)) {
|
||||||
|
case BASE:
|
||||||
|
oled_write_ln_P(PSTR("Base"), false);
|
||||||
|
break;
|
||||||
|
case SYMB:
|
||||||
|
oled_write_ln_P(PSTR("Symbols"), false);
|
||||||
|
break;
|
||||||
|
case VIM:
|
||||||
|
oled_write_ln_P(PSTR("Vim"), false);
|
||||||
|
break;
|
||||||
|
case GAME:
|
||||||
|
oled_write_ln_P(PSTR("Gaming"), false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
render_mods_status();
|
||||||
|
render_led_status();
|
||||||
|
} else {
|
||||||
|
if ((quote_timer != 0 && timer_elapsed32(quote_timer) < 300000 /* 5 minutes */) || !is_oled_on()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
srand(timer_read32());
|
||||||
|
int currentQuote = rand() % 63;
|
||||||
|
quote_timer = timer_read32();
|
||||||
|
|
||||||
|
// Max character count on my screen is 20 characters per line.
|
||||||
|
// Quotes are from various fantasy books, mostly either from
|
||||||
|
// The Stormlight Archive or from The Wheel of Time.
|
||||||
|
switch (currentQuote) {
|
||||||
|
case 0:
|
||||||
|
write_quote(PSTR(" Life before Death \n"
|
||||||
|
" Strength before \n"
|
||||||
|
" Weakness \n"
|
||||||
|
" Journey before \n"
|
||||||
|
" Destination"),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
write_quote(PSTR(" Honor is dead, but \n"
|
||||||
|
"I'll see what I can \n"
|
||||||
|
" do."),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
write_quote(PSTR(" You cannot have my \n"
|
||||||
|
" pain!"),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
write_quote(PSTR(" Pride doesn't win \n"
|
||||||
|
" battles"),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
write_quote(PSTR(" I have practice \n"
|
||||||
|
" following fools in \n"
|
||||||
|
" their reckless \n"
|
||||||
|
" pursuits."),
|
||||||
|
4);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
write_quote(PSTR(" What is the most \n"
|
||||||
|
" important step a \n"
|
||||||
|
" man can take?"),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
write_quote(PSTR(" It's the next one. \n"
|
||||||
|
" Always the next \n"
|
||||||
|
" step, Dalinar."),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
write_quote(PSTR(" NO MATING."), 1);
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
write_quote(PSTR(" Inappropriate? \n"
|
||||||
|
"Such as... dividing \n"
|
||||||
|
" by zero?"),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
write_quote(PSTR(" I am a stick!"), 1);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
write_quote(PSTR(" But you could be \n"
|
||||||
|
" fire!"),
|
||||||
|
1);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
write_quote(PSTR(" Sometimes a \n"
|
||||||
|
" hyprocrite is \n"
|
||||||
|
" nothing more than \n"
|
||||||
|
" than a man in the \n"
|
||||||
|
"process of changing"),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
write_quote(PSTR(" You surrender when \n"
|
||||||
|
" you are dead. Many \n"
|
||||||
|
"a man has been given\n"
|
||||||
|
" less."),
|
||||||
|
4);
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
write_quote(PSTR(" Kneel and swear to \n"
|
||||||
|
" the Lord Dragon,...\n"
|
||||||
|
" or you will be \n"
|
||||||
|
" knelt."),
|
||||||
|
4);
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
write_quote(PSTR("I'm right, anyway. I\n"
|
||||||
|
"wish I wasn't, but I\n"
|
||||||
|
" am. I bloody am."),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 15:
|
||||||
|
write_quote(PSTR(" Death rides on my \n"
|
||||||
|
" shoulder,. Death \n"
|
||||||
|
" walks in my \n"
|
||||||
|
" footsteps. I am \n"
|
||||||
|
" death."),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
write_quote(PSTR(" The Golden Crane \n"
|
||||||
|
" flies for Tarmon \n"
|
||||||
|
" Gai'don"),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
write_quote(PSTR("You humans are very \n"
|
||||||
|
" excitable"),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 18:
|
||||||
|
write_quote(PSTR(" Phaw!"), 1);
|
||||||
|
break;
|
||||||
|
case 19:
|
||||||
|
write_quote(PSTR("I may be a fool, but\n"
|
||||||
|
" I intend to be a \n"
|
||||||
|
" live fool."),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 20:
|
||||||
|
write_quote(PSTR(" Anyone who claimed \n"
|
||||||
|
" that old age had \n"
|
||||||
|
" brought them \n"
|
||||||
|
"patience was either \n"
|
||||||
|
" lying or senile."),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 21:
|
||||||
|
write_quote(PSTR("Death is light as a \n"
|
||||||
|
"feather; duty, heavy\n"
|
||||||
|
" as a mountain"),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 22:
|
||||||
|
write_quote(PSTR("Dovie'andi se tovya \n"
|
||||||
|
" sagain."),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 23:
|
||||||
|
write_quote(PSTR(" Carai an Caldazar! \n"
|
||||||
|
"Carai an Ellisande! \n"
|
||||||
|
" Al Ellisande!"),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
write_quote(PSTR(" Mia dovienya \n"
|
||||||
|
" nesodhin soende."),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
write_quote(PSTR(" The Wheel of Time \n"
|
||||||
|
"turns, and Ages come\n"
|
||||||
|
" and pass, leaving \n"
|
||||||
|
"memories that become\n"
|
||||||
|
" legend."),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 26:
|
||||||
|
write_quote(PSTR(" Legend fades to \n"
|
||||||
|
"myth, and even myth \n"
|
||||||
|
" is long forgotten \n"
|
||||||
|
" when the Age that \n"
|
||||||
|
"gave it birth comes \n"
|
||||||
|
" again."),
|
||||||
|
6);
|
||||||
|
break;
|
||||||
|
case 27:
|
||||||
|
write_quote(PSTR(" What is too absurd \n"
|
||||||
|
" to believe is \n"
|
||||||
|
"believed because it \n"
|
||||||
|
"is too absurd to be \n"
|
||||||
|
" a lie."),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 28:
|
||||||
|
write_quote(PSTR("And you gave me the \n"
|
||||||
|
" way out! Chew on \n"
|
||||||
|
"that bitterness for \n"
|
||||||
|
"lunch, you flaming, \n"
|
||||||
|
"burning, misbegotten\n"
|
||||||
|
" liars!"),
|
||||||
|
6);
|
||||||
|
break;
|
||||||
|
case 29:
|
||||||
|
write_quote(PSTR(" He was going to \n"
|
||||||
|
"start having, 'I am \n"
|
||||||
|
"not a bloody Lord', \n"
|
||||||
|
" embroidered on his \n"
|
||||||
|
" coats."),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
write_quote(PSTR("All was not lost, of\n"
|
||||||
|
" course. All was \n"
|
||||||
|
" never lost as long \n"
|
||||||
|
" as you were alive."),
|
||||||
|
4);
|
||||||
|
break;
|
||||||
|
case 31:
|
||||||
|
write_quote(PSTR(" Everything is just \n"
|
||||||
|
" bloody fine!"),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
write_quote(PSTR("The wheel weaves as \n"
|
||||||
|
" the wheel wills"),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 33:
|
||||||
|
write_quote(PSTR(" Time to toss the \n"
|
||||||
|
" dice"),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 34:
|
||||||
|
write_quote(PSTR("Always plan for the \n"
|
||||||
|
" worst, child, that \n"
|
||||||
|
" way all your \n"
|
||||||
|
" surprises are \n"
|
||||||
|
" pleasant ones."),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 35:
|
||||||
|
write_quote(PSTR("'Pessimism, she is a\n"
|
||||||
|
" fond friend of \n"
|
||||||
|
"yours, yes?' 'That's\n"
|
||||||
|
" uncalled for. I \n"
|
||||||
|
" barely know her. \n"
|
||||||
|
"Mere acquaintances, \n"
|
||||||
|
" at best.'"),
|
||||||
|
7);
|
||||||
|
break;
|
||||||
|
case 36:
|
||||||
|
write_quote(PSTR(" Do not trouble \n"
|
||||||
|
"trouble till trouble\n"
|
||||||
|
" troubles you."),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 37:
|
||||||
|
write_quote(PSTR("If your enemy offers\n"
|
||||||
|
" you two targets, \n"
|
||||||
|
" strike at a third."),
|
||||||
|
3);
|
||||||
|
break;
|
||||||
|
case 38:
|
||||||
|
write_quote(PSTR("The wind was not the\n"
|
||||||
|
"beginning. There are\n"
|
||||||
|
" neither beginnings \n"
|
||||||
|
" nor endings to the \n"
|
||||||
|
" turning of the \n"
|
||||||
|
" Wheel of Time. But \n"
|
||||||
|
" it was _a_ \n"
|
||||||
|
" beginning."),
|
||||||
|
8);
|
||||||
|
break;
|
||||||
|
case 39:
|
||||||
|
write_quote(PSTR("Bloody flaming ashes"), 1);
|
||||||
|
break;
|
||||||
|
case 40:
|
||||||
|
write_quote(PSTR("Then follow Lord Mat\n"
|
||||||
|
" whenever he calls \n"
|
||||||
|
"To dance with Jak O'\n"
|
||||||
|
" the Shadows."),
|
||||||
|
4);
|
||||||
|
break;
|
||||||
|
case 41:
|
||||||
|
write_quote(PSTR(" There are no \n"
|
||||||
|
" endings, and never \n"
|
||||||
|
"will be endings, to \n"
|
||||||
|
" the turning of the \n"
|
||||||
|
" Wheel of Time. But \n"
|
||||||
|
" it was an ending."),
|
||||||
|
6);
|
||||||
|
break;
|
||||||
|
case 42:
|
||||||
|
write_quote(PSTR(" TAI'SHAR MALKIER!"), 1);
|
||||||
|
break;
|
||||||
|
case 43:
|
||||||
|
write_quote(PSTR("I would not mind you\n"
|
||||||
|
" in my head, if you \n"
|
||||||
|
"were not so clearly \n"
|
||||||
|
" mad."),
|
||||||
|
4);
|
||||||
|
break;
|
||||||
|
case 44:
|
||||||
|
write_quote(PSTR(" ILYENA, MY LOVE, \n"
|
||||||
|
" FORGIVE ME!"),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 45:
|
||||||
|
write_quote(PSTR(" Oh, Light. That's \n"
|
||||||
|
"impossible! We can't\n"
|
||||||
|
" use it! Cast it \n"
|
||||||
|
"away! That is death \n"
|
||||||
|
" we hold, death and \n"
|
||||||
|
"betrayal. It is HIM."),
|
||||||
|
6);
|
||||||
|
break;
|
||||||
|
case 46:
|
||||||
|
write_quote(PSTR("Nothing ever goes as\n"
|
||||||
|
" you expect. Expect \n"
|
||||||
|
" nothing, and you \n"
|
||||||
|
" will not be \n"
|
||||||
|
" surprised. Expect \n"
|
||||||
|
" nothing. Hope for \n"
|
||||||
|
" nothing. Nothing."),
|
||||||
|
7);
|
||||||
|
break;
|
||||||
|
case 47:
|
||||||
|
write_quote(PSTR(" Distant Weeping"), 1);
|
||||||
|
break;
|
||||||
|
case 48:
|
||||||
|
write_quote(PSTR("Are you real? Am I?"), 1);
|
||||||
|
break;
|
||||||
|
case 49:
|
||||||
|
write_quote(PSTR(" I'm just an old \n"
|
||||||
|
"gleeman, who could I\n"
|
||||||
|
" possibly be \n"
|
||||||
|
" dangerous to?"),
|
||||||
|
4);
|
||||||
|
break;
|
||||||
|
case 50:
|
||||||
|
write_quote(PSTR(" Mat bloody Cauthon \n"
|
||||||
|
" is no bloody hero!"),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 51:
|
||||||
|
write_quote(PSTR("You are a coward and\n"
|
||||||
|
" a tyrant. I'd name \n"
|
||||||
|
" you Darkfriend as \n"
|
||||||
|
"well, but I suspect \n"
|
||||||
|
" that the Dark One \n"
|
||||||
|
" would perhaps be \n"
|
||||||
|
" embarrassed to \n"
|
||||||
|
"associate with you."),
|
||||||
|
8);
|
||||||
|
break;
|
||||||
|
case 52:
|
||||||
|
write_quote(PSTR(" I win again, Lews \n"
|
||||||
|
" Therin."),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 53:
|
||||||
|
write_quote(PSTR("May you always find \n"
|
||||||
|
" water and shade."),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 54:
|
||||||
|
write_quote(PSTR(" I will never serve \n"
|
||||||
|
"you, Father of Lies.\n"
|
||||||
|
"In a thousand lives,\n"
|
||||||
|
"I never have. I know\n"
|
||||||
|
" that. I'm sure of \n"
|
||||||
|
"it. Come. It is time\n"
|
||||||
|
" to die."),
|
||||||
|
7);
|
||||||
|
break;
|
||||||
|
case 55:
|
||||||
|
write_quote(PSTR(" There may be more \n"
|
||||||
|
"than one way to skin\n"
|
||||||
|
" a cat, but the cat \n"
|
||||||
|
"isn't going to like \n"
|
||||||
|
" any of them."),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 56:
|
||||||
|
write_quote(PSTR("Please see that they\n"
|
||||||
|
" know, although the \n"
|
||||||
|
"word Black may brand\n"
|
||||||
|
"my name forever, my \n"
|
||||||
|
"soul is Brown. Tell \n"
|
||||||
|
" them..."),
|
||||||
|
6);
|
||||||
|
break;
|
||||||
|
case 57:
|
||||||
|
write_quote(PSTR(" 'Your soul is of a \n"
|
||||||
|
"pure white, Verin,' \n"
|
||||||
|
"Egwene said softly. \n"
|
||||||
|
" 'Like the Light \n"
|
||||||
|
" itself.'"),
|
||||||
|
5);
|
||||||
|
break;
|
||||||
|
case 58:
|
||||||
|
write_quote(PSTR(" Asha'man, Kill!"), 1);
|
||||||
|
break;
|
||||||
|
case 59:
|
||||||
|
write_quote(PSTR(" Let the lord of \n"
|
||||||
|
" chaos rule."),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 60:
|
||||||
|
write_quote(PSTR(" There's always \n"
|
||||||
|
" another secret."),
|
||||||
|
2);
|
||||||
|
break;
|
||||||
|
case 61:
|
||||||
|
write_quote(PSTR(" You see the great \n"
|
||||||
|
"thing about madness \n"
|
||||||
|
"is that it's all in \n"
|
||||||
|
" your head."),
|
||||||
|
4);
|
||||||
|
break;
|
||||||
|
case 62:
|
||||||
|
write_quote(PSTR(" In one Age, called \n"
|
||||||
|
" the Third Age by \n"
|
||||||
|
"some, an Age yet to \n"
|
||||||
|
" come, an Age long \n"
|
||||||
|
" past, a wind rose \n"
|
||||||
|
" above..."),
|
||||||
|
6);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
// On the left, control the volume. On the right, scroll the page
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_WH_U);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_WH_D);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
KEY_LOCK_ENABLE = yes
|
||||||
|
CONSOLE_ENABLE = no
|
||||||
|
OLED_DRIVER_ENABLE = yes
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
@@ -0,0 +1,452 @@
|
|||||||
|
/* Copyright 2020 Sergey Vlasov <[email protected]>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
enum tap_dances {
|
||||||
|
TD_OLED,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum oled_test_modes {
|
||||||
|
// Modes between TEST_FIRST and TEST_LAST (inclusive) can be switched with a keypress.
|
||||||
|
TEST_FIRST,
|
||||||
|
TEST_LOGO = TEST_FIRST,
|
||||||
|
TEST_CHARACTERS,
|
||||||
|
TEST_SLOW_UPDATE,
|
||||||
|
TEST_ALL_ON,
|
||||||
|
TEST_FRAME,
|
||||||
|
TEST_ALL_OFF,
|
||||||
|
TEST_FILL_HORZ_0,
|
||||||
|
TEST_FILL_HORZ_1,
|
||||||
|
TEST_FILL_VERT_0,
|
||||||
|
TEST_FILL_VERT_1,
|
||||||
|
TEST_FILL_CHECKERBOARD_1,
|
||||||
|
TEST_FILL_CHECKERBOARD_2,
|
||||||
|
TEST_FILL_CHECKERBOARD_4,
|
||||||
|
TEST_LAST = TEST_FILL_CHECKERBOARD_4,
|
||||||
|
|
||||||
|
// Special modes which are not reachable normally.
|
||||||
|
TEST_DRAW_ALWAYS_ON,
|
||||||
|
TEST_DRAW_ALWAYS_OFF,
|
||||||
|
};
|
||||||
|
|
||||||
|
static enum oled_test_modes test_mode = TEST_FIRST;
|
||||||
|
|
||||||
|
static oled_rotation_t rotation = OLED_ROTATION_0;
|
||||||
|
|
||||||
|
static bool scrolling;
|
||||||
|
static uint8_t scrolling_speed;
|
||||||
|
static bool need_update = true;
|
||||||
|
static bool draw_always;
|
||||||
|
static bool update_speed_test;
|
||||||
|
static uint32_t update_speed_start_timer;
|
||||||
|
static uint16_t update_speed_count;
|
||||||
|
static bool restart_test;
|
||||||
|
|
||||||
|
static void stop_scrolling(void) {
|
||||||
|
if (scrolling) {
|
||||||
|
oled_scroll_off();
|
||||||
|
scrolling = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dance_oled_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
switch (state->count) {
|
||||||
|
case 1:
|
||||||
|
if (state->pressed) {
|
||||||
|
// single hold - step through rotations
|
||||||
|
switch (rotation) {
|
||||||
|
case OLED_ROTATION_0:
|
||||||
|
rotation = OLED_ROTATION_90;
|
||||||
|
break;
|
||||||
|
case OLED_ROTATION_90:
|
||||||
|
rotation = OLED_ROTATION_180;
|
||||||
|
break;
|
||||||
|
case OLED_ROTATION_180:
|
||||||
|
rotation = OLED_ROTATION_270;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
rotation = OLED_ROTATION_0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
stop_scrolling();
|
||||||
|
oled_init(rotation);
|
||||||
|
} else {
|
||||||
|
// single tap - step through test modes
|
||||||
|
if (test_mode < TEST_LAST) {
|
||||||
|
++test_mode;
|
||||||
|
} else {
|
||||||
|
test_mode = TEST_FIRST;
|
||||||
|
}
|
||||||
|
stop_scrolling();
|
||||||
|
oled_clear();
|
||||||
|
}
|
||||||
|
restart_test = true;
|
||||||
|
need_update = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
if (state->pressed) {
|
||||||
|
// tap + hold - change scrolling speed
|
||||||
|
scrolling_speed = (scrolling_speed + 1) % 8;
|
||||||
|
stop_scrolling();
|
||||||
|
oled_scroll_set_speed(scrolling_speed);
|
||||||
|
// Cannot reactivate scrolling here, because oled_scroll_off()
|
||||||
|
// marks the whole display as dirty, and oled_scroll_left()
|
||||||
|
// silently does nothing if either the display is dirty or
|
||||||
|
// scrolling is already active.
|
||||||
|
} else {
|
||||||
|
// double tap - toggle scrolling
|
||||||
|
if (!scrolling) {
|
||||||
|
scrolling = true;
|
||||||
|
oled_scroll_left();
|
||||||
|
} else {
|
||||||
|
scrolling = false;
|
||||||
|
oled_scroll_off();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
need_update = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
if (state->pressed) {
|
||||||
|
// double tap + hold - toggle `draw_always`
|
||||||
|
draw_always = !draw_always;
|
||||||
|
if (draw_always) {
|
||||||
|
test_mode = TEST_DRAW_ALWAYS_ON;
|
||||||
|
} else {
|
||||||
|
test_mode = TEST_DRAW_ALWAYS_OFF;
|
||||||
|
}
|
||||||
|
stop_scrolling();
|
||||||
|
oled_clear();
|
||||||
|
restart_test = true;
|
||||||
|
need_update = true;
|
||||||
|
} else {
|
||||||
|
// triple tap - toggle update speed test
|
||||||
|
update_speed_test = !update_speed_test;
|
||||||
|
if (update_speed_test) {
|
||||||
|
stop_scrolling();
|
||||||
|
update_speed_start_timer = timer_read32();
|
||||||
|
update_speed_count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {[TD_OLED] = ACTION_TAP_DANCE_FN(dance_oled_finished)};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(TD(TD_OLED))};
|
||||||
|
|
||||||
|
// `bool oled_is_dirty(void)` does not exist at the moment
|
||||||
|
extern OLED_BLOCK_TYPE oled_dirty;
|
||||||
|
|
||||||
|
static inline uint8_t pixel_width(void) {
|
||||||
|
if (!(rotation & OLED_ROTATION_90)) {
|
||||||
|
return OLED_DISPLAY_WIDTH;
|
||||||
|
}
|
||||||
|
return OLED_DISPLAY_HEIGHT;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline uint8_t pixel_height(void) {
|
||||||
|
if (!(rotation & OLED_ROTATION_90)) {
|
||||||
|
return OLED_DISPLAY_HEIGHT;
|
||||||
|
}
|
||||||
|
return OLED_DISPLAY_WIDTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw the QMK logo at the top left corner, clipping if it does not fit.
|
||||||
|
static void test_logo(void) {
|
||||||
|
uint8_t lines = oled_max_lines();
|
||||||
|
if (lines > 3) {
|
||||||
|
lines = 3;
|
||||||
|
}
|
||||||
|
uint8_t chars = oled_max_chars();
|
||||||
|
if (chars > 21) {
|
||||||
|
chars = 21;
|
||||||
|
}
|
||||||
|
for (uint8_t row = 0; row < lines; ++row) {
|
||||||
|
oled_set_cursor(0, row);
|
||||||
|
for (uint8_t col = 0; col < chars; ++col) {
|
||||||
|
oled_write_char(0x80 + 0x20 * row + col, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static const PROGMEM char fill_ff[OLED_MATRIX_SIZE] = {[0 ... OLED_MATRIX_SIZE - 1] = 0xff};
|
||||||
|
|
||||||
|
// Fill the whole screen with a pattern made from two bytes alternating after the specified number of repeats.
|
||||||
|
static void test_fill(uint8_t byte0, uint8_t byte1, uint8_t repeats) {
|
||||||
|
uint8_t width = pixel_width();
|
||||||
|
uint8_t lines = oled_max_lines();
|
||||||
|
uint16_t index = 0;
|
||||||
|
for (uint8_t row = 0; row < lines; ++row) {
|
||||||
|
for (uint8_t col = 0; col < width; ++col) {
|
||||||
|
uint8_t byte = ((col / repeats) % 2) ? byte1 : byte0;
|
||||||
|
oled_write_raw_byte(byte, index++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Draw a frame at the edges of the OLED screen.
|
||||||
|
static void test_frame(void) {
|
||||||
|
uint8_t width = pixel_width();
|
||||||
|
uint8_t height = pixel_height();
|
||||||
|
for (uint8_t x = 0; x < width; ++x) {
|
||||||
|
oled_write_pixel(x, 0, true);
|
||||||
|
oled_write_pixel(x, height - 1, true);
|
||||||
|
}
|
||||||
|
for (uint8_t y = 1; y < height - 1; ++y) {
|
||||||
|
oled_write_pixel(0, y, true);
|
||||||
|
oled_write_pixel(width - 1, y, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use all 94 visible ASCII characters for testing.
|
||||||
|
#define TEST_CHAR_COUNT ('~' - '!' + 1)
|
||||||
|
|
||||||
|
static char get_test_char(uint8_t char_index) { return char_index + '!'; }
|
||||||
|
|
||||||
|
// Fill the whole screen with distinct characters (if the display is large enough to show more than 94 characters
|
||||||
|
// at once, the sequence is repeated the second time with inverted characters).
|
||||||
|
static void test_characters(void) {
|
||||||
|
uint8_t cols = oled_max_chars();
|
||||||
|
uint8_t rows = oled_max_lines();
|
||||||
|
bool invert = false;
|
||||||
|
uint8_t char_index = 0;
|
||||||
|
for (uint8_t row = 0; row < rows; ++row) {
|
||||||
|
for (uint8_t col = 0; col < cols; ++col) {
|
||||||
|
oled_write_char(get_test_char(char_index), invert);
|
||||||
|
if (++char_index >= TEST_CHAR_COUNT) {
|
||||||
|
char_index = 0;
|
||||||
|
invert = !invert;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Test screen updating after drawing a single character or pixel.
|
||||||
|
void test_slow_update(void) {
|
||||||
|
static uint8_t phase, x, y, char_index, first_char;
|
||||||
|
static uint16_t timer;
|
||||||
|
static uint16_t delay = 500;
|
||||||
|
|
||||||
|
if (restart_test) {
|
||||||
|
// Initialize all state variables before starting the test.
|
||||||
|
restart_test = false;
|
||||||
|
phase = 0;
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
char_index = 0;
|
||||||
|
first_char = 0;
|
||||||
|
delay = 500;
|
||||||
|
} else {
|
||||||
|
// Wait for the specified time between steps.
|
||||||
|
if (timer_elapsed(timer) < delay) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
timer = timer_read();
|
||||||
|
switch (phase) {
|
||||||
|
case 0:
|
||||||
|
// Phase 0: fill the whole screen with mostly distinct characters, one character at a time. Here the
|
||||||
|
// inversion trick is not used, so that the frame which is drawn in subsequent phases would not be
|
||||||
|
// overlapped by the inverted character background.
|
||||||
|
oled_set_cursor(x, y);
|
||||||
|
oled_write_char(get_test_char(char_index), false);
|
||||||
|
if (++char_index >= TEST_CHAR_COUNT) {
|
||||||
|
char_index = 0;
|
||||||
|
}
|
||||||
|
if (++x >= oled_max_chars()) {
|
||||||
|
x = 0;
|
||||||
|
if (++y >= oled_max_lines()) {
|
||||||
|
// The whole screen was filled - start the next phase.
|
||||||
|
++phase;
|
||||||
|
x = y = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delay = 250;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
// Phase 1: draw a line along the left edge of the screen, one pixel at a time.
|
||||||
|
oled_write_pixel(x, y, true);
|
||||||
|
if (y < pixel_height() - 1) {
|
||||||
|
++y;
|
||||||
|
} else {
|
||||||
|
// The bottom left corner is reached - start the next phase.
|
||||||
|
++phase;
|
||||||
|
++x;
|
||||||
|
}
|
||||||
|
delay = 50;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
// Phase 2: draw a line along the bottom edge of the screen, one pixel at a time.
|
||||||
|
oled_write_pixel(x, y, true);
|
||||||
|
if (x < pixel_width() - 1) {
|
||||||
|
++x;
|
||||||
|
} else {
|
||||||
|
// The bottom right corner was reached - start the next phase.
|
||||||
|
++phase;
|
||||||
|
--y;
|
||||||
|
}
|
||||||
|
delay = 50;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
// Phase 3: draw a line along the right edge of the screen, one pixel at a time.
|
||||||
|
oled_write_pixel(x, y, true);
|
||||||
|
if (y > 0) {
|
||||||
|
--y;
|
||||||
|
} else {
|
||||||
|
// The top right corner was reached - start the next phase.
|
||||||
|
++phase;
|
||||||
|
--x;
|
||||||
|
}
|
||||||
|
delay = 50;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4:
|
||||||
|
// Phase 4: draw a line along the top edge of the screen, one pixel at a time.
|
||||||
|
oled_write_pixel(x, y, true);
|
||||||
|
if (x > 0) {
|
||||||
|
--x;
|
||||||
|
} else {
|
||||||
|
// The top left corner was reached - start the next phase.
|
||||||
|
++phase;
|
||||||
|
}
|
||||||
|
delay = 50;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// Restart from phase 0, but change the first character of the sequence to make screen updates visible.
|
||||||
|
if (++first_char >= TEST_CHAR_COUNT) {
|
||||||
|
first_char = 0;
|
||||||
|
}
|
||||||
|
phase = 0;
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
char_index = first_char;
|
||||||
|
delay = 500;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
|
oled_scroll_set_area(0, 0);
|
||||||
|
oled_scroll_set_speed(scrolling_speed);
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
void oled_task_user(void) {
|
||||||
|
if (update_speed_test) {
|
||||||
|
// Speed test mode - wait for screen update completion.
|
||||||
|
if (!oled_dirty) {
|
||||||
|
// Update statistics and send the measurement result to the console.
|
||||||
|
update_speed_count++;
|
||||||
|
if (update_speed_count % 256 == 0) {
|
||||||
|
uprintf("OLED: %u updates, %lu ms\n", update_speed_count, timer_elapsed32(update_speed_start_timer));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggle between the "all on" and "all off" states and trigger the screen update again.
|
||||||
|
if (test_mode == TEST_ALL_ON) {
|
||||||
|
test_mode = TEST_ALL_OFF;
|
||||||
|
} else {
|
||||||
|
test_mode = TEST_ALL_ON;
|
||||||
|
}
|
||||||
|
need_update = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// The sample implementation of oled_task_user() in the documentation redraws the image after every call, relying on
|
||||||
|
// the fact that drawing functions check whether the output actually changes anything in the image, and set dirty
|
||||||
|
// bits only when something has actually changed. However, redrawing the image only when some of the underlying
|
||||||
|
// data has changed is more efficient. Make it possible to test both modes here.
|
||||||
|
if (!draw_always || update_speed_test) {
|
||||||
|
// Draw the image only when the `need_update` flag is set, except for the "slow update" test.
|
||||||
|
// This mode is also forced when the screen update speed test is performed.
|
||||||
|
if (!need_update) {
|
||||||
|
if (test_mode != TEST_SLOW_UPDATE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
need_update = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (test_mode) {
|
||||||
|
case TEST_LOGO:
|
||||||
|
test_logo();
|
||||||
|
break;
|
||||||
|
case TEST_CHARACTERS:
|
||||||
|
test_characters();
|
||||||
|
break;
|
||||||
|
case TEST_SLOW_UPDATE:
|
||||||
|
test_slow_update();
|
||||||
|
break;
|
||||||
|
case TEST_ALL_ON:
|
||||||
|
oled_write_raw_P(fill_ff, sizeof(fill_ff));
|
||||||
|
break;
|
||||||
|
case TEST_FRAME:
|
||||||
|
test_frame();
|
||||||
|
break;
|
||||||
|
case TEST_ALL_OFF:
|
||||||
|
// `oled_clear()` is faster, but cannot be used with `draw_always`, because it does not check the previous
|
||||||
|
// content of the buffer and always marks the whole buffer as dirty.
|
||||||
|
if (update_speed_test) {
|
||||||
|
oled_clear();
|
||||||
|
} else {
|
||||||
|
test_fill(0x00, 0x00, 1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TEST_FILL_HORZ_0:
|
||||||
|
test_fill(0x55, 0x55, 1);
|
||||||
|
break;
|
||||||
|
case TEST_FILL_HORZ_1:
|
||||||
|
test_fill(0xaa, 0xaa, 1);
|
||||||
|
break;
|
||||||
|
case TEST_FILL_VERT_0:
|
||||||
|
test_fill(0xff, 0x00, 1);
|
||||||
|
break;
|
||||||
|
case TEST_FILL_VERT_1:
|
||||||
|
test_fill(0x00, 0xff, 1);
|
||||||
|
break;
|
||||||
|
case TEST_FILL_CHECKERBOARD_1:
|
||||||
|
test_fill(0x55, 0xaa, 1);
|
||||||
|
break;
|
||||||
|
case TEST_FILL_CHECKERBOARD_2:
|
||||||
|
test_fill(0x33, 0xcc, 2);
|
||||||
|
break;
|
||||||
|
case TEST_FILL_CHECKERBOARD_4:
|
||||||
|
test_fill(0x0f, 0xf0, 4);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case TEST_DRAW_ALWAYS_ON:
|
||||||
|
oled_write_P(PSTR("Draw Always"), false);
|
||||||
|
break;
|
||||||
|
case TEST_DRAW_ALWAYS_OFF:
|
||||||
|
oled_write_P(PSTR("Draw Once"), false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Console messages are used for update speed test results
|
||||||
|
debug_enable = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# OLED tester
|
||||||
|
|
||||||
|
Available commands using a single key:
|
||||||
|
- Single tap: Switch to the next test pattern.
|
||||||
|
- Single hold: Switch to the next orientation (note that 90° and 270° orientations may not work correctly with some displays).
|
||||||
|
- Double tap: Toggle horizontal scrolling of the top row. Note that this scrolling is implemented by the controller and has major limitations: it works only with SSD1306-based displays, blocks all display updates, may not work correctly if the display width is less than 128 pixels, and does not handle 90°/270° rotation properly.
|
||||||
|
- Tap and hold: Change scrolling speed (because of controller limitations, scrolling needs to be started again manually using a double tap).
|
||||||
|
- Triple tap: Start or stop the update speed test. This test repeatedly fills the display with all-on and all-off pixels, measures the time required for updating the display, and prints the measured values to the HID console every 256th refresh.
|
||||||
|
- Double tap and hold: Switch between the “draw once” (default) and “draw always” modes. The “draw always” mode means that `oled_task_user()` redraws the whole picture completely every time it is called; the example code in the OLED feature documentation is written in this style. Testing the “draw always” mode can uncover bugs in the implementation of drawing functions (they must not set the dirty mark if the buffer content is not actually changed).
|
||||||
|
|
||||||
|
Available test patterns:
|
||||||
|
- QMK logo (clipped to fit on the display).
|
||||||
|
- Fill the whole screen with as much unique characters as possible (all 94 printable ASCII characters are used, and if the display has more character positions available, the same characters are printed again, but inverted).
|
||||||
|
- “Slow update” test — instead of updating the whole screen at once, draw things piece by piece to uncover display update bugs. The drawing sequence used by this test:
|
||||||
|
- Fill the whole screen with printable ASCII characters (similar to the previous test, but characters are drawn one by one with 250 ms intervals between them, and inverted characters are not used to avoid obscuring the next phases).
|
||||||
|
- Draw a frame along the screen edges, starting from the top left corner and going down along the left edge, then along the bottom, right and top edges, with 50 ms delay after every pixel.
|
||||||
|
- Repeat the same sequence again, but with the character sequence shifted by 1 character (so that the updates would be visible).
|
||||||
|
- All pixels on.
|
||||||
|
- Pixels at the edges of the screen on.
|
||||||
|
- All pixels off.
|
||||||
|
- Horizontal on/off 1px lines (two variants - starting from on or off state).
|
||||||
|
- Vertical on/off 1px lines (two variants - starting from on or off state).
|
||||||
|
- Checkerboard pattern (three variants - 1×1, 2×2, 4×4 pixels).
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
OLED_DRIVER_ENABLE = yes
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/* Copyright 2020 Daniel Reibl <[email protected]>
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX
|
||||||
@@ -286,7 +286,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
* | | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
* | | | | | | | NKRO | Swap |Un swp| | | |
|
* | | | | | | | NKRO | Swap |Un swp|UC Mod| | |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | | | | | | | | | | | |
|
* | | | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
@@ -295,7 +295,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL,
|
_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL,
|
||||||
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
|
_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, NK_TOGG, LCG_SWP, LCG_NRM, UC_MOD, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ Adjust (Lower + Raise)
|
|||||||
|------+------+------+------+------+-------------+------+------+------+------+------|
|
|------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
| | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
| | |Mu mod|Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
|
||||||
|------+------+------+------+------+------|------+------+------+------+------+------|
|
|------+------+------+------+------+------|------+------+------+------+------+------|
|
||||||
| | | | | | | NKRO | Swap |Un swp| | | |
|
| | | | | | | NKRO | Swap |Un swp|UC Mod| | |
|
||||||
|------+------+------+------+------+------+------+------+------+------+------+------|
|
|------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
| | | | | | | | | | | |
|
| | | | | | | | | | | |
|
||||||
`-----------------------------------------------------------------------------------'
|
`-----------------------------------------------------------------------------------'
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
/* Copyright 2020 Joel Schneider
|
||||||
|
*
|
||||||
|
* 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 0xDA20
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER FedorSosnin
|
||||||
|
#define PRODUCT SiCK-PAD
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 4
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
|
||||||
|
#define MATRIX_COL_PINS { B9, B15, B14, B13 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* 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,34 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "sick_pad",
|
||||||
|
"url": "https://www.thingiverse.com/thing:3682168",
|
||||||
|
"maintainer": "jmschneider",
|
||||||
|
"width": 4,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_numpad_5x4": {
|
||||||
|
"layout": [
|
||||||
|
{"x":0, "y":0},
|
||||||
|
{"x":1, "y":0},
|
||||||
|
{"x":2, "y":0},
|
||||||
|
{"x":3, "y":0},
|
||||||
|
|
||||||
|
{"x":0, "y":1},
|
||||||
|
{"x":1, "y":1},
|
||||||
|
{"x":2, "y":1},
|
||||||
|
|
||||||
|
{"x":0, "y":2},
|
||||||
|
{"x":1, "y":2},
|
||||||
|
{"x":2, "y":2},
|
||||||
|
{"x":3, "y":1, "h":2},
|
||||||
|
|
||||||
|
{"x":0, "y":3},
|
||||||
|
{"x":1, "y":3},
|
||||||
|
{"x":2, "y":3},
|
||||||
|
|
||||||
|
{"x":0, "y":4, "w":2},
|
||||||
|
{"x":2, "y":4},
|
||||||
|
{"x":3, "y":3, "h":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/* Copyright 2020 Joel Schneider
|
||||||
|
*
|
||||||
|
* 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_5x4(
|
||||||
|
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||||
|
KC_P7, KC_P8, KC_P9,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_P1, KC_P2, KC_P3,
|
||||||
|
KC_P0, KC_PDOT, KC_PENT
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# SiCK-PAD
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The SiCK-PAD is a custom 3D printed mechanical numpad built from scratch without the price tag often associated with one.
|
||||||
|
|
||||||
|
- Keyboard Maintainer: [jmschneider](https://github.com/jmschneider)
|
||||||
|
- Hardware Supported: QMK Proton C
|
||||||
|
- Hardware Availability: [files to print and documentation](https://www.thingiverse.com/thing:3682168)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/sick_pad: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).
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = STM32F303
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
LAYOUTS = numpad_5x4
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/* Copyright 2020 Joel Schneider
|
||||||
|
*
|
||||||
|
* 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 "sick_pad.h"
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/* Copyright 2020 Joel Schneider
|
||||||
|
*
|
||||||
|
* 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 "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_numpad_5x4( \
|
||||||
|
K00, K01, K02, K03, \
|
||||||
|
K10, K11, K12, \
|
||||||
|
K20, K21, K22, K23, \
|
||||||
|
K30, K31, K32, \
|
||||||
|
K41, K42, K43 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03 }, \
|
||||||
|
{ K10, K11, K12, KC_NO }, \
|
||||||
|
{ K20, K21, K22, K23 }, \
|
||||||
|
{ K30, K31, K32, KC_NO }, \
|
||||||
|
{ KC_NO, K41, K42, K43 } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Swiftrax <swiftrax@gmail.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/>.
|
||||||
|
*/
|
||||||
|
#include "astro65.h"
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Swiftrax <swiftrax@gmail.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 "quantum.h"
|
||||||
|
|
||||||
|
// readability
|
||||||
|
#define XXXX KC_NO
|
||||||
|
|
||||||
|
#define LAYOUT_65_ansi_blocker_split_bs( \
|
||||||
|
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015,\
|
||||||
|
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115,\
|
||||||
|
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215,\
|
||||||
|
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315,\
|
||||||
|
K400, K401, K402, K406, K410, K411, K412, K414, K415 \
|
||||||
|
) { \
|
||||||
|
{K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015},\
|
||||||
|
{K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, XXXX, K115},\
|
||||||
|
{K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, XXXX, XXXX, K215},\
|
||||||
|
{K300, XXXX, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, XXXX, K314, K315},\
|
||||||
|
{K400, K401, K402, XXXX, XXXX, XXXX, K406, XXXX, XXXX, XXXX, K410, K411, K412, XXXX, K414, K415} \
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Swiftrax <swiftrax@gmail.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 0x04D8
|
||||||
|
#define PRODUCT_ID 0xEAEF
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER Swiftrax
|
||||||
|
#define PRODUCT Astro65
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 16
|
||||||
|
|
||||||
|
// ROWS: Top to bottom, COLS: Left to right
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { B0, B3, F7, B1, B2 }
|
||||||
|
#define MATRIX_COL_PINS { E6, D5, C7, C6, B6, B5, B4, D7, D6, D4, F0, F1, F4, F5, F6 }
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Astro65",
|
||||||
|
"url": "https://github.com/swiftrax",
|
||||||
|
"maintainer": "Swiftrax",
|
||||||
|
"width": 16,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_65_ansi_blocker_split_bs": {
|
||||||
|
"layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1, "y":0}, {"label":"0,2", "x":2, "y":0}, {"label":"0,3", "x":3, "y":0}, {"label":"0,4", "x":4, "y":0}, {"label":"0,5", "x":5, "y":0}, {"label":"0,6", "x":6, "y":0}, {"label":"0,7", "x":7, "y":0}, {"label":"0,8", "x":8, "y":0}, {"label":"0,9", "x":9, "y":0}, {"label":"0,10", "x":10, "y":0}, {"label":"0,11", "x":11, "y":0}, {"label":"0,12", "x":12, "y":0}, {"label":"0,13", "x":13, "y":0}, {"label":"0,14", "x":14, "y":0}, {"label":"0,15", "x":15, "y":0}, {"label":"1,0", "x":0, "y":1, "w":1.5}, {"label":"1,1", "x":1.5, "y":1}, {"label":"1,2", "x":2.5, "y":1}, {"label":"1,3", "x":3.5, "y":1}, {"label":"1,4", "x":4.5, "y":1}, {"label":"1,5", "x":5.5, "y":1}, {"label":"1,6", "x":6.5, "y":1}, {"label":"1,7", "x":7.5, "y":1}, {"label":"1,8", "x":8.5, "y":1}, {"label":"1,9", "x":9.5, "y":1}, {"label":"1,10", "x":10.5, "y":1}, {"label":"1,11", "x":11.5, "y":1}, {"label":"1,12", "x":12.5, "y":1}, {"label":"1,13", "x":13.5, "y":1, "w":1.5}, {"label":"1,15", "x":15, "y":1}, {"label":"2,0", "x":0, "y":2, "w":1.75}, {"label":"2,1", "x":1.75, "y":2}, {"label":"2,2", "x":2.75, "y":2}, {"label":"2,3", "x":3.75, "y":2}, {"label":"2,4", "x":4.75, "y":2}, {"label":"2,5", "x":5.75, "y":2}, {"label":"2,6", "x":6.75, "y":2}, {"label":"2,7", "x":7.75, "y":2}, {"label":"2,8", "x":8.75, "y":2}, {"label":"2,9", "x":9.75, "y":2}, {"label":"2,10", "x":10.75, "y":2}, {"label":"2,11", "x":11.75, "y":2}, {"label":"2,12", "x":12.75, "y":2, "w":2.25}, {"label":"2,15", "x":15, "y":2}, {"label":"3,0", "x":0, "y":3, "w":2.25}, {"label":"3,2", "x":2.25, "y":3}, {"label":"3,3", "x":3.25, "y":3}, {"label":"3,4", "x":4.25, "y":3}, {"label":"3,5", "x":5.25, "y":3}, {"label":"3,6", "x":6.25, "y":3}, {"label":"3,7", "x":7.25, "y":3}, {"label":"3,8", "x":8.25, "y":3}, {"label":"3,9", "x":9.25, "y":3}, {"label":"3,10", "x":10.25, "y":3}, {"label":"3,11", "x":11.25, "y":3}, {"label":"3,12", "x":12.25, "y":3, "w":1.75}, {"label":"3,14", "x":14, "y":3}, {"label":"3,15", "x":15, "y":3}, {"label":"4,0", "x":0, "y":4, "w":1.25}, {"label":"4,1", "x":1.25, "y":4, "w":1.25}, {"label":"4,2", "x":2.5, "y":4, "w":1.25}, {"label":"4,6", "x":3.75, "y":4, "w":6.25}, {"label":"4,10", "x":10, "y":4, "w":1.25}, {"label":"4,11", "x":11.25, "y":4, "w":1.25}, {"label":"4,12", "x":13, "y":4}, {"label":"4,14", "x":14, "y":4}, {"label":"4,15", "x":15, "y":4}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Swiftrax <swiftrax@gmail.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/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_65_ansi_blocker_split_bs(
|
||||||
|
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_BSLS, 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_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_LSFT, 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_LGUI,KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
[1] = LAYOUT_65_ansi_blocker_split_bs(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,
|
||||||
|
_______, _______,_______, _______, _______, _______, _______,_______,_______),
|
||||||
|
};
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Swiftrax <swiftrax@gmail.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/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[0] = LAYOUT_65_ansi_blocker_split_bs(
|
||||||
|
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_BSLS, 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_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_LSFT, 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_LGUI,KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
|
|
||||||
|
[1] = LAYOUT_65_ansi_blocker_split_bs(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,
|
||||||
|
_______, _______,_______, _______, _______, _______, _______,_______,_______),
|
||||||
|
|
||||||
|
[2] = LAYOUT_65_ansi_blocker_split_bs(
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,
|
||||||
|
_______, _______,_______, _______, _______, _______, _______,_______,_______),
|
||||||
|
|
||||||
|
[3] = LAYOUT_65_ansi_blocker_split_bs(
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,
|
||||||
|
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______,
|
||||||
|
_______, _______,_______, _______, _______, _______, _______,_______,_______),
|
||||||
|
};
|
||||||
File renamed without changes.
@@ -0,0 +1,13 @@
|
|||||||
|
# Astro65
|
||||||
|
|
||||||
|
A 65% that uses Ai03's unified daughter board
|
||||||
|
|
||||||
|
* Keyboard Maintainer: Swiftrax
|
||||||
|
* Hardware Supported: Astro65
|
||||||
|
* Hardware Availability: https://github.com/swiftrax
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/swiftrax/astro65: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).
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
|
||||||
|
LAYOUTS = 65_ansi_blocker_split_bs
|
||||||
@@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xFEED
|
#define VENDOR_ID 0x4B42
|
||||||
#define PRODUCT_ID 0x0000
|
#define PRODUCT_ID 0x0191
|
||||||
#define DEVICE_VER 0x0001
|
#define DEVICE_VER 0x0001
|
||||||
#define MANUFACTURER KBDFans
|
#define MANUFACTURER KBDFans
|
||||||
#define PRODUCT kbd19x
|
#define PRODUCT kbd19x
|
||||||
|
|||||||
@@ -41,61 +41,62 @@ inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); }
|
|||||||
* represents the switch matrix.
|
* represents the switch matrix.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// 2u backspace: XXX, k1e
|
// 2u backspace: XXX, k71
|
||||||
// split backspace: k1d, k1e
|
// split backspace: k70, k71
|
||||||
|
|
||||||
// 2u numpad +: k2i, XXX
|
// 2u numpad +: k2c, XXX
|
||||||
// split numpad +: k2i, k3i
|
// split numpad +: k2c, k3c
|
||||||
|
|
||||||
// 2u numpad enter: k4i, XXX
|
// 2u numpad enter: k4c, XXX
|
||||||
// split numpad enter: k4i, k5i
|
// split numpad enter: k4c, k5c
|
||||||
|
|
||||||
// 2.25u lshift: k40, XXX
|
// 2.25u lshift: k40, XXX
|
||||||
// split (1.25u, 1u) lshift: k40, k41
|
// split (1.25u, 1u) lshift: k40, k41
|
||||||
|
|
||||||
// ANSI enter or ISO enter: k3e
|
// ANSI enter or ISO enter: k38
|
||||||
// backslash or NUHS: k2e
|
// Key next to ISO enter: k72
|
||||||
|
// backslash or NUHS: k73
|
||||||
|
|
||||||
// left winkey: k50, k51, k52
|
// left winkey: k50, k51, k52
|
||||||
// left WKL: k50, XXX, k52
|
// left WKL: k50, XXX, k52
|
||||||
|
|
||||||
// right winkey: k59, k5a, k5b
|
// right winkey: k55, k56, k57
|
||||||
// right WKL: k59, XXX, k5b
|
// right WKL: k55, XXX, k57
|
||||||
|
|
||||||
#define LAYOUT_all( \
|
#define LAYOUT_all( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \
|
k00, k01, k02, k03, k04, k60, k61, k62, k63, k05, k06, k07, k08, k72, k09, k0a, k0b, k0c, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, k1i, \
|
k10, k11, k12, k13, k14, k64, k65, k66, k67, k15, k16, k17, k18, k70, k71, k19, k1a, k1b, k1c, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \
|
k20, k21, k22, k23, k24, k68, k69, k6a, k6b, k25, k26, k27, k28, k73, k29, k2a, k2b, k2c, \
|
||||||
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i, \
|
k30, k31, k32, k33, k34, k6c, k75, k76, k77, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
|
||||||
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \
|
k40, k41, k42, k43, k44, k78, k79, k7a, k7b, k45, k46, k47, k48, k74, k49, k4a, k4b, k4c, \
|
||||||
k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h, k5i \
|
k50, k51, k52, k59, k55, k56, k57, k58, k53, k54, k5a, k5b, k5c \
|
||||||
)\
|
)\
|
||||||
{\
|
{\
|
||||||
{k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c},\
|
||||||
{k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c},\
|
||||||
{k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c},\
|
||||||
{k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, k3i},\
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c},\
|
||||||
{k40, k41, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\
|
{k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c},\
|
||||||
{k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, k5i},\
|
{k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c},\
|
||||||
{k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\
|
{k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, k6b, k6c},\
|
||||||
{k1d, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\
|
{k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, k7b, XXX},\
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_ansi( \
|
#define LAYOUT_ansi( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, k0i, \
|
k00, k01, k02, k03, k04, k60, k61, k62, k63, k05, k06, k07, k08, k72, k09, k0a, k0b, k0c, \
|
||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, k1h, k1i, \
|
k10, k11, k12, k13, k14, k64, k65, k66, k67, k15, k16, k17, k18, k71, k19, k1a, k1b, k1c, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, k2h, k2i, \
|
k20, k21, k22, k23, k24, k68, k69, k6a, k6b, k25, k26, k27, k28, k73, k29, k2a, k2b, k2c, \
|
||||||
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, k3h, \
|
k30, k31, k32, k33, k34, k6c, k75, k76, k77, k35, k36, k37, k38, k39, k3a, k3b, \
|
||||||
k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4e, k4f, k4g, k4h, k4i, \
|
k40, k42, k43, k44, k78, k79, k7a, k7b, k45, k46, k47, k48, k74, k49, k4a, k4b, k4c, \
|
||||||
k50, k51, k52, k56, k59, k5a, k5b, k5d, k5e, k5f, k5g, k5h \
|
k50, k51, k52, k59, k55, k56, k57, k58, k53, k54, k5a, k5b \
|
||||||
)\
|
)\
|
||||||
{\
|
{\
|
||||||
{k00, k01, k02, k03, k04, k09, k0a, k0b, k0c, k0f, k0g, k0h, k0i},\
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c},\
|
||||||
{k10, k11, k12, k13, k14, k19, k1a, k1b, k1c, k1f, k1g, k1h, k1i},\
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c},\
|
||||||
{k20, k21, k22, k23, k24, k29, k2a, k2b, k2c, k2f, k2g, k2h, k2i},\
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c},\
|
||||||
{k30, k32, k33, k34, k35, k3a, k3b, k3c, k3e, k3f, k3g, k3h, XXX},\
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX},\
|
||||||
{k40, XXX, k42, k43, k44, k49, k4a, k4b, k4c, k4f, k4g, k4h, k4i},\
|
{k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c},\
|
||||||
{k50, k51, k52, k5e, k5f, k59, k5a, k5b, k5d, k56, k5g, k5h, XXX},\
|
{k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, XXX},\
|
||||||
{k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\
|
{k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6a, k6b, k6c},\
|
||||||
{XXX, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\
|
{XXX, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7a, k7b, XXX},\
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 MechMerlin
|
||||||
|
|
||||||
|
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_ansi( /* Base */
|
||||||
|
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, BL_STEP, KC_PSCR, KC_SLCK, KC_PAUS, KC_PGDN, \
|
||||||
|
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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||||
|
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_P7, KC_P8, KC_P9, KC_PPLS, \
|
||||||
|
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_P4, KC_P5, KC_P6, \
|
||||||
|
KC_LSFT, 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_P1, KC_P2, KC_P3, KC_PENT, \
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \
|
||||||
|
),
|
||||||
|
[1] = LAYOUT_ansi( /* Func */
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, \
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
[2] = LAYOUT_ansi(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
[3] = LAYOUT_ansi(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -10,9 +10,9 @@ The KBD19x is a compact-1800 keyboard kit produced by KBDfans, offering a number
|
|||||||
|
|
||||||
**Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode.
|
**Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode.
|
||||||
|
|
||||||
Keyboard Maintainer: [jshuf](https://github.com/jshuf)
|
* Keyboard Maintainer: [jshuf](https://github.com/jshuf), [MechMerlin](https://github.com/mechmerlin)
|
||||||
Hardware Supported: KBD19x PCB
|
* Hardware Supported: KBD19x PCB
|
||||||
Hardware Availability: [KBDfans](https://kbdfans.cn)
|
* Hardware Availability: [KBDfans](https://kbdfans.cn)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
|
|||||||
@@ -1,3 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright (c) 2020 Fred Silberberg
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "333fred.h"
|
#include "333fred.h"
|
||||||
|
|
||||||
|
|||||||
Loaded 100 of 325 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user