mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-09-10 17:15:43 +00:00
Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c9ffd4739 | ||
|
|
2013f63134 | ||
|
|
32661df8cd | ||
|
|
661f4aaa8a | ||
|
|
27f9f3196d | ||
|
|
89446bafb8 | ||
|
|
2bcac45650 | ||
|
|
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 | ||
|
|
b6f9ca3b09 | ||
|
|
603c8d1f06 | ||
|
|
4a83021fe0 | ||
|
|
9570b1bbb4 | ||
|
|
4511201d80 | ||
|
|
ef7c79b781 | ||
|
|
8711dda0d3 | ||
|
|
a0305f5e7e | ||
|
|
c2a0cebf8b | ||
|
|
ef1b050b32 | ||
|
|
4bee445c2f | ||
|
|
7921c5d9b8 | ||
|
|
72b1ff5899 | ||
|
|
eee6dd3544 | ||
|
|
510138f525 | ||
|
|
07e37c857c | ||
|
|
a21e487fbc |
@@ -35,30 +35,30 @@
|
||||
ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_ATMEL_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
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_LUFA_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
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
|
||||
OPT_DEFS += -DBOOTLOADER_QMK_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
|
||||
endif
|
||||
ifeq ($(strip $(MCU)), at90usb1286)
|
||||
ifneq (,$(filter $(MCU), at90usb1286 at90usb1287))
|
||||
BOOTLOADER_SIZE = 8192
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -13,65 +13,76 @@ An example of using `sudo`, when your controller is ATMega32u4:
|
||||
|
||||
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.
|
||||
|
||||
### 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:
|
||||
```console
|
||||
|
||||
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/`:
|
||||
|
||||
**/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 trigger
|
||||
```
|
||||
|
||||
**/etc/udev/rules.d/50-atmel-dfu.rules:**
|
||||
```
|
||||
# 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:**
|
||||
**Note:** With older versions of ModemManager (< 1.12), filtering only works when not in strict mode. The following commands can update that setting:
|
||||
|
||||
```
|
||||
# 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
|
||||
sudo systemctl daemon-reload
|
||||
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
|
||||
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.
|
||||
@@ -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.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)
|
||||
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**.
|
||||
- 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
|
||||
|
||||
@@ -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.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------|-------------------------------|----------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control 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` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift 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` |
|
||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt 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`|
|
||||
|Key |Aliases |Description |
|
||||
|----------|-------------------------------|------------------------------------------------------|
|
||||
|`LCTL(kc)`|`C(kc)` |Hold Left Control 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` |
|
||||
|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` |
|
||||
|`RCTL(kc)`| |Hold Right Control and press `kc` |
|
||||
|`RSFT(kc)`| |Hold Right Shift 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` |
|
||||
|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` |
|
||||
|`LCA(kc)` | |Hold Left Control and Alt and press `kc` |
|
||||
|`LSA(kc)` | |Hold Left Shift and Left Alt and press `kc` |
|
||||
|`RSA(kc)` |`SAGR(kc)` |Hold Right Shift and Right Alt (AltGr) 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.
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ When developing your keyboard, keep in mind that all warnings will be treated as
|
||||
|
||||
## Copyright Blurb
|
||||
|
||||
If you're adapting your keyboard's setup from another project, but not using the same code, but sure to update the copyright header at the top of the files to show your name, in this format:
|
||||
If you're adapting your keyboard's setup from another project, but not using the same code, be sure to update the copyright header at the top of the files to show your name, in this format:
|
||||
|
||||
Copyright 2017 Your Name <your@email.com>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* `height`
|
||||
* オプション: キー単位でのレイアウトの高さ
|
||||
* `key_count`
|
||||
* **必須**: このレイアウトのキーの数
|
||||
* オプション: このレイアウトのキーの数
|
||||
* `layout`
|
||||
* 物理レイアウトを説明するキー辞書のリスト。詳細は次のセクションを見てください。
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|------------|-----------------------------------------------------------------|-------------------------------------------------------|
|
||||
|`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 |
|
||||
|`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 |
|
||||
|`RCTL_T(kc)`| |Right Control 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 |
|
||||
|`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 |
|
||||
|`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 |
|
||||
|`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|
|
||||
|Key |Aliases |Description |
|
||||
|------------|-----------------------------------------------------------------|--------------------------------------------------------------|
|
||||
|`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 |
|
||||
|`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 |
|
||||
|`RCTL_T(kc)`| |Right Control 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 |
|
||||
|`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 |
|
||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||
|`LSA_T(kc)` | |Left Shift and Alt when held, `kc` when tapped |
|
||||
|`RSA_T(kc)` |`SAGR_T(kc)` |Right Shift and Right Alt (AltGr) when held, `kc` when tapped |
|
||||
|`RCS_T(kc)` | |Right Control and Right Shift 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/)|
|
||||
|
||||
## Caveats
|
||||
|
||||
@@ -31,7 +31,7 @@ Within our `info.json` file the `layouts` portion of the dictionary contains sev
|
||||
* `height`
|
||||
* Optional: The height of the layout in Key Units
|
||||
* `key_count`
|
||||
* **Required**: The number of keys in this layout
|
||||
* Optional: The number of keys in this layout
|
||||
* `layout`
|
||||
* A list of Key Dictionaries describing the physical layout. See the next section for more details.
|
||||
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
# 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.
|
||||
|
||||
## 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
|
||||
#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
|
||||
#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
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
@@ -56,7 +56,7 @@ For Instance:
|
||||
- `KC_X` 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`.
|
||||
|
||||
@@ -87,7 +87,7 @@ To enable this setting, add this to your `config.h`:
|
||||
#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).
|
||||
|
||||
@@ -126,27 +126,27 @@ bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
## 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
|
||||
#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:
|
||||
|
||||
- SFT_T(KC_A) Down
|
||||
- SFT_T(KC_A) Up
|
||||
- SFT_T(KC_A) Down
|
||||
- wait more than tapping term...
|
||||
- SFT_T(KC_A) Up
|
||||
- `SFT_T(KC_A)` Down
|
||||
- `SFT_T(KC_A)` Up
|
||||
- `SFT_T(KC_A)` Down
|
||||
- wait until the tapping term expires...
|
||||
- `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 `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`:
|
||||
|
||||
@@ -169,7 +169,7 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
## 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
|
||||
#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.
|
||||
|
||||
## 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?!
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
for (int i = 0; i < 342; i += 18) {
|
||||
g_twi_transfer_buffer[0] = i % 180;
|
||||
|
||||
if (i == 180) {
|
||||
// unlock the command register and select PG2
|
||||
IS31FL3741_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
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);
|
||||
|
||||
#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->g] = green;
|
||||
g_scaling_registers[pled->driver][pled->b] = blue;
|
||||
|
||||
g_scaling_registers_update_required[pled->driver] = true;
|
||||
}
|
||||
|
||||
@@ -23,14 +23,13 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct is31_led {
|
||||
uint8_t driver : 2;
|
||||
uint16_t r;
|
||||
uint16_t g;
|
||||
uint16_t b;
|
||||
uint32_t driver : 2;
|
||||
uint32_t r : 10;
|
||||
uint32_t g : 10;
|
||||
uint32_t b : 10;
|
||||
} __attribute__((packed)) is31_led;
|
||||
|
||||
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_write_register(uint8_t addr, uint8_t reg, uint8_t data);
|
||||
|
||||
@@ -75,8 +75,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define CHARGE_PUMP 0x8D
|
||||
|
||||
// Misc defines
|
||||
#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
|
||||
#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
|
||||
#ifndef 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
|
||||
#define I2C_CMD 0x00
|
||||
@@ -212,7 +218,7 @@ __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
void oled_clear(void) {
|
||||
memset(oled_buffer, 0, sizeof(oled_buffer));
|
||||
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) {
|
||||
@@ -262,13 +268,14 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
|
||||
|
||||
void oled_render(void) {
|
||||
// Do we have work to do?
|
||||
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
||||
if (!oled_dirty || oled_scrolling) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find first dirty block
|
||||
uint8_t update_start = 0;
|
||||
while (!(oled_dirty & (1 << update_start))) {
|
||||
while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) {
|
||||
++update_start;
|
||||
}
|
||||
|
||||
@@ -314,7 +321,7 @@ void oled_render(void) {
|
||||
oled_on();
|
||||
|
||||
// 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) {
|
||||
@@ -404,9 +411,9 @@ void oled_write_char(const char data, bool invert) {
|
||||
// Dirty check
|
||||
if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) {
|
||||
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
|
||||
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
|
||||
@@ -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) {
|
||||
@@ -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 (oled_buffer[index] == data) return;
|
||||
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) {
|
||||
@@ -464,21 +471,28 @@ void oled_write_raw(const char *data, uint16_t size) {
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
if (oled_buffer[i] == data[i]) continue;
|
||||
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) {
|
||||
if (x >= OLED_DISPLAY_WIDTH || y >= OLED_DISPLAY_HEIGHT) {
|
||||
if (x >= oled_rotation_width) {
|
||||
return;
|
||||
}
|
||||
uint16_t index = x + (y / 8) * OLED_DISPLAY_WIDTH;
|
||||
if (on) {
|
||||
oled_buffer[index] |= (1 << (y % 8));
|
||||
} else {
|
||||
oled_buffer[index] &= ~(1 << (y % 8));
|
||||
uint16_t index = x + (y / 8) * oled_rotation_width;
|
||||
if (index >= OLED_MATRIX_SIZE) {
|
||||
return;
|
||||
}
|
||||
uint8_t data = oled_buffer[index];
|
||||
if (on) {
|
||||
data |= (1 << (y % 8));
|
||||
} else {
|
||||
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__)
|
||||
@@ -501,7 +515,7 @@ void oled_write_raw_P(const char *data, uint16_t size) {
|
||||
uint8_t c = pgm_read_byte(data++);
|
||||
if (oled_buffer[i] == c) continue;
|
||||
oled_buffer[i] = c;
|
||||
oled_dirty |= (1 << (i / OLED_BLOCK_SIZE));
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE));
|
||||
}
|
||||
}
|
||||
#endif // defined(__AVR__)
|
||||
@@ -597,7 +611,7 @@ bool oled_scroll_off(void) {
|
||||
return oled_scrolling;
|
||||
}
|
||||
oled_scrolling = false;
|
||||
oled_dirty = -1;
|
||||
oled_dirty = OLED_ALL_BLOCKS_MASK;
|
||||
}
|
||||
return !oled_scrolling;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x0A0C
|
||||
#define VENDOR_ID 0x3430 // "40"
|
||||
#define PRODUCT_ID 0x9999
|
||||
#define DEVICE_VER 0x9999
|
||||
#define MANUFACTURER di0ib
|
||||
#define PRODUCT The nein Keyboard
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"keyboard_name": "nein",
|
||||
"url": "",
|
||||
"url": "http://www.40percent.club/2019/04/nein.html",
|
||||
"maintainer": "qmk",
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
|
||||
39
keyboards/40percentclub/nein/keymaps/via/keymap.c
Normal file
39
keyboards/40percentclub/nein/keymaps/via/keymap.c
Normal file
@@ -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(
|
||||
_______, _______, _______,
|
||||
_______, _______, _______,
|
||||
_______, _______, _______
|
||||
),
|
||||
};
|
||||
2
keyboards/40percentclub/nein/keymaps/via/rules.mk
Normal file
2
keyboards/40percentclub/nein/keymaps/via/rules.mk
Normal file
@@ -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
|
||||
|
||||
Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work.
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = no
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
{
|
||||
"keyboard_name": "slice",
|
||||
"url": "https://www.basekeys.com",
|
||||
"maintainer": "2Moons",
|
||||
"width": 17.72,
|
||||
"height": 5,
|
||||
"keyboard_name": "slice",
|
||||
"url": "https://www.basekeys.com",
|
||||
"maintainer": "2Moons",
|
||||
"width": 17.72,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"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": [{"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_split_left_space": {
|
||||
"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}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
127
keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c
Normal file
127
keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c
Normal file
@@ -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
|
||||
0
keyboards/nebula65/keymaps/via/rules.mk → keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk
Executable file → Normal file
0
keyboards/nebula65/keymaps/via/rules.mk → keyboards/basekeys/slice/rev1_rgb/keymaps/via/rules.mk
Executable file → Normal file
@@ -76,5 +76,23 @@
|
||||
{ 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] = {
|
||||
[_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_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,
|
||||
|
||||
52
keyboards/bm60poker/bm60poker.c
Normal file
52
keyboards/bm60poker/bm60poker.c
Normal file
@@ -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
|
||||
32
keyboards/bm60poker/bm60poker.h
Normal file
32
keyboards/bm60poker/bm60poker.h
Normal file
@@ -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 }, \
|
||||
}
|
||||
70
keyboards/bm60poker/config.h
Normal file
70
keyboards/bm60poker/config.h
Normal file
@@ -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
|
||||
74
keyboards/bm60poker/info.json
Normal file
74
keyboards/bm60poker/info.json
Normal file
@@ -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}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
34
keyboards/bm60poker/keymaps/default/keymap.c
Normal file
34
keyboards/bm60poker/keymaps/default/keymap.c
Normal file
@@ -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, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
144
keyboards/bm60poker/keymaps/ipetepete/keymap.c
Normal file
144
keyboards/bm60poker/keymaps/ipetepete/keymap.c
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
1
keyboards/bm60poker/keymaps/ipetepete/readme.md
Normal file
1
keyboards/bm60poker/keymaps/ipetepete/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# Simple 60% for coding
|
||||
1
keyboards/bm60poker/keymaps/ipetepete/rules.mk
Normal file
1
keyboards/bm60poker/keymaps/ipetepete/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
15
keyboards/bm60poker/readme.md
Normal file
15
keyboards/bm60poker/readme.md
Normal file
@@ -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
|
||||
24
keyboards/bm60poker/rules.mk
Normal file
24
keyboards/bm60poker/rules.mk
Normal file
@@ -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"
|
||||
|
||||
#define LAYOUT( \
|
||||
#define LAYOUT_60_iso_arrow( \
|
||||
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, \
|
||||
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 }, \
|
||||
{ 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(
|
||||
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_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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
[0] = LAYOUT_60_iso_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_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_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
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
[1] = LAYOUT_60_iso_arrow(
|
||||
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, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
@@ -35,12 +35,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
[3] = LAYOUT_ortho_5x12(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
90
keyboards/boardwalk/keymaps/default_2x2u/keymap.c
Normal file
90
keyboards/boardwalk/keymaps/default_2x2u/keymap.c
Normal file
@@ -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, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
1
keyboards/boardwalk/keymaps/default_2x2u/readme.md
Normal file
1
keyboards/boardwalk/keymaps/default_2x2u/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# The default_2x2u keymap for Boardwalk
|
||||
18
keyboards/boardwalk/keymaps/niclake/config.h
Normal file
18
keyboards/boardwalk/keymaps/niclake/config.h
Normal file
@@ -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
|
||||
150
keyboards/boardwalk/keymaps/niclake/keymap.c
Normal file
150
keyboards/boardwalk/keymaps/niclake/keymap.c
Normal file
@@ -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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
8
keyboards/boardwalk/keymaps/niclake/readme.md
Normal file
8
keyboards/boardwalk/keymaps/niclake/readme.md
Normal file
@@ -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)
|
||||
3
keyboards/boardwalk/keymaps/niclake/rules.mk
Normal file
3
keyboards/boardwalk/keymaps/niclake/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
COMMAND_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
BOOTMAGIC_ENABLE = full
|
||||
45
keyboards/clawsome/fightpad/config.h
Normal file
45
keyboards/clawsome/fightpad/config.h
Normal file
@@ -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
|
||||
16
keyboards/clawsome/fightpad/fightpad.c
Normal file
16
keyboards/clawsome/fightpad/fightpad.c
Normal file
@@ -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"
|
||||
26
keyboards/clawsome/fightpad/fightpad.h
Normal file
26
keyboards/clawsome/fightpad/fightpad.h
Normal file
@@ -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 }, \
|
||||
}
|
||||
25
keyboards/clawsome/fightpad/info.json
Normal file
25
keyboards/clawsome/fightpad/info.json
Normal file
@@ -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}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
25
keyboards/clawsome/fightpad/keymaps/default/keymap.c
Normal file
25
keyboards/clawsome/fightpad/keymaps/default/keymap.c
Normal file
@@ -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
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
13
keyboards/clawsome/fightpad/readme.md
Normal file
13
keyboards/clawsome/fightpad/readme.md
Normal file
@@ -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).
|
||||
22
keyboards/clawsome/fightpad/rules.mk
Normal file
22
keyboards/clawsome/fightpad/rules.mk
Normal file
@@ -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)
|
||||
{
|
||||
bool changed = false;
|
||||
// Right hand is stored after the left in the matirx so, we need to offset it
|
||||
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.
|
||||
matrix_row_t cols = read_cols();
|
||||
if (matrix_debouncing[i+offset] != cols) {
|
||||
changed = true;
|
||||
matrix_debouncing[i+offset] = cols;
|
||||
debouncing = DEBOUNCE;
|
||||
}
|
||||
@@ -179,7 +181,7 @@ uint8_t _matrix_scan(void)
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return changed;
|
||||
}
|
||||
|
||||
#ifdef USE_MATRIX_I2C
|
||||
@@ -237,16 +239,17 @@ int serial_transaction(int master_changed) {
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
bool changed = false;
|
||||
if (is_master) {
|
||||
matrix_master_scan();
|
||||
changed |= matrix_master_scan();
|
||||
}else{
|
||||
matrix_slave_scan();
|
||||
changed |= matrix_slave_scan();
|
||||
int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
|
||||
memcpy(&matrix[offset],
|
||||
(void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH);
|
||||
matrix_scan_quantum();
|
||||
}
|
||||
return 1;
|
||||
return (uint8_t) changed;
|
||||
}
|
||||
|
||||
|
||||
@@ -297,8 +300,8 @@ uint8_t matrix_master_scan(void) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
void matrix_slave_scan(void) {
|
||||
_matrix_scan();
|
||||
uint8_t matrix_slave_scan(void) {
|
||||
int ret = _matrix_scan();
|
||||
|
||||
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) {
|
||||
#ifdef SERIAL_USE_MULTI_TRANSACTION
|
||||
if( serial_slave_buffer[i] != matrix[offset+i] )
|
||||
change = 1;
|
||||
change = 1;
|
||||
#endif
|
||||
serial_slave_buffer[i] = matrix[offset+i];
|
||||
}
|
||||
@@ -322,6 +325,7 @@ void matrix_slave_scan(void) {
|
||||
slave_buffer_change_count += change;
|
||||
#endif
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
// 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);
|
||||
bool has_usb(void);
|
||||
|
||||
57
keyboards/doodboard/duckboard/config.h
Normal file
57
keyboards/doodboard/duckboard/config.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/* Copyright 2020 doodboard
|
||||
*
|
||||
* 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 0xFF44
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER doodboard
|
||||
#define PRODUCT duckboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 5
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { F7, B1, B3, B2, B6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define ENCODERS_PAD_A { F5 }
|
||||
#define ENCODERS_PAD_B { F6 }
|
||||
#define ENCODER_RESOLUTION 2
|
||||
|
||||
/* media key slowdown for windows */
|
||||
#define TAP_CODE_DELAY 20
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN D3
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLED_NUM 8 // Number of LEDs
|
||||
#endif
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
17
keyboards/doodboard/duckboard/duckboard.c
Normal file
17
keyboards/doodboard/duckboard/duckboard.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* Copyright 2020 doodboard
|
||||
*
|
||||
* 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 "duckboard.h"
|
||||
34
keyboards/doodboard/duckboard/duckboard.h
Normal file
34
keyboards/doodboard/duckboard/duckboard.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/* Copyright 2020 doodboard
|
||||
*
|
||||
* 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, K02, K03, K04, \
|
||||
K11, K12, K13, \
|
||||
K21, K22, K23, K24, \
|
||||
K31, K32, K33, \
|
||||
K40, K41, K42, K43, K44 \
|
||||
) { \
|
||||
{ KC_NO, K01, K02, K03, K04 }, \
|
||||
{ KC_NO, K11, K12, K13, KC_NO }, \
|
||||
{ KC_NO, K21, K22, K23, K24 }, \
|
||||
{ KC_NO, K31, K32, K33, KC_NO }, \
|
||||
{ K40, K41, K42, K43, K44 } \
|
||||
}
|
||||
36
keyboards/doodboard/duckboard/info.json
Normal file
36
keyboards/doodboard/duckboard/info.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"keyboard_name": "duckboard",
|
||||
"url": "",
|
||||
"maintainer": "doodboard",
|
||||
"width": 5,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x": 1, "y": 0},
|
||||
{"x": 2, "y": 0},
|
||||
{"x": 3, "y": 0},
|
||||
{"x": 4, "y": 0},
|
||||
|
||||
{"x": 1, "y": 1},
|
||||
{"x": 2, "y": 1},
|
||||
{"x": 3, "y": 1},
|
||||
|
||||
{"x": 1, "y": 2},
|
||||
{"x": 2, "y": 2},
|
||||
{"x": 3, "y": 2},
|
||||
{"x": 4, "y": 2},
|
||||
|
||||
{"x": 1, "y": 3},
|
||||
{"x": 2, "y": 3},
|
||||
{"x": 3, "y": 3},
|
||||
|
||||
{"x": 0, "y": 4},
|
||||
{"x": 1, "y": 4},
|
||||
{"x": 2, "y": 4},
|
||||
{"x": 3, "y": 4},
|
||||
{"x": 4, "y": 4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
118
keyboards/doodboard/duckboard/keymaps/default/keymap.c
Normal file
118
keyboards/doodboard/duckboard/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,118 @@
|
||||
/* Copyright 2020 doodboard
|
||||
*
|
||||
* 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(
|
||||
TG(1), 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_BSPC, KC_MUTE, KC_P0, KC_PDOT, KC_PENT),
|
||||
[1] = LAYOUT(
|
||||
TG(1), KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_HOME, KC_UP, KC_PGUP,
|
||||
KC_LEFT, KC_TRNS, KC_RGHT, KC_TRNS,
|
||||
KC_END, KC_DOWN, KC_PGDN,
|
||||
TG(2), KC_TRNS, KC_INS, KC_DEL, KC_TRNS),
|
||||
[2] = LAYOUT(
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS,
|
||||
RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
TG(2), RESET, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||
|
||||
|
||||
// WPM-responsive animation stuff here
|
||||
#define IDLE_FRAMES 2
|
||||
#define IDLE_SPEED 40 // below this wpm value your animation will idle
|
||||
|
||||
#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
|
||||
// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing
|
||||
#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024
|
||||
|
||||
uint32_t anim_timer = 0;
|
||||
uint32_t anim_sleep = 0;
|
||||
uint8_t current_idle_frame = 0;
|
||||
|
||||
// Credit to u/Pop-X- for the initial code. You can find his commit here https://github.com/qmk/qmk_firmware/pull/9264/files#diff-303f6e3a7a5ee54be0a9a13630842956R196-R333.
|
||||
static void render_anim(void) {
|
||||
static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = {
|
||||
{
|
||||
0, 0,192,192,192,192,192,192,192,248,248, 30, 30,254,254,248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,127,255,255,255,255,255,159,159,135,135,129,129,129, 97, 97, 25, 25, 7, 7, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 97, 97,127, 1, 1, 97, 97,127, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
},
|
||||
{
|
||||
0, 0,128,128,128,128,128,128,128,240,240, 60, 60,252,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 7, 7, 7, 7, 7,255,255,254,254,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255, 63, 63, 15, 15, 3, 3, 3,195,195, 51, 51, 15, 15, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 99, 99,127, 3, 3, 99, 99,127, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
}
|
||||
};
|
||||
|
||||
//assumes 1 frame prep stage
|
||||
void animation_phase(void) {
|
||||
current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES;
|
||||
oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE);
|
||||
}
|
||||
|
||||
if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
anim_timer = timer_read32();
|
||||
animation_phase();
|
||||
}
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
render_anim();
|
||||
oled_set_cursor(0,6);
|
||||
oled_write_P(PSTR("DUCK\nBOARD\n"), false);
|
||||
oled_write_P(PSTR("-----\n"), false);
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("MODE\n"), false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
oled_write_P(PSTR("BASE\n"), false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write_P(PSTR("FUNC\n"), false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write_P(PSTR("RGB\n"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
//Customise these values to debug
|
||||
//debug_enable=true;
|
||||
//debug_matrix=true;
|
||||
//debug_keyboard=true;
|
||||
//debug_mouse=true;
|
||||
}
|
||||
17
keyboards/doodboard/duckboard/readme.md
Normal file
17
keyboards/doodboard/duckboard/readme.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# duckboard
|
||||
|
||||
An 18-key numpad with rotary encoder and OLED support.
|
||||
|
||||
* Keyboard Maintainer: [doodboard](https://github.com/doodboard)
|
||||
* Hardware Supported: duckboard PCB
|
||||
* Hardware Availability: Private Group Buy
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make doodboard/duckboard:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make doodboard/duckboard:default:flash
|
||||
|
||||
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).
|
||||
25
keyboards/doodboard/duckboard/rules.mk
Normal file
25
keyboards/doodboard/duckboard/rules.mk
Normal file
@@ -0,0 +1,25 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # 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 = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
|
||||
ENCODER_ENABLE = yes
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
@@ -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] = {
|
||||
|
||||
[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_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, \
|
||||
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, \
|
||||
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_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( \
|
||||
@@ -33,9 +33,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[3] = LAYOUT( \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______, _______,_______,_______,_______,_______,SI_ZV, _______,_______,_______,_______,_______,_______,_______, \
|
||||
_______, _______,SI_SV, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______,_______,_______,_______,SI_CV, _______,_______,_______,_______,_______,_______,_______, _______,_______, \
|
||||
_______, _______,_______,_______,_______,_______,SI_ZCAR,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______, _______,SI_SCAR, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______,_______,_______,_______,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
|
||||
|
||||
#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 "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_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_DELAY 0
|
||||
#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_right_led_1_on(void);
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.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")
|
||||
#define I2C_ADDR 0b0100000
|
||||
|
||||
@@ -30,7 +30,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "debounce.h"
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "ergodox_ez.h"
|
||||
|
||||
|
||||
/*
|
||||
* 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) */
|
||||
static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values
|
||||
static matrix_row_t matrix[MATRIX_ROWS]; // debounced values
|
||||
extern 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 void init_cols(void);
|
||||
@@ -54,132 +55,62 @@ static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
|
||||
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(); }
|
||||
|
||||
__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;
|
||||
}
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
}
|
||||
|
||||
// Reads and stores a row, returning
|
||||
// whether a change occurred.
|
||||
static inline bool store_raw_matrix_row(uint8_t index) {
|
||||
matrix_row_t temp = read_cols(index);
|
||||
if (raw_matrix[index] != temp) {
|
||||
raw_matrix[index] = temp;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
matrix_row_t temp = read_cols(index);
|
||||
if (raw_matrix[index] != temp) {
|
||||
raw_matrix[index] = temp;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void) {
|
||||
if (mcp23018_status) { // if there was an error
|
||||
if (++mcp23018_reset_loop == 0) {
|
||||
// if (++mcp23018_reset_loop >= 1300) {
|
||||
// since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
|
||||
// this will be approx bit more frequent than once per second
|
||||
print("trying to reset mcp23018\n");
|
||||
mcp23018_status = init_mcp23018();
|
||||
if (mcp23018_status) {
|
||||
print("left side not responding\n");
|
||||
} else {
|
||||
print("left side attached\n");
|
||||
ergodox_blink_all_leds();
|
||||
bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
if (mcp23018_status) { // if there was an error
|
||||
if (++mcp23018_reset_loop == 0) {
|
||||
print("trying to reset mcp23018\n");
|
||||
mcp23018_status = init_mcp23018();
|
||||
if (mcp23018_status) {
|
||||
print("left side not responding\n");
|
||||
} else {
|
||||
print("left side attached\n");
|
||||
ergodox_blink_all_leds();
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_init(); // re-init driver on reconnect
|
||||
rgb_matrix_init(); // re-init driver on reconnect
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef LEFT_LEDS
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
mcp23018_status = ergodox_left_leds_update();
|
||||
#endif // LEFT_LEDS
|
||||
bool changed = false;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||
// select rows from left and right hands
|
||||
uint8_t left_index = i;
|
||||
uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
|
||||
select_row(left_index);
|
||||
select_row(right_index);
|
||||
bool changed = false;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
|
||||
// select rows from left and right hands
|
||||
uint8_t left_index = i;
|
||||
uint8_t right_index = i + MATRIX_ROWS_PER_SIDE;
|
||||
select_row(left_index);
|
||||
select_row(right_index);
|
||||
|
||||
// we don't need a 30us delay anymore, because selecting a
|
||||
// left-hand row requires more than 30us for i2c.
|
||||
changed |= store_raw_matrix_row(left_index);
|
||||
changed |= store_raw_matrix_row(right_index);
|
||||
|
||||
changed |= store_raw_matrix_row(left_index);
|
||||
changed |= store_raw_matrix_row(right_index);
|
||||
unselect_rows();
|
||||
}
|
||||
|
||||
unselect_rows();
|
||||
}
|
||||
|
||||
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;
|
||||
return changed;
|
||||
}
|
||||
|
||||
/* Column pin configuration
|
||||
@@ -193,42 +124,43 @@ uint8_t matrix_key_count(void) {
|
||||
* pin: B5 B4 B3 B2 B1 B0
|
||||
*/
|
||||
static void init_cols(void) {
|
||||
// init on mcp23018
|
||||
// not needed, already done as part of init_mcp23018()
|
||||
// init on mcp23018
|
||||
// not needed, already done as part of init_mcp23018()
|
||||
|
||||
// init on teensy
|
||||
// Input with pull-up(DDR:0, PORT:1)
|
||||
DDRF &= ~(1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0);
|
||||
PORTF |= (1 << 7 | 1 << 6 | 1 << 5 | 1 << 4 | 1 << 1 | 1 << 0);
|
||||
// init on teensy
|
||||
setPinInputHigh(F0);
|
||||
setPinInputHigh(F1);
|
||||
setPinInputHigh(F4);
|
||||
setPinInputHigh(F5);
|
||||
setPinInputHigh(F6);
|
||||
setPinInputHigh(F7);
|
||||
}
|
||||
|
||||
static matrix_row_t read_cols(uint8_t row) {
|
||||
if (row < 7) {
|
||||
if (mcp23018_status) { // if there was an error
|
||||
return 0;
|
||||
if (row < 7) {
|
||||
if (mcp23018_status) { // if there was an error
|
||||
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 {
|
||||
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 {
|
||||
/* 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.
|
||||
*/
|
||||
/* 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
|
||||
@@ -242,69 +174,64 @@ static matrix_row_t read_cols(uint8_t row) {
|
||||
* pin: A0 A1 A2 A3 A4 A5 A6
|
||||
*/
|
||||
static void unselect_rows(void) {
|
||||
// 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
|
||||
// direction
|
||||
// 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
|
||||
// direction
|
||||
|
||||
// unselect on teensy
|
||||
// Hi-Z(DDR:0, PORT:0) to unselect
|
||||
DDRB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
|
||||
PORTB &= ~(1 << 0 | 1 << 1 | 1 << 2 | 1 << 3);
|
||||
DDRD &= ~(1 << 2 | 1 << 3);
|
||||
PORTD &= ~(1 << 2 | 1 << 3);
|
||||
DDRC &= ~(1 << 6);
|
||||
PORTC &= ~(1 << 6);
|
||||
// unselect on teensy
|
||||
setPinInput(B0);
|
||||
setPinInput(B1);
|
||||
setPinInput(B2);
|
||||
setPinInput(B3);
|
||||
setPinInput(D2);
|
||||
setPinInput(D3);
|
||||
setPinInput(C6);
|
||||
}
|
||||
|
||||
static void select_row(uint8_t row) {
|
||||
if (row < 7) {
|
||||
// select on mcp23018
|
||||
if (mcp23018_status) { // if there was an error
|
||||
// do nothing
|
||||
if (row < 7) {
|
||||
// select on mcp23018
|
||||
if (!mcp23018_status) {
|
||||
// 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 {
|
||||
// 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();
|
||||
// select on teensy
|
||||
// Output low(DDR:1, PORT:0) to select
|
||||
switch (row) {
|
||||
case 7:
|
||||
setPinOutput(B0);
|
||||
writePinLow(B0);
|
||||
break;
|
||||
case 8:
|
||||
setPinOutput(B1);
|
||||
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
|
||||
# comment out to disable the options.
|
||||
#
|
||||
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 = yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX = yes # 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
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
||||
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 = yes # Commands for debug and configuration
|
||||
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
|
||||
UNICODE_ENABLE = yes # Unicode
|
||||
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
|
||||
SLEEP_LED_ENABLE = no
|
||||
API_SYSEX_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
|
||||
RGB_MATRIX_ENABLE = no # enable later
|
||||
RGB_MATRIX_ENABLE = no # enable later
|
||||
DEBOUNCE_TYPE = eager_pr
|
||||
|
||||
# project specific files
|
||||
|
||||
28
keyboards/fjlabs/bolsa65/bolsa65.c
Normal file
28
keyboards/fjlabs/bolsa65/bolsa65.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
Copyright 2020 <me@homedrop.org>
|
||||
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 "bolsa65.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// Initialize indicator LEDs to output
|
||||
setPinOutput(F7); // Caps
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
writePin(F7, led_state.caps_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
32
keyboards/fjlabs/bolsa65/bolsa65.h
Normal file
32
keyboards/fjlabs/bolsa65/bolsa65.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
Copyright 2020 <me@homedrop.org>
|
||||
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"
|
||||
|
||||
/* Bolsa65 Keymap Definitions */
|
||||
#define LAYOUT_65_ansi_blocker( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
|
||||
K40, K41, K42, K44, K49, K4A, K4C, K4D, K4E \
|
||||
) { \
|
||||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \
|
||||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \
|
||||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \
|
||||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \
|
||||
{ K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E } \
|
||||
}
|
||||
108
keyboards/fjlabs/bolsa65/config.h
Normal file
108
keyboards/fjlabs/bolsa65/config.h
Normal file
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
Copyright 2020 <me@homedrop.org>
|
||||
|
||||
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 0x7074 // FJLabs
|
||||
#define PRODUCT_ID 0x0001 // Bolsa65
|
||||
#define DEVICE_VER 0x0001 // Version 1
|
||||
#define MANUFACTURER FJLabs
|
||||
#define PRODUCT bolsa65
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 15
|
||||
|
||||
/*
|
||||
* 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)
|
||||
*
|
||||
*/
|
||||
|
||||
// Checked with Eagle Schematic
|
||||
#define MATRIX_ROW_PINS { F1, F0, F6, F5, F4 }
|
||||
#define MATRIX_COL_PINS { C7, B1, B2, B3, B7, D0, D1, D2, D3, D5, D4, D6, D7, B4, B5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* 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
|
||||
|
||||
/* Define RGB Underglow
|
||||
#define RGB_DI_PIN B0
|
||||
#define RGBLED_NUM 24
|
||||
#define RGBLIGHT_ANIMATIONS */
|
||||
/* #define RGBLIGHT_LAYER_BLINK*/
|
||||
|
||||
/* Define less important options */
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
84
keyboards/fjlabs/bolsa65/info.json
Normal file
84
keyboards/fjlabs/bolsa65/info.json
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"keyboard_name": "Bolsa65",
|
||||
"url": "https://www.bolsakeyboardsupply.com",
|
||||
"maintainer": "FJLabs",
|
||||
"width": 16,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_65_ansi_blocker": {
|
||||
"layout": [
|
||||
{"x": 0, "y": 0},
|
||||
{"x": 1, "y": 0},
|
||||
{"x": 2, "y": 0},
|
||||
{"x": 3, "y": 0},
|
||||
{"x": 4, "y": 0},
|
||||
{"x": 5, "y": 0},
|
||||
{"x": 6, "y": 0},
|
||||
{"x": 7, "y": 0},
|
||||
{"x": 8, "y": 0},
|
||||
{"x": 9, "y": 0},
|
||||
{"x": 10, "y": 0},
|
||||
{"x": 11, "y": 0},
|
||||
{"x": 12, "y": 0},
|
||||
{"x": 13, "y": 0, "w": 2},
|
||||
{"x": 15, "y": 0},
|
||||
|
||||
{"x": 0, "y": 1, "w": 1.5},
|
||||
{"x": 1.5, "y": 1},
|
||||
{"x": 2.5, "y": 1},
|
||||
{"x": 3.5, "y": 1},
|
||||
{"x": 4.5, "y": 1},
|
||||
{"x": 5.5, "y": 1},
|
||||
{"x": 6.5, "y": 1},
|
||||
{"x": 7.5, "y": 1},
|
||||
{"x": 8.5, "y": 1},
|
||||
{"x": 9.5, "y": 1},
|
||||
{"x": 10.5, "y": 1},
|
||||
{"x": 11.5, "y": 1},
|
||||
{"x": 12.5, "y": 1},
|
||||
{"x": 13.5, "y": 1, "w": 1.5},
|
||||
{"x": 15, "y": 1},
|
||||
|
||||
{"x": 0, "y": 2, "w": 1.75},
|
||||
{"x": 1.75, "y": 2},
|
||||
{"x": 2.75, "y": 2},
|
||||
{"x": 3.75, "y": 2},
|
||||
{"x": 4.75, "y": 2},
|
||||
{"x": 5.75, "y": 2},
|
||||
{"x": 6.75, "y": 2},
|
||||
{"x": 7.75, "y": 2},
|
||||
{"x": 8.75, "y": 2},
|
||||
{"x": 9.75, "y": 2},
|
||||
{"x": 10.75, "y": 2},
|
||||
{"x": 11.75, "y": 2},
|
||||
{"x": 12.75, "y": 2, "w": 2.25},
|
||||
{"x": 15, "y": 2},
|
||||
|
||||
{"x": 0, "y": 3, "w": 2.25},
|
||||
{"x": 2.25, "y": 3},
|
||||
{"x": 3.25, "y": 3},
|
||||
{"x": 4.25, "y": 3},
|
||||
{"x": 5.25, "y": 3},
|
||||
{"x": 6.25, "y": 3},
|
||||
{"x": 7.25, "y": 3},
|
||||
{"x": 8.25, "y": 3},
|
||||
{"x": 9.25, "y": 3},
|
||||
{"x": 10.25, "y": 3},
|
||||
{"x": 11.25, "y": 3},
|
||||
{"x": 12.25, "y": 3, "w": 1.75},
|
||||
{"x": 14, "y": 3},
|
||||
{"x": 15, "y": 3},
|
||||
|
||||
{"x": 0, "y": 4, "w": 1.25},
|
||||
{"x": 1.25, "y": 4, "w": 1.25},
|
||||
{"x": 2.5, "y": 4, "w": 1.25},
|
||||
{"x": 3.75, "y": 4, "w": 6.25},
|
||||
{"x": 10, "y": 4, "w": 1.25},
|
||||
{"x": 11.25, "y": 4, "w": 1.25},
|
||||
{"x": 13, "y": 4},
|
||||
{"x": 14, "y": 4},
|
||||
{"x": 15, "y": 4}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
39
keyboards/fjlabs/bolsa65/keymaps/default/keymap.c
Normal file
39
keyboards/fjlabs/bolsa65/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
Copyright 2020 <me@homedrop.org>
|
||||
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 {
|
||||
_LAYER0,
|
||||
_LAYER1,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_LAYER0] = LAYOUT_65_ansi_blocker(
|
||||
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_BSPC, TG(1),
|
||||
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_PGUP,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
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_ESC ,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_LAYER1] = LAYOUT_65_ansi_blocker(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, TG(1),
|
||||
KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, 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
|
||||
)
|
||||
};
|
||||
58
keyboards/fjlabs/bolsa65/keymaps/via/keymap.c
Normal file
58
keyboards/fjlabs/bolsa65/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Copyright 2020 <me@homedrop.org>
|
||||
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 {
|
||||
_LAYER0,
|
||||
_LAYER1,
|
||||
_LAYER2,
|
||||
_LAYER3,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_LAYER0] = LAYOUT_65_ansi_blocker(
|
||||
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_BSPC, TG(1),
|
||||
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_PGUP,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
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_ESC ,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_LAYER1] = LAYOUT_65_ansi_blocker(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, TG(1),
|
||||
KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_SPI, RGB_SPD, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, 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
|
||||
),
|
||||
|
||||
[_LAYER2] = LAYOUT_65_ansi_blocker(
|
||||
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_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
|
||||
),
|
||||
|
||||
[_LAYER3] = LAYOUT_65_ansi_blocker(
|
||||
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_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
keyboards/fjlabs/bolsa65/keymaps/via/rules.mk
Normal file
1
keyboards/fjlabs/bolsa65/keymaps/via/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
12
keyboards/fjlabs/bolsa65/readme.md
Normal file
12
keyboards/fjlabs/bolsa65/readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# bolsa65
|
||||
|
||||
The following is the QMK Firmware for the [BolsaKeyboardSupply](https://www.bolsakeyboardsupply.com) Bolsa65 mechanical keyboard.
|
||||
|
||||
* Keyboard Maintainer: FJLabs
|
||||
* Hardware Supported: Bolsa65
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make fjlabs/bolsa65: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).
|
||||
28
keyboards/fjlabs/bolsa65/rules.mk
Normal file
28
keyboards/fjlabs/bolsa65/rules.mk
Normal file
@@ -0,0 +1,28 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency
|
||||
F_CPU = 8000000
|
||||
|
||||
# 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 = yes # 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 = yes # 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
|
||||
KEYBOARD_LOCK_ENABLE = yes
|
||||
|
||||
LAYOUTS = 65_ansi_blocker
|
||||
@@ -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
|
||||
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.
|
||||
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:
|
||||
|
||||
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.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
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
|
||||
|
||||
// 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
|
||||
|
||||
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_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_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 */
|
||||
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
|
||||
|
||||
Sadly right now when using VIA, extrakeys is disabled. This means volume control will not work.
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
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
|
||||
|
||||
#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 "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
|
||||
452
keyboards/handwired/onekey/keymaps/oled/keymap.c
Normal file
452
keyboards/handwired/onekey/keymaps/oled/keymap.c
Normal file
@@ -0,0 +1,452 @@
|
||||
/* Copyright 2020 Sergey Vlasov <sigprof@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
|
||||
|
||||
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;
|
||||
}
|
||||
23
keyboards/handwired/onekey/keymaps/oled/readme.md
Normal file
23
keyboards/handwired/onekey/keymaps/oled/readme.md
Normal file
@@ -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).
|
||||
2
keyboards/handwired/onekey/keymaps/oled/rules.mk
Normal file
2
keyboards/handwired/onekey/keymaps/oled/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
TAP_DANCE_ENABLE = yes
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2020 QMK Community, Daniel Reibl <janos.daniel.reibl@protonmail.com>
|
||||
Copyright 2020 QMK Community, Janos Daniel Reibl <janos.daniel.reibl@protonmail.com> @riblee
|
||||
|
||||
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
|
||||
|
||||
@@ -22,3 +22,5 @@ BACKLIGHT_DRIVER = software
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
|
||||
LAYOUTS = ortho_5x12
|
||||
47
keyboards/handwired/sick_pad/config.h
Normal file
47
keyboards/handwired/sick_pad/config.h
Normal file
@@ -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
|
||||
34
keyboards/handwired/sick_pad/info.json
Normal file
34
keyboards/handwired/sick_pad/info.json
Normal file
@@ -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}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
27
keyboards/handwired/sick_pad/keymaps/default/keymap.c
Normal file
27
keyboards/handwired/sick_pad/keymaps/default/keymap.c
Normal file
@@ -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
|
||||
)
|
||||
};
|
||||
15
keyboards/handwired/sick_pad/readme.md
Normal file
15
keyboards/handwired/sick_pad/readme.md
Normal file
@@ -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).
|
||||
20
keyboards/handwired/sick_pad/rules.mk
Normal file
20
keyboards/handwired/sick_pad/rules.mk
Normal file
@@ -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
|
||||
17
keyboards/handwired/sick_pad/sick_pad.c
Normal file
17
keyboards/handwired/sick_pad/sick_pad.c
Normal file
@@ -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"
|
||||
33
keyboards/handwired/sick_pad/sick_pad.h
Normal file
33
keyboards/handwired/sick_pad/sick_pad.h
Normal file
@@ -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 } \
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user