Compare commits

..

38 Commits

Author SHA1 Message Date
Ryan
9ee1282019 LED Matrix: rename LED_DRIVER_LED_COUNT to DRIVER_LED_TOTAL (#11858) 2021-02-15 11:55:13 +11:00
Atsushi NAGASE
6f44c2ec31 [Keymap] Add MOC keymap for meishi2 (#11833) 2021-02-14 13:19:48 -08:00
Galib, Muhammad
3134698ad2 initial add S20 keyboard into polycarbdiet folder (#11865) 2021-02-14 17:48:54 +00:00
csc027
5a37c1bd5c csc027/windows-terminal-shortcuts (#11867)
* Fixed some comments in the defines file.

* Replaced the Git command layer with a Windows Terminal shortcut layer.

* Added numbered tab switching to the Windows Terminal layer.

* Added 'new tab' and 'command pane' commands to the Windows Terminal layer.

* Shortened the USB polling interval for the Iris to 1 millisecond.

* Disabled old style macros and functions for the Iris.
2021-02-14 11:46:11 -05:00
umi
c6aad80e29 [Docs] Japanese translation of adc_driver.md (#10971)
* add adc_driver.md translation

* update based on comment

* update based on comment

* update based on comment
2021-02-14 20:54:58 +09:00
umi
50d816fe99 [Docs] Japanese translation of feature_unicode.md (#10985)
* add feature_unicode.md translation

* consolidate sentence end

* update based on comment

* update based on comment

* update based on comment

* update based on comment
2021-02-14 20:52:54 +09:00
James Young
ecbbdbcd4e [Keyboard] YMDK YMD40 v2 (#11835)
* [Keyboard] YMDK YMD40 v2

* fork default keymap into default and factory

- factory keymap is as assigned by the extracted JSON provided by the vendor
- default keymap is based on the Planck

* add AUDIO_SUPPORTED rule per drashna

* modify factory keymap's readme

Recommend users copy the default keymap instead.
2021-02-13 23:17:05 -08:00
James Young
d035bb51f4 [Keyboard] NEO Keys Palette G67 Hotswap & Soldered (#11850) 2021-02-13 18:16:23 -08:00
Joshua Diamond
537b7614b9 unscramble Durgod k320 keymap / fix Issue #11883 (#11885)
* unscramble Durgod k320 keymap / fix Issue #11883

* fix a few keymaps
2021-02-13 20:49:26 -05:00
Ryan
7ce5ba645a LED Matrix: add led_matrix_types.h and implement g_led_config (#11741)
* LED Matrix: add led_matrix_types.h and implement g_led_config

* Set correct flags for non-"modifier" LEDs

* Clean up docs a little

* Add license headers for [led,rgb]_matrix_types.h
2021-02-14 12:15:08 +11:00
Joel Challis
de8caf708c Split gpio and atomic to platform (#11792) 2021-02-14 11:51:06 +11:00
Nick Brassel
101990139f Disable VIA protocol's EEPROM reset and bootloader jump commands (#11892)
* Disable VIA protocol's EEPROM reset and bootloader jump commands, and allow for reinstation through #define.

* Removed at Wilba's suggestion.
2021-02-14 11:20:57 +11:00
Al Cutter
8af7e5ea81 Add basic ISO {Win,Mac} layouts for Durgod/K320 (#11778)
* Add default ISO Windows layout for Durgod/K320

* Duplicate default_iso to default_iso_mac

Swap the L{GUI,ALT} keys to match the mac layout, and remove the
windows key lock functionality.

* Remove windows-key lock in default_iso

* Fixup wonky macro layout inherited from ansi keymap
2021-02-13 12:05:53 -05:00
github-actions[bot]
4f598ee9fb Format code according to conventions (#11879)
Co-authored-by: QMK Bot <hello@qmk.fm>
2021-02-13 10:05:17 +00:00
Ryan
a716517705 Fix line endings for geminate60.[ch] (#11878) 2021-02-12 22:35:32 -05:00
MelGeek
c2b0bd2a0a [Keyboard] Update MOJO75 to support multi version (#11790)
* Add Z70Ultra which is a Hotsawp RGB 65% keyboard

* Update keyboards/melgeek/z70ultra/z70ultra.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/readme.md

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/rev1/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/z70ultra.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update readme.md

* Update info.json

update the name of layout to consistent the keyboard.

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/info.json

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Add Z70Ultra

* Support Z70Ultra
  [Modified] info.json to support two different layouts
  [Add]      rules.mk to support default folder

* Update keyboards/melgeek/z70ultra/rev1/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/z70ultra/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* remove excessive arguments from LAYOUT_split_space

* Update keyboards/melgeek/z70ultra/info.json

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/info.json

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/z70ultra.h

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/z70ultra.h

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/rev1/rules.mk

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/keymaps/default/keymap.c

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Update keyboards/melgeek/z70ultra/keymaps/via/keymap.c

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Use macro replace with the literal for CS & SW

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Drashna Jaelre <drashna@live.com>

* [Keyboard]  Support MJ61 which is a 60% ANSI STD Hotswap RGB keyboard

* Update keyboards/melgeek/mj61/mj61.c

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Update keyboards/melgeek/mj61/mj61.c

Co-authored-by: Drashna Jaelre <drashna@live.com>

* [Keyboard] MJ61 Add license header for files and the link for readme

* Update keyboards/melgeek/mj61/readme.md

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/mj61/rev1/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/mj61/rev1/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/mj61/mj61.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/melgeek/mj61/mj61.c

Co-authored-by: Ryan <fauxpark@gmail.com>

* Add GPL for files

* Update keymaps/default/keymap.c

* Update keymaps/via/keymap.c

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Drashna Jaelre <drashna@live.com>

* Update keyboards/melgeek/z70ultra/z70ultra.c

Co-authored-by: Drashna Jaelre <drashna@live.com>

* [Keyboard] Update MOJO75 to support multi version and Update the LED's
ID of RGB Matrix

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-02-12 21:34:34 -05:00
James Young
6e74abc643 [Keyboard] tunks/ergo33: define RGBLight config at kb level (#11855) 2021-02-12 16:59:10 -08:00
Carlos
bf1c40d682 [Docs] Add EEP_RST keycode to "Wiping the EEPROM" section (#11830) 2021-02-12 15:56:36 -08:00
Weirdo
548b874a16 [Keyboard] geminate60 keyboard (#11670)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2021-02-12 14:54:37 -08:00
Brian Marsh
519032c61b Adding custom keymap for Quark keyboard (#11744)
* adding pezhore keymap

* Adding sarcasm/irony mark, unicode emoji

* removing numpad layer enum

Co-authored-by: Brian Marsh <brian.marsh@rangelabs.io>
2021-02-12 15:51:23 -05:00
Stuart Fong
bedb72b0bc Add stuartfong1 Planck Layout (#11814)
* Add files via upload

* Update readme.md

* Update readme.md

* Add GPL2+ compatible license header to config.h

* Update keyboards/planck/keymaps/stuartfong1/keymap.c

Co-authored-by: Drashna Jaelre <drashna@live.com>

Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-02-12 14:15:38 -05:00
Christian Gurholt
22368ee49e Rename ki folder to kifinnsson (#11853)
In preparation for migrating keymaps to userspace
2021-02-12 13:46:27 -05:00
Timothy Beck
3f71bc8e79 added dear_vehicle_owner meme keymap to planck keyboard (#11478)
* added default as a starting point

* added readme per guidelines

* made necessary changed to keymap to follow guidelines

* changed debounce mode for more smooth usage at the cost of mem

* increased polling interval

* Revert "made necessary changed to keymap to follow guidelines"
yikes! I modified the WRONG directory. reverted.
This reverts commit 8ba3d97af5.

* reverted commit that modified file in incorrect directory. modified intended file.

* added license tp config.h
2021-02-12 13:43:52 -05:00
Quentin
550359a4b4 [Keyboard] Add bastyl mini keyboard (#11782)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: NullSense <matas234@gmail.com>
2021-02-11 18:33:50 -08:00
Rozakiin
bc74027f39 [Keyboard] Fix noxary Product IDs (#11771)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ruari <ruari.armstrong@gmail.com>
2021-02-11 17:02:28 -08:00
MelGeek
068e11f7e2 [Keyboard] Support MJ65 - a 65% RGB Hotswap keyboard (#11764)
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-02-11 16:56:07 -08:00
Kyle McCreery
6a5f29208e [Docs] Update feature_haptic_feedback.md (#11859)
Arduino playground link to wiring diagram no longer works. Changed the link to point to the correct Adafruit hosted diagram pdf.
2021-02-11 10:53:55 -08:00
James Young
5a73558a21 [Keymap] add noroadsleft userspace; add and update keymaps (#11686) 2021-02-10 20:17:42 +01:00
Joschua Gandert
4b2ab84c71 [Keymap] Added german_gaming keymap for hidtech/bastyl (#11446)
* Added german_gaming keymap for hidtech/bastyl

* Apply suggestions from code review

* Added missing brace
2021-02-10 11:05:20 -08:00
stanrc85
7ef4aba52c Userspace updates (#11841)
* enable LTO for smaller firmware size

* delete since this was added to userspace rules.mk

* readme updates and new images

* Add -j to compile and flash commands in userpsace

* Enable NKRO

* Enable NKRO, VIA, LTO by default

* Stanrc85-ansi readme update

* Stanrc85-alice readme

* quick RGB layer indicator fix in keymap
2021-02-10 09:21:46 -05:00
Spaceman
0aed8746be [Keyboard] Add keyboard yun65 (#11714) 2021-02-09 21:18:53 -08:00
Mike Tsao
872f656c3b [Keyboard] Add sowbug/68keys and sowbug/ansi_tkl (#11589) 2021-02-09 20:45:42 -08:00
LSChyi
fb9f619d89 Play Keyboard Helen 80: fix matrix mapping (#11585) 2021-02-09 17:58:59 -08:00
Konstantin Shpits
955eb58af5 Fix VENDOR_ID for ymd67 (#11838) 2021-02-10 09:40:16 +11:00
Nicolas Schodet
7d5902752e [Keyboard] Add Splitty keyboard (#11613) 2021-02-09 09:10:54 -08:00
Jay Greco
4107856b70 Simplify NIBBLE encoder code and clean up keymaps (#11808)
* Simplify encoder code and clean up keymaps.

-Removed overly complex VIA encoder code. It wasn't adding any value and was confusing users who were trying to customize encoder functionality on VIA keymaps.
-Replaced KC_TILDE with KC_HOME in all keymaps, as KC_TILDE sends a left shift, which was confusing some folks as they tested their build.
-Move layer names to enum

* Change encoder_update_kb to encoder_update_user per PR feedback
2021-02-09 14:50:16 +00:00
Sergey Vlasov
627ceebef3 ws2812: Fix number of nops for AVR at 8 MHz (#9559)
* ws2812: Fix number of nops for AVR at 8 MHz

When trying to calculate the number of nops for AVR running at 8 MHz,
the value of `w3` is expected to be negative; however, because `F_CPU`
is defined in tmk_core/avr.mk with the `UL` suffix, the preprocessor
performs its calculations using `unsigned long`, getting a very large
positive number instead of the expected negative number; this then
results in generating code with a huge number of nops.  Fix the broken
calculations by performing a comparison before subtraction, so that the
unsigned number wraparound does not occur.

The keyboard which triggers the problem is `handwired/promethium`; the
buggy code silently compiles, but the resulting timings would be
completely wrong.

* ws2812: Clean up the code after the 8 MHz fix

Remove old code which was unsuccessfully trying to clamp negative w1, w2
and w3 values to 0, and set w1_nops, w2_nops and w3_nops directly.
2021-02-09 08:33:04 +11:00
Ryan
d2f204c1e3 Fix RGBLIGHT_LIMIT_VAL typo (#11826) 2021-02-08 20:12:33 +11:00
239 changed files with 12065 additions and 2716 deletions

View File

@@ -22,11 +22,6 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c
KEYBOARD_ENABLE ?= yes
ifeq ($(strip $(KEYBOARD_ENABLE)), yes)
OPT_DEFS += -DKEYBOARD_ENABLE
endif
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
CONSOLE_ENABLE = yes
@@ -181,7 +176,6 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
endif
endif
LED_MATRIX_ENABLE ?= no
VALID_LED_MATRIX_TYPES := IS31FL3731 custom
# TODO: IS31FL3733 IS31FL3737 IS31FL3741
@@ -605,8 +599,3 @@ endif
ifeq ($(strip $(JOYSTICK_ENABLE)), digital)
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
endif
ifeq ($(strip $(SWITCH_CONTROLLER_ENABLE)), yes)
OPT_DEFS += -DSWITCH_CONTROLLER_ENABLE
OPT_DEFS += -DGAMEPAD_ENABLE
endif

View File

@@ -39,7 +39,7 @@ Not all keycodes below will work depending on which haptic mechanism you have ch
First you will need a build a circuit to drive the solenoid through a mosfet as most MCU will not be able to provide the current needed to drive the coil in the solenoid.
[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
[Wiring diagram provided by Adafruit](https://cdn-shop.adafruit.com/product-files/412/solenoid_driver.pdf)
| Settings | Default | Description |

View File

@@ -10,9 +10,11 @@ If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_r
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
LED_MATRIX_ENABLE = yes
LED_MATRIX_DRIVER = IS31FL3731
```make
LED_MATRIX_ENABLE = yes
LED_MATRIX_DRIVER = IS31FL3731
```
You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
| Variable | Description | Default |
@@ -20,7 +22,7 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>
| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages | 100 |
| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
| `LED_DRIVER_LED_COUNT` | (Required) How many LED lights are present across all drivers | |
| `DRIVER_LED_TOTAL` | (Required) How many LED lights are present across all drivers | |
| `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | |
| `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | |
| `LED_DRIVER_ADDR_3` | (Optional) Address for the third LED driver | |
@@ -28,33 +30,38 @@ You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>
Here is an example using 2 drivers.
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
// 0b1110100 AD <-> GND
// 0b1110111 AD <-> VCC
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define LED_DRIVER_ADDR_1 0b1110100
#define LED_DRIVER_ADDR_2 0b1110110
```c
// This is a 7-bit address, that gets left-shifted and bit 0
// set to 0 for write, 1 for read (as per I2C protocol)
// The address will vary depending on your wiring:
// 0b1110100 AD <-> GND
// 0b1110111 AD <-> VCC
// 0b1110101 AD <-> SCL
// 0b1110110 AD <-> SDA
#define LED_DRIVER_ADDR_1 0b1110100
#define LED_DRIVER_ADDR_2 0b1110110
#define LED_DRIVER_COUNT 2
#define LED_DRIVER_1_LED_COUNT 25
#define LED_DRIVER_2_LED_COUNT 24
#define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
#define LED_DRIVER_COUNT 2
#define LED_DRIVER_1_LED_COUNT 25
#define LED_DRIVER_2_LED_COUNT 24
#define DRIVER_LED_TOTAL LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
```
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations.
Define these arrays listing all the LEDs in your `<keyboard>.c`:
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
* | | */
{0, C3_3},
....
}
```c
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
* | | */
{ 0, C1_1 },
{ 0, C1_15 },
// ...
}
```
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
@@ -66,26 +73,28 @@ All LED matrix keycodes are currently shared with the [backlight system](feature
Currently no LED matrix effects have been created.
## Custom layer effects
## Custom Layer Effects
Custom layer effects can be done by defining this in your `<keyboard>.c`:
void led_matrix_indicators_kb(void) {
led_matrix_set_index_value(index, value);
}
```c
void led_matrix_indicators_kb(void) {
led_matrix_set_index_value(index, value);
}
```
A similar function works in the keymap as `led_matrix_indicators_user`.
## Suspended state
## Suspended State
To use the suspend feature, add this to your `<keyboard>.c`:
void suspend_power_down_kb(void)
{
led_matrix_set_suspend_state(true);
}
```c
void suspend_power_down_kb(void) {
led_matrix_set_suspend_state(true);
}
void suspend_wakeup_init_kb(void)
{
led_matrix_set_suspend_state(false);
}
void suspend_wakeup_init_kb(void) {
led_matrix_set_suspend_state(false);
}
```

155
docs/ja/adc_driver.md Normal file
View File

@@ -0,0 +1,155 @@
# ADC ドライバ
<!---
original document: 0.10.52:docs/adc_driver.md
git diff 0.10.52 HEAD -- docs/adc_driver.md | cat
-->
QMK は対応している MCU のアナログ・デジタルコンバータADC) を使用し、特定のピンの電圧を計測することができます。この機能はデジタル出力の[ロータリーエンコーダ](ja/feature_encoders.md)などではなく、アナログ計測が必要な可変抵抗器を使用したボリュームコントロールや Bluetooth キーボードのバッテリー残量表示などの実装に役立ちます。
このドライバは現在 AVR と一部の ARM デバイスをサポートしています。返される値は 0V と VCC (通常 AVR の場合は 5V または 3.3V、ARM の場合は 3.3V)の間でマッピングされた 10ビットの整数 (0-1023) ですが、ARM の場合、もしもより精度が必要であれば `#define` を使うと操作をより柔軟に制御できます。
## 使い方
このドライバを使うには、`rules.mk` に以下を追加します:
```make
SRC += analog.c
```
そして、コードの先頭に以下の include を置きます:
```c
#include "analog.h"
```
## チャンネル
### AVR
|Channel|AT90USB64/128|ATmega16/32U4|ATmega32A|ATmega328/P|
|-------|-------------|-------------|---------|-----------|
|0 |`F0` |`F0` |`A0` |`C0` |
|1 |`F1` |`F1` |`A1` |`C1` |
|2 |`F2` | |`A2` |`C2` |
|3 |`F3` | |`A3` |`C3` |
|4 |`F4` |`F4` |`A4` |`C4` |
|5 |`F5` |`F5` |`A5` |`C5` |
|6 |`F6` |`F6` |`A6` |* |
|7 |`F7` |`F7` |`A7` |* |
|8 | |`D4` | | |
|9 | |`D6` | | |
|10 | |`D7` | | |
|11 | |`B4` | | |
|12 | |`B5` | | |
|13 | |`B6` | | |
<sup>\* ATmega328/P には余分な2つの ADC チャンネルがありますが、DIP ピンアウトには存在せず、GPIO ピンとは共有されません。これらに直接アクセスするために、`adc_read()` を使えます。
### ARM
これらのピンの一部は同じチャンネルを使って ADC 上でダブルアップされることに注意してください。これは、これらのピンがどちらかの ADC に使われる可能性があるからです。
また、F0 と F3 は異なるナンバリングスキーマを使うことに注意してください。F0 には1つの ADC があり、チャンネルは0から始まるインデックスですが、F3 には4つの ADC があり、チャンネルは1から始まるインデックスです。これは、F0 が ADC の `ADCv1` 実装を使用するのに対し、F3 が `ADCv3` 実装を使用するためです。
|ADC|Channel|STM32F0xx|STM32F3xx|
|---|-------|---------|---------|
|1 |0 |`A0` | |
|1 |1 |`A1` |`A0` |
|1 |2 |`A2` |`A1` |
|1 |3 |`A3` |`A2` |
|1 |4 |`A4` |`A3` |
|1 |5 |`A5` |`F4` |
|1 |6 |`A6` |`C0` |
|1 |7 |`A7` |`C1` |
|1 |8 |`B0` |`C2` |
|1 |9 |`B1` |`C3` |
|1 |10 |`C0` |`F2` |
|1 |11 |`C1` | |
|1 |12 |`C2` | |
|1 |13 |`C3` | |
|1 |14 |`C4` | |
|1 |15 |`C5` | |
|1 |16 | | |
|2 |1 | |`A4` |
|2 |2 | |`A5` |
|2 |3 | |`A6` |
|2 |4 | |`A7` |
|2 |5 | |`C4` |
|2 |6 | |`C0` |
|2 |7 | |`C1` |
|2 |8 | |`C2` |
|2 |9 | |`C3` |
|2 |10 | |`F2` |
|2 |11 | |`C5` |
|2 |12 | |`B2` |
|2 |13 | | |
|2 |14 | | |
|2 |15 | | |
|2 |16 | | |
|3 |1 | |`B1` |
|3 |2 | |`E9` |
|3 |3 | |`E13` |
|3 |4 | | |
|3 |5 | | |
|3 |6 | |`E8` |
|3 |7 | |`D10` |
|3 |8 | |`D11` |
|3 |9 | |`D12` |
|3 |10 | |`D13` |
|3 |11 | |`D14` |
|3 |12 | |`B0` |
|3 |13 | |`E7` |
|3 |14 | |`E10` |
|3 |15 | |`E11` |
|3 |16 | |`E12` |
|4 |1 | |`E14` |
|4 |2 | |`B12` |
|4 |3 | |`B13` |
|4 |4 | |`B14` |
|4 |5 | |`B15` |
|4 |6 | |`E8` |
|4 |7 | |`D10` |
|4 |8 | |`D11` |
|4 |9 | |`D12` |
|4 |10 | |`D13` |
|4 |11 | |`D14` |
|4 |12 | |`D8` |
|4 |13 | |`D9` |
|4 |14 | | |
|4 |15 | | |
|4 |16 | | |
## 関数
### AVR
|関数 |説明 |
|----------------------------|------------------------------------------------------------------------------------------------------------------------------------|
|`analogReference(mode)` |アナログの電圧リファレンスソースを設定する。`ADC_REF_EXTERNAL``ADC_REF_POWER``ADC_REF_INTERNAL` のいずれかでなければなりません。|
|`analogReadPin(pin)` |指定されたピンから値を読み取ります。例えば、ATmega32U4 の ADC6 の場合 `F6`。 |
|`pinToMux(pin)` |指定されたピンを mux 値に変換します。サポートされていないピンが指定された場合、"0V (GND)" の mux 値を返します。 |
|`adc_read(mux)` |指定された mux に従って ADC から値を読み取ります。詳細は、MCU のデータシートを見てください。 |
### ARM
|関数 |説明 |
|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`analogReadPin(pin)` |指定されたピンから値を読み取ります。STM32F0 では チャンネル 0 の `A0`、STM32F3 ではチャンネル 1 の ADC1。ピンを複数の ADC に使える場合は、この関数のために番号の小さい ADC が選択されることに注意してください。例えば、`C0` は、ADC2 にも使える場合、ADC1 のチャンネル 6 になります。 |
|`analogReadPinAdc(pin, adc)`|指定されたピンと ADC から値を読み取ります。例えば、`C0, 1` は、ADC1 ではなく ADC2 のチャンネル 6 から読み取ります。この関数では、ADC はインデックス 0 から始まることに注意してください。 |
|`pinToMux(pin)` |指定されたピンをチャンネルと ADC の組み合わせに変換します。サポートされていないピンが指定された場合、"0V (GND)" の mux 値を返します。 |
|`adc_read(mux)` |指定されたピンと ADC の組み合わせに応じて ADC から値を読み取ります。詳細は、MCU のデータシートを見てください。 |
## 設定
## ARM
ADC の ARM 実装には、独自のキーボードとキーマップでオーバーライドして動作方法を変更できる幾つかの追加オプションがあります。利用可能なオプションの詳細については、特定のマイクロコントローラについて ChibiOS の対応する `hal_adc_lld.h` を調べてください。
|`#define` |型 |既定値 |説明 |
|---------------------|------|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|`ADC_CIRCULAR_BUFFER`|`bool`|`false` |`true` の場合、この実装は循環バッファを使います。 |
|`ADC_NUM_CHANNELS` |`int` |`1` |ADC 動作の一部としてスキャンされるチャンネル数を設定します。現在の実装は `1` のみをサポートします。 |
|`ADC_BUFFER_DEPTH` |`int` |`2` |各結果の深さを設定します。デフォルトでは12ビットの結果しか取得できないため、これを2バイトに設定して1つの値を含めることができます。8ビット以下の結果を選択した場合は、これを 1 に設定できます。 |
|`ADC_SAMPLING_RATE` |`int` |`ADC_SMPR_SMP_1P5` |ADC のサンプリングレートを設定します。デフォルトでは、最も速い設定に設定されています。 |
|`ADC_RESOLUTION` |`int` |`ADC_CFGR1_RES_12BIT`|結果の分解能。デフォルトでは12ビットを選択しますが、12、10、8、6ビットを選択できます。 |

View File

@@ -25,7 +25,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
| `ISSI_TIMEOUT` | (オプション) i2c メッセージを待つ時間 | 100 |
| `ISSI_PERSISTENCE` | (オプション) 失敗したメッセージをこの回数再試行する | 0 |
| `LED_DRIVER_COUNT` | (必須) LED ドライバ IC の数 | |
| `LED_DRIVER_LED_COUNT` | (必須) 全てのドライバの LED ライトの数 | |
| `DRIVER_LED_TOTAL` | (必須) 全てのドライバの LED ライトの数 | |
| `LED_DRIVER_ADDR_1` | (必須) 最初の LED ドライバのアドレス | |
| `LED_DRIVER_ADDR_2` | (オプション) 2番目の LED ドライバのアドレス | |
| `LED_DRIVER_ADDR_3` | (オプション) 3番目の LED ドライバのアドレス | |
@@ -46,7 +46,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED
#define LED_DRIVER_COUNT 2
#define LED_DRIVER_1_LED_COUNT 25
#define LED_DRIVER_2_LED_COUNT 24
#define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
#define DRIVER_LED_TOTAL LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
現在、2つのドライバのみがサポートされますが、4つの組み合わせ全てをサポートすることは簡単です。

277
docs/ja/feature_unicode.md Normal file
View File

@@ -0,0 +1,277 @@
# Unicode サポート
<!---
original document: 0.10.53:docs/feature_unicode.md
git diff 0.10.53 HEAD -- docs/feature_unicode.md | cat
-->
Unicode 文字はキーボードから直接入力することができます!ただし幾つかの制限があります。
キーボードで Unicode サポートを有効にするには、以下の事をする必要があります:
1. サポートされている Unicode 実装のいずれかを選択します: [Basic Unicode](#basic-unicode)、[Unicode Map](#unicode-map)、[UCIS](#ucis)。
2. オペレーティングシステムとセットアップに最適な[入力モード](#input-modes)を見つけます。
3. コンフィギュレーションに適切な入力モード(または複数のモード)を[設定](#setting-the-input-mode)します。
4. キーマップに Unicode キーコードを追加します。
## 1. メソッド :id=methods
QMK は、Unicode 入力を有効にし、キーマップに Unicode 文字を追加するための3つの異なる方法をサポートします。それぞれに柔軟性と使いやすさの点で長所と短所があります。あなたの使い方に最適なものを選んでください。
ほとんどのユーザには Basic Unicode で十分です。ただし、サポートされる文字の範囲が広い(絵文字、珍しい記号など)ことが必要な場合には、Unicode Map を使う必要があります。
<br>
### 1.1. Basic Unicode :id=basic-unicode
多少制限はありますが、最も使いやすい方法です。Unicode 文字をキーコードとしてキーマップ自体に格納するため、`0x7FFF` までのコードポイントのみをサポートします。これは、ほとんどの現代言語(東アジアを含む)の文字と記号を対象としますが、絵文字は対象外です。
以下を `rules.mk` に追加します:
```make
UNICODE_ENABLE = yes
```
次に、`UC(c)` キーコードをキーマップに追加します。ここで、_c_ は目的の文字のコードポイントです (できれば16進数で最大4桁の長さが望ましいです)。例えば、`UC(0x40B)` は [Ћ](https://unicode-table.com/en/040B/) を出力し、`UC(0x30C4)` は [](https://unicode-table.com/en/30C4) を出力します。
<br>
### 1.2. Unicode Map :id=unicode-map
このメソッドは、標準の文字の範囲に加えて、絵文字、古代文字、珍しい記号なども対象にしています。実際、可能な全てのコードポイント(`0x10FFFF`まで)がサポートされています。Unicode 文字は独立のマッピングテーブルに格納されています。キーマップファイルに `unicode_map` 配列を維持する必要があります。これには最大 16384 エントリを含めることができます。
以下を `rules.mk` に追加します:
```make
UNICODEMAP_ENABLE = yes
```
次に、`X(i)` キーコードをキーマップに追加します。ここで _i_ はマッピングテーブル内の目的の文字のインデックスです。これは数値にできますが、インデックスを列挙型に保持し、名前でアクセスすることをお勧めします。
```c
enum unicode_names {
BANG,
IRONY,
SNEK
};
const uint32_t PROGMEM unicode_map[] = {
[BANG] = 0x203D, // ‽
[IRONY] = 0x2E2E, // ⸮
[SNEK] = 0x1F40D, // 🐍
};
```
そして、キーマップで `X(BANG)``X(SNEK)` などを使うことができます。
#### 小文字と大文字
文字は å や Å のような小文字と大文字のペアで提供されることがあります。これらの文字を入力しやすくするために、キーマップで `XP(i, j)` を使うことができます。ここで、_i_ および _j_ はそれぞれ小文字と大文字のマッピングテーブルのインデックスです。キーを押した時に、シフトを押したままか Caps Lock をオンにしている場合は、2番目(大文字)の文字が挿入されます; そうでなければ最初(小文字)バージョンが出力されます。
これは特殊文字がある国際レイアウトのためのキーマップを作成している時に最も役立ちます。別々のキーに文字の小文字および大文字バージョンを置く代わりに、`XP()` を使ってそれら両方を同じキーに持つことができます。これは Unicode キーを通常のアルファベットと混ぜるのに役立ちます。
キーコードのサイズの制約により、_i_ と _j_ はそれぞれ `unicode_map` の最初の128文字のうち1つだけを参照できます。別の言い方をすると、0 ≤ _i_ ≤ 127 かつ 0 ≤ _j_ ≤ 127 です。これはほとんどのユースケースで十分ですが、インデックス計算をカスタマイズしたい場合は、[`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L36) 関数をオーバーライドすることができます。これにより、例えば Shift/Caps の代わりに Ctrl をチェックすることもできます。
<br>
### 1.3. UCIS :id=ucis
この方法も全ての可能なコードポイントをサポートします。Unicode Map の方法と同様に、キーマップファイル内にマッピングテーブルを保持する必要があります。ただし、この機能のための組み込みのキーコードはありません — この機能を起動するカスタムキーコードあるいは関数を作成する必要があります。
以下を `rules.mk` に追加します:
```make
UCIS_ENABLE = yes
```
次に、キーマップファイルでこのようにテーブルを定義します:
```c
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
UCIS_SYM("poop", 0x1F4A9), // 💩
UCIS_SYM("rofl", 0x1F923), // 🤣
UCIS_SYM("cuba", 0x1F1E8, 0x1F1FA), // 🇨🇺
UCIS_SYM("look", 0x0CA0, 0x005F, 0x0CA0), // ಠ_ಠ
);
```
デフォルトでは、各テーブルエントリの長さは、最大3コードポイントです。この番号は `#define UCIS_MAX_CODE_POINTS n``config.h` ファイルに追加することで変更できます。
UCIS 入力を使うには、`qk_ucis_start()` を呼び出します。次に、文字のニーモニック ("rofl" など) を入力し、Space か Enter か Esc を押します。QMK は "rofl" テキストを消去し、笑っている絵文字を挿入するはずです。
#### カスタマイズ
この機能をカスタマイズするためにキーマップで定義できる幾つかの関数があります。
* `void qk_ucis_start_user(void)` これは "start" 関数を呼び出す時に実行され、フィードバックを提供するために使うことができます。デフォルトでは、キーボードの絵文字を入力します。
* `void qk_ucis_success(uint8_t symbol_index)` これは入力が何かに一致して完了した時に実行されます。デフォルトでは何もしません。
* `void qk_ucis_symbol_fallback (void)` これは入力が何にも一致しない時に実行されます。デフォルトでは、入力を Unicode コードとして試そうとします。
[`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c) でこれらの関数のデフォルトの実装を見つけることができます。
## 2. Input モード :id=input-modes
QMK での Unicode の入力は、マクロのように、OS への一連の文字列を入力することで動作します。残念ながら、これが行われる方法はプラットフォームによって異なります。特に各プラットフォームでは Unicode 入力を引き起こすために、異なるキーの組み合わせが必要です。従って、対応する入力モードが QMK で設定されなければなりません。
以下の入力モードが利用可能です:
* **`UC_MAC`**: macOS の組み込み Unicode 16進数入力。`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
有効にするには、_システム環境設定 > キーボード > 入力ソース_ に移動し、(_その他_ の下の) _Unicode 16進数入力_ をリストに追加し、次にメニューバーの入力ドロップダウンからそれをアクティブにします。
デフォルトでは、このモードは Unicode 入力のために左 Option キー (`KC_LALT`) を使いますが、これは他のキーで [`UNICODE_KEY_MAC`](#input-key-configuration) を定義することで変更できます。
!> _Unicode 16進数入力_ 入力ソースの使用は、Option + 左矢印および Option + 右矢印 のような、幾つかの Option ベースのショートカットを無効にするかもしれません。
!> `UC_OSX``UC_MAC` の非推奨のエイリアスで、QMK の将来のバージョンで削除されます。全ての新しいキーマップは、`UC_MAC` を使うべきです。
* **`UC_LNX`**: Linux の組み込み IBus Unicode 入力。`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
デフォルトで有効になっていて、IBus が有効になったディストリビューションのほとんどどれでも動作します。IBus が無い場合、このモードは GTK アプリ下で動作しますが、他の場所ではほとんど動作しません。
デフォルトでは、このモードは Unicode 入力を開始するために Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) を使いますが、これは他のキーコードで [`UNICODE_KEY_LNX`](#input-key-configuration) を定義することで変更できます。これは、Ctrl+Shift+U の挙動が Ctrl+Shift+E に統合された IBus バージョン 1.5.15 以上を必要とするかもしれません。
* **`UC_WIN`**: _(非推奨)_ Windows の組み込み16進数テンキー Unicode 入力。`0xFFFF` までのコードポイントをサポートします。
有効にするには、`HKEY_CURRENT_USER\Control Panel\Input Method` の下に、`EnableHexNumpad` という名前の `REG_SZ` 型のレジストリキーを作成し、その値を `1` に設定します。これは、管理者権限でコマンドラインプロンプトから `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` を実行することでできます。その後再起動します。
信頼性と互換性の問題から、このモードはお勧めできません; 代わりに `UC_WINC` モードを使ってください。
* **`UC_BSD`**: _(未実装)_ BSD での Unicode 入力。現時点では実装されていません。BSD ユーザでサポートを追加したい場合は、[GitHub で issue を開いて](https://github.com/qmk/qmk_firmware/issues)ください。
* **`UC_WINC`**: [WinCompose](https://github.com/samhocevar/wincompose) を使った Windows Unicode 入力。v0.9.0 の時点で、`0x10FFFF` までのコードポイント(全ての利用可能なコードポイント)をサポートします。
有効にするには、[最新のリリース](https://github.com/samhocevar/wincompose/releases/latest)をインストールします。インストールすると、起動時に WinCompose が自動的に実行されます。このモードはアプリがサポートする全てのバージョンの Windows で確実に動作します。
デフォルトでは、このモードは Compose キーとして右 Alt (`KC_RALT`) を使いますが、これは WinCompose 設定と他のキーで [`UNICODE_KEY_WINC`](#input-key-configuration) を定義することで変更できます。
## 3. 入力モードの設定 :id=setting-the-input-mode
目的の入力モードを設定するには、以下の定義を `config.h` に追加します:
```c
#define UNICODE_SELECTED_MODES UC_LNX
```
この例では、キーボードのデフォルトの入力モードを `UC_LNX` に設定します。これは、`UC_MAC``UC_WINC` か[上記](#input-modes)に列挙されている他のモードのいずれかに置き換えることができます。手動で別のモード([下記](#keycodes)を見てください)に切り替えない限り、キーボードは起動時に選択したモードを自動的に使います。
複数の入力モードを選択することもできます。これにより、`UC_MOD`/`UC_RMOD` キーコードを使ってそれらを簡単に切り替えることができます。
```c
#define UNICODE_SELECTED_MODES UC_MAC, UC_LNX, UC_WINC
```
値はカンマで区切られていることに注意してください。キーボードは最後に使われた入力モードを記憶し、次の電源投入時にそれを使い続けます。`config.h``#define UNICODE_CYCLE_PERSIST false` を追加することで、これを無効にして常にリストの最初のモードで開始するように強制できます。
#### キーコード
以下のキーコードを使って、いつでも入力モードを切り替えることができます。これらをキーマップに追加すると、`UNICODE_SELECTED_MODES` に列挙されていないモードを含む特定の入力モードに素早く切り替えることができます。
| キーコード |エイリアス | 入力モード | 説明 |
|------------------------|-----------|--------------|--------------------------------------------------------------------|
| `UNICODE_MODE_FORWARD` | `UC_MOD` | リストの次へ | 選択したモードを切り替えます。Shift が押された場合は逆方向 |
| `UNICODE_MODE_REVERSE` | `UC_RMOD` | リストの前へ | 逆方向に選択したモードを切り替えます。Shift が押された場合は順方向 |
| `UNICODE_MODE_MAC` | `UC_M_MA` | `UC_MAC` | macOS 入力に切り替え |
| `UNICODE_MODE_LNX` | `UC_M_LN` | `UC_LNX` | Linux 入力に切り替え |
| `UNICODE_MODE_WIN` | `UC_M_WI` | `UC_WIN` | Windows 入力に切り替え |
| `UNICODE_MODE_BSD` | `UC_M_BS` | `UC_BSD` | BSD 入力に切り替え _(未実装)_ |
| `UNICODE_MODE_WINC` | `UC_M_WC` | `UC_WINC` | WinCompose を使う Windows 入力に切り替え |
コード内で `set_unicode_input_mode(x)` を呼び出すことで、入力モードを切り替えることもできます。ここで、_x_ は上記の入力モード定数のいずれか (例えば、`UC_LNX`) です。
?> `matrix_init_user()` または同様の関数の中で `set_unicode_input_mode()` を呼び出すよりも、`UNICODE_SELECTED_MODES` を使うほうが望ましいです。Unicode システムとの統合性が高く、EEPROM への不要な書き込みを回避できるという利点があるからです。
#### オーディオフィードバック
キーボードで[オーディオ機能](ja/feature_audio.md)を有効にした場合、上記のキーを押したときにメロディーを再生するように設定できます。そのようにして、入力モードを切り替えた時になんらかのオーディオフィードバックを得ることができます。
例えば、`config.h` ファイルに下記の定義を追加することができます:
```c
#define UNICODE_SONG_MAC AUDIO_ON_SOUND
#define UNICODE_SONG_LNX UNICODE_LINUX
#define UNICODE_SONG_BSD TERMINAL_SOUND
#define UNICODE_SONG_WIN UNICODE_WINDOWS
#define UNICODE_SONG_WINC UNICODE_WINDOWS
```
## 追加のカスタマイズ
Unicode は大規模で多目的な機能のため、システムでより適切に動作するようにカスタマイズできるオプションが幾つかあります。
### 入力関数の開始と終了
プラットフォームで Unicode 入力を開始および終了する機能は、ローカルで上書きできます。可能な用途には、デフォルトキーを使用しない場合の入力モードの挙動のカスタマイズ、あるいは Unicode 入力への視覚/音声フィードバックの追加があります。
* `void unicode_input_start(void)` これはプラットフォームに Unicode 入力モードの入力を指示する初期シーケンスを送信します。例えば、Windows では左 Alt キーの後に Num+ を押したままにし、Linux では `UNICODE_KEY_LNX` の組み合わせ(デフォルト: Ctrl+Shift+U) を押します。
* `void unicode_input_finish(void)` これは、例えば Space を押すか Alt キーを放すなどして、Unicode 入力モードを終了するために呼ばれます。
[`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c) でこれらの関数のデフォルトの実装を見つけることができます。
### 入力キーの設定
`config.h` に対応する定義を追加することで、macOS、Linux、WinCompose で Unicode 入力を引き起こすために使われるキーをカスタマイズできます。デフォルト値はプラットフォームのデフォルト設定に一致するため、Unicode 入力が動作しない、あるいは(例えば左あるいは右 Alt を解放するために)異なるキーを使いたい場合以外はこれを変更する必要はありません。
| 定義 | 型 | 既定値 | 例 |
|--------------------|------------|--------------------|---------------------------------------------|
| `UNICODE_KEY_MAC` | `uint8_t` | `KC_LALT` | `#define UNICODE_KEY_MAC KC_RALT` |
| `UNICODE_KEY_LNX` | `uint16_t` | `LCTL(LSFT(KC_U))` | `#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))` |
| `UNICODE_KEY_WINC` | `uint8_t` | `KC_RALT` | `#define UNICODE_KEY_WINC KC_RGUI` |
## Unicode 文字列の送信
QMK は、Unicode 入力をプログラムでホストに送信できるようにする幾つかの関数を提供します:
### `send_unicode_string()`
この関数は、`send_string()` によく似ていますが、UTF-8 文字を直接入力できます。選択された入力モードでもサポートされている場合は、全てのコードポイントをサポートします。`keymap.c` ファイルが UTF-8 エンコーディングを使ってフォーマットされていることを確認してください。
```c
send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
```
使用例には、[Macros](ja/feature_macros.md) で説明されているように、キーが押された時に Unicode 文字列を送信することが含まれます。
### `send_unicode_hex_string()`
`send_unicode_string()` に似ていますが、文字は Unicode コードポイントで表され、16進数で記述され、空白で区切られています。例えば、上記のちゃぶ台返しは以下で表されます:
```c
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
```
[このサイト](https://r12a.github.io/app-conversion/)で結果を "Hex/UTF-32" で受け取ることで、Unicode 文字列をこの形式に簡単に変換できます。
## 追加の言語サポート
`quantum/keymap_extras` には、様々な言語ファイルがあります — これらは Colemak または BÉPO のような代替レイアウトのファイルと同じように動作します。これらの言語ヘッダのいずれかを `#include` すると、その言語/国のレイアウトに固有のキーコードにアクセスできます。このようなキーコードは、2文字の国/言語コードの後に、アンダースコアとキーが対応する4文字の略語が続くことで定義されます。例えば、キーマップに `keymap_french.h` を含め、`FR_UGRV` を使うと、ネイティブのフランス語 AZERTY レイアウトを使うシステムで入力すると、`ù` が出力されます。
マシンで使うプライマリシステムレイアウトが US ANSI と異なる場合、これらの言語固有のキーコードを使うと、QMK キーマップが実際に画面に出力されるものとより一致するようになります。ただし、これらのキーコードは、内部の対応するデフォルトの US キーコードのエイリアスに過ぎず、キーボードで使われる HID プロトコル自体は本質的に US ANSI に基づいていることに注意してください。
## Windows での国際文字
### AutoHotkey
この方法はキーボード自体で Unicode サポートを必要としませんが、代わりにバックグラウンドで [AutoHotkey](https://autohotkey.com) が実行されていることを当てにします。
最初にプログラムで使われていないモディファイアの組み合わせを選択する必要があります。
Ctrl+Alt+Win はあまり広く使われていないため、これに最適なはずです。
mod-tab コンボ `LCAG_T` 用に定義されたマクロがあります。
この mod-tab マクロをキーボードのキーに追加します。例えば: `LCAG_T(KC_TAB)`
これにより、キーを押してすぐ放すとキーはタブキーのように振る舞いますが、他のキーと一緒に使うとモディファイアに変わります。
AutoHotkey のデフォルトのスクリプトで、カスタムホットキーを定義できます。
<^<!<#a::Send, ä
<^<!<#<+a::Send, Ä
上のホットキーは、CtrlAltGui と CtrlAltGuiShift + 文字 a の組み合わせです。
この組み合わせが押されると、AutoHotkey は `Send, ` の右側にあるテキストを挿入します。
### 米国インターナショナル
システム上で米国インターナショナルレイアウトを有効にすると、文字にアクセントをつけるために区切り文字を使います。例えば、"\`a" は à になります。
これを有効にする方法は[ここ](https://support.microsoft.com/en-us/help/17424/windows-change-keyboard-layout)で見つかります。

View File

@@ -93,7 +93,7 @@ And to do so, add `reset_keyboard()` to your function or macro, and this will re
## Wiping the EEPROM (Persistent Storage)
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). Bootmagic is one way to do this, but if that isn't enabled, then you can use a custom macro to do so.
If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EEP_RST` keycode](quantum_keycodes.md) or [Bootmagic](feature_bootmagic.md) functionality. If neither of those are an option, then you can use a custom macro to do so.
To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default.

View File

@@ -67,19 +67,27 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) {
#define w_onecycles (((F_CPU / 1000) * w_onepulse + 500000) / 1000000)
#define w_totalcycles (((F_CPU / 1000) * w_totalperiod + 500000) / 1000000)
// w1 - nops between rising edge and falling edge - low
#define w1 (w_zerocycles - w_fixedlow)
// w2 nops between fe low and fe high
#define w2 (w_onecycles - w_fixedhigh - w1)
// w3 nops to complete loop
#define w3 (w_totalcycles - w_fixedtotal - w1 - w2)
#if w1 > 0
# define w1_nops w1
// w1_nops - nops between rising edge and falling edge - low
#if w_zerocycles >= w_fixedlow
# define w1_nops (w_zerocycles - w_fixedlow)
#else
# define w1_nops 0
#endif
// w2_nops - nops between fe low and fe high
#if w_onecycles >= (w_fixedhigh + w1_nops)
# define w2_nops (w_onecycles - w_fixedhigh - w1_nops)
#else
# define w2_nops 0
#endif
// w3_nops - nops to complete loop
#if w_totalcycles >= (w_fixedtotal + w1_nops + w2_nops)
# define w3_nops (w_totalcycles - w_fixedtotal - w1_nops - w2_nops)
#else
# define w3_nops 0
#endif
// The only critical timing parameter is the minimum pulse length of the "0"
// Warn or throw error if this timing can not be met with current F_CPU settings.
#define w_lowtime ((w1_nops + w_fixedlow) * 1000000) / (F_CPU / 1000)
@@ -90,18 +98,6 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) {
# warning "Please consider a higher clockspeed, if possible"
#endif
#if w2 > 0
# define w2_nops w2
#else
# define w2_nops 0
#endif
#if w3 > 0
# define w3_nops w3
#else
# define w3_nops 0
#endif
#define w_nop1 "nop \n\t"
#define w_nop2 "rjmp .+0 \n\t"
#define w_nop4 w_nop2 w_nop2

View File

@@ -186,7 +186,7 @@ void IS31FL3731_init(uint8_t addr) {
}
void IS31FL3731_set_value(int index, uint8_t value) {
if (index >= 0 && index < LED_DRIVER_LED_COUNT) {
if (index >= 0 && index < DRIVER_LED_TOTAL) {
is31_led led = g_is31_leds[index];
// Subtract 0x24 to get the second index of g_pwm_buffer
@@ -196,7 +196,7 @@ void IS31FL3731_set_value(int index, uint8_t value) {
}
void IS31FL3731_set_value_all(uint8_t value) {
for (int i = 0; i < LED_DRIVER_LED_COUNT; i++) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
IS31FL3731_set_value(i, value);
}
}

View File

@@ -26,7 +26,7 @@ typedef struct is31_led {
uint8_t v;
} __attribute__((packed)) is31_led;
extern const is31_led g_is31_leds[LED_DRIVER_LED_COUNT];
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
void IS31FL3731_init(uint8_t addr);
void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);

View File

@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN B15
#define RGBLED_NUM 68
#define RGBLIGT_LIMIT_VAL 200
#define RGBLIGHT_LIMIT_VAL 200
#define RGBLIGHT_SLEEP
#define RGBLIGHT_ANIMATIONS

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2021 Quentin LEBASTARD <qlebastard@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 "bastylmini.h"

View File

@@ -0,0 +1,37 @@
/*
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
#define LAYOUT_split_3x6_3( \
k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \
k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \
k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \
k33, k34, k31, k71, k74, k73 \
)\
{\
{ k00, k01, k02, k03, k04, k05 }, \
{ k10, k11, k12, k13, k14, k15 }, \
{ k20, k21, k22, k23, k24, k25 }, \
{ KC_NO, k31, KC_NO, k33, k34, KC_NO }, \
{ k40, k41, k42, k43, k44, k45 }, \
{ k50, k51, k52, k53, k54, k55 }, \
{ k60, k61, k62, k63, k64, k65 }, \
{ KC_NO, k71, KC_NO, k73, k74, KC_NO }, \
}

View File

@@ -0,0 +1,47 @@
/*
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
#define VENDOR_ID 0xA8F8
#define PRODUCT_ID 0x1828
#define DEVICE_VER 0x0001
#define MANUFACTURER Bastard Keyboards
#define PRODUCT Bastyl Mini
#define MATRIX_ROWS 8
#define MATRIX_COLS 6
#define RGBLIGHT_LIMIT_VAL 180
#define MATRIX_ROW_PINS { B5, F7, F6, B6 }
#define MATRIX_COL_PINS { B4, E6, C6, B1, B3, B2 }
#define DIODE_DIRECTION ROW2COL
#define RGB_DI_PIN D2
#define RGBLED_NUM 42
#define RGBLED_SPLIT { 21, 21 }
#define RGBLIGHT_ANIMATIONS
#define DEBOUNCE 5
#define SOFT_SERIAL_PIN D0
#define LOCKING_SUPPORT_ENABLE
#define LOCKING_RESYNC_ENABLE
#define F_SCL 400000L
#define USB_POLLING_INTERVAL_MS 1
#define MASTER_RIGHT

View File

@@ -0,0 +1,55 @@
{
"keyboard_name": "Bastyl Mini",
"url": "https://www.bastardkb.com",
"maintainer": "Quentin Lebastard",
"width": 17,
"height": 4,
"layouts": {
"LAYOUT_split_3x6_3": {
"layout": [
{"label":"L00", "x":0, "y":0},
{"label":"L01", "x":1, "y":0},
{"label":"L02", "x":2, "y":0},
{"label":"L03", "x":3, "y":0},
{"label":"L04", "x":4, "y":0},
{"label":"L05", "x":5, "y":0},
{"label":"R00", "x":11, "y":0},
{"label":"R01", "x":12, "y":0},
{"label":"R02", "x":13, "y":0},
{"label":"R03", "x":14, "y":0},
{"label":"R04", "x":15, "y":0},
{"label":"R05", "x":16, "y":0},
{"label":"L10", "x":0, "y":1},
{"label":"L11", "x":1, "y":1},
{"label":"L12", "x":2, "y":1},
{"label":"L13", "x":3, "y":1},
{"label":"L14", "x":4, "y":1},
{"label":"L15", "x":5, "y":1},
{"label":"R10", "x":11, "y":1},
{"label":"R11", "x":12, "y":1},
{"label":"R12", "x":13, "y":1},
{"label":"R13", "x":14, "y":1},
{"label":"R14", "x":15, "y":1},
{"label":"R15", "x":16, "y":1},
{"label":"L20", "x":0, "y":2},
{"label":"L21", "x":1, "y":2},
{"label":"L22", "x":2, "y":2},
{"label":"L23", "x":3, "y":2},
{"label":"L24", "x":4, "y":2},
{"label":"L25", "x":5, "y":2},
{"label":"R20", "x":11, "y":2},
{"label":"R21", "x":12, "y":2},
{"label":"R22", "x":13, "y":2},
{"label":"R23", "x":14, "y":2},
{"label":"R24", "x":15, "y":2},
{"label":"R25", "x":16, "y":2},
{"label":"L33", "x":5, "y":3},
{"label":"L34", "x":6, "y":3},
{"label":"L31", "x":7, "y":3},
{"label":"R33", "x":9, "y":3},
{"label":"R34", "x":10, "y":3},
{"label":"R31", "x":11, "y":3}
]
}
}
}

View File

@@ -0,0 +1,70 @@
/*
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC , MO(1), MO(2), KC_ENT , KC_RALT
//`--------------------------' `--------------------------'
),
[1] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, _______, MO(3), KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
),
[2] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, MO(3), _______, KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
),
[3] = LAYOUT_split_3x6_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, _______, _______, KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
)
};

View File

@@ -0,0 +1,15 @@
# Bastyl Mini
A split, compact ergonomic keyboard.
* Keyboard Maintainer: [BastardKb](https://github.com/Bastardkb/)
* Hardware Supported: elite-C V4
* Hardware Availability: [Bastardkb.com](https://bastardkb.com/)
Make example for this keyboard (after setting up your build environment):
make bastardkb/bastylmini: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).
See the [keyboard build instructions](http://docs.bastardkb.com/)

View File

@@ -0,0 +1,31 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = 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
SPLIT_KEYBOARD = yes
TAP_DANCE_ENABLE = no
LTO_ENABLE = yes
AUDIO_SUPPORTED = no
RGB_MATRIX_SUPPORTED = no
RGBLIGHT_SUPPORTED = yes
LAYOUTS = split_3x6_3

View File

@@ -53,9 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
void rgb_matrix_indicators_user(void) {
uint8_t layer = get_highest_layer(layer_state);
switch (layer) {
case _QWERTY:
rgb_matrix_set_color(10, 0, 0, 0);
break;
case _FN1_60:
rgb_matrix_set_color(10, 0, 0, 255);
break;

View File

@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN B15
#define RGBLED_NUM 16
#define RGBLIGT_LIMIT_VAL 200
#define RGBLIGHT_LIMIT_VAL 200
#define RGBLIGHT_SLEEP
#define RGBLIGHT_ANIMATIONS

View File

@@ -132,4 +132,4 @@
#define I2C1_SDA 9
#define LED_DRIVER_COUNT 1
#define LED_DRIVER_LED_COUNT 71
#define DRIVER_LED_TOTAL 71

View File

@@ -18,164 +18,111 @@
#ifdef LED_MATRIX_ENABLE
#include "is31fl3731-simple.h"
const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = {
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
/* Refer to IS31 manual for these locations
* driver
* | LED address
* | | */
{0, C1_1}, // k00 KC_GESC
{0, C1_2}, // k01 KC_1
{0, C1_3}, // k02 KC_2
{0, C1_4}, // k03 KC_3
{0, C1_5}, // k04 KC_4
{0, C1_6}, // k05 KC_5
{0, C1_7}, // k06 KC_6
{0, C1_8}, // k07 KC_7
{0, C1_9}, // k50 KC_8
{0, C1_10}, // k51 KC_9
{0, C1_11}, // k52 KC_0
{0, C1_12}, // k53 KC_MINS
{0, C1_13}, // k54 KC_EQL
{0, C1_14}, // k55 KC_BSPC
{0, C1_15}, // k57 KC_PGUP
{0, C2_1}, // k10 KC_TAB
{0, C2_2}, // k11 KC_Q
{0, C2_3}, // k12 KC_W
{0, C2_4}, // k13 KC_E
{0, C2_5}, // k14 KC_R
{0, C2_6}, // k15 KC_T
{0, C2_7}, // k16 KC_Y
{0, C2_8}, // k17 KC_U
{0, C2_9}, // k60 KC_I
{0, C2_10}, // k61 KC_O
{0, C2_11}, // k62 KC_P
{0, C2_12}, // k63 KC_LBRC
{0, C2_13}, // k64 KC_RBRC
{0, C2_14}, // k65 KC_BSLS
{0, C2_15}, // k67 KC_PGDN
{0, C3_1}, // k20 KC_CAPS
{0, C3_2}, // k21 KC_A
{0, C3_3}, // k22 KC_S
{0, C3_4}, // k23 KC_D
{0, C3_5}, // k24 KC_F
{0, C3_6}, // k25 KC_G
{0, C3_7}, // k26 KC_H
{0, C3_8}, // k27 KC_J
{0, C3_9}, // k70 KC_K
{0, C3_10}, // k71 KC_L
{0, C3_11}, // k72 KC_SCLN
{0, C3_12}, // k73 KC_QUOT
{0, C3_14}, // k75 KC_ENT
{0, C4_1}, // k30 KC_LSFT
{0, C4_3}, // k32 KC_Z
{0, C4_4}, // k33 KC_X
{0, C4_5}, // k34 KC_C
{0, C4_6}, // k35 KC_V
{0, C4_7}, // k36 KC_B
{0, C4_8}, // k37 KC_N
{0, C4_9}, // k80 KC_M
{0, C4_10}, // k81 KC_COMM
{0, C4_11}, // k82 KC_DOT
{0, C4_12}, // k83 KC_SLSH
{0, C4_13}, // k85 KC_RSFT
{0, C4_14}, // k86 KC_UP
{0, C5_1}, // k40 KC_LCTL
{0, C5_2}, // k41 KC_LGUI
{0, C5_3}, // k42 KC_LALT
{0, C5_4}, // Unassociated between LALT and SPACE_2.75
{0, C5_5}, // k45 KC_SPC SPACE_2.75
{0, C5_6}, // k45 KC_SPC SPACE_6.75
{0, C5_7}, // k46 KC_SPC SPACE_2.25
{0, C5_8}, // Unassociated between SPACE_2.25 and SPACE_1.25
{0, C5_9}, // k90 KC_RGUI
{0, C5_10}, // k92 KC_RALT
{0, C5_11}, // k93 MO(_FL)
{0, C5_12}, // k94 KC_RCTL
{0, C5_13}, // k95 KC_LEFT
{0, C5_14}, // k96 KC_DOWN
{0, C5_15} // k97 KC_RGHT
* driver
* | LED address
* | | */
{ 0, C1_1 }, // k00 KC_GESC
{ 0, C1_2 }, // k01 KC_1
{ 0, C1_3 }, // k02 KC_2
{ 0, C1_4 }, // k03 KC_3
{ 0, C1_5 }, // k04 KC_4
{ 0, C1_6 }, // k05 KC_5
{ 0, C1_7 }, // k06 KC_6
{ 0, C1_8 }, // k07 KC_7
{ 0, C1_9 }, // k50 KC_8
{ 0, C1_10 }, // k51 KC_9
{ 0, C1_11 }, // k52 KC_0
{ 0, C1_12 }, // k53 KC_MINS
{ 0, C1_13 }, // k54 KC_EQL
{ 0, C1_14 }, // k55 KC_BSPC
{ 0, C1_15 }, // k57 KC_PGUP
{ 0, C2_1 }, // k10 KC_TAB
{ 0, C2_2 }, // k11 KC_Q
{ 0, C2_3 }, // k12 KC_W
{ 0, C2_4 }, // k13 KC_E
{ 0, C2_5 }, // k14 KC_R
{ 0, C2_6 }, // k15 KC_T
{ 0, C2_7 }, // k16 KC_Y
{ 0, C2_8 }, // k17 KC_U
{ 0, C2_9 }, // k60 KC_I
{ 0, C2_10 }, // k61 KC_O
{ 0, C2_11 }, // k62 KC_P
{ 0, C2_12 }, // k63 KC_LBRC
{ 0, C2_13 }, // k64 KC_RBRC
{ 0, C2_14 }, // k65 KC_BSLS
{ 0, C2_15 }, // k67 KC_PGDN
{ 0, C3_1 }, // k20 KC_CAPS
{ 0, C3_2 }, // k21 KC_A
{ 0, C3_3 }, // k22 KC_S
{ 0, C3_4 }, // k23 KC_D
{ 0, C3_5 }, // k24 KC_F
{ 0, C3_6 }, // k25 KC_G
{ 0, C3_7 }, // k26 KC_H
{ 0, C3_8 }, // k27 KC_J
{ 0, C3_9 }, // k70 KC_K
{ 0, C3_10 }, // k71 KC_L
{ 0, C3_11 }, // k72 KC_SCLN
{ 0, C3_12 }, // k73 KC_QUOT
{ 0, C3_14 }, // k75 KC_ENT
{ 0, C4_1 }, // k30 KC_LSFT
{ 0, C4_3 }, // k32 KC_Z
{ 0, C4_4 }, // k33 KC_X
{ 0, C4_5 }, // k34 KC_C
{ 0, C4_6 }, // k35 KC_V
{ 0, C4_7 }, // k36 KC_B
{ 0, C4_8 }, // k37 KC_N
{ 0, C4_9 }, // k80 KC_M
{ 0, C4_10 }, // k81 KC_COMM
{ 0, C4_11 }, // k82 KC_DOT
{ 0, C4_12 }, // k83 KC_SLSH
{ 0, C4_13 }, // k85 KC_RSFT
{ 0, C4_14 }, // k86 KC_UP
{ 0, C5_1 }, // k40 KC_LCTL
{ 0, C5_2 }, // k41 KC_LGUI
{ 0, C5_3 }, // k42 KC_LALT
{ 0, C5_4 }, // Unassociated between LALT and SPACE_2.75
{ 0, C5_5 }, // k45 KC_SPC SPACE_2.75
{ 0, C5_6 }, // k45 KC_SPC SPACE_6.75
{ 0, C5_7 }, // k46 KC_SPC SPACE_2.25
{ 0, C5_8 }, // Unassociated between SPACE_2.25 and SPACE_1.25
{ 0, C5_9 }, // k90 KC_RGUI
{ 0, C5_10 }, // k92 KC_RALT
{ 0, C5_11 }, // k93 MO(_FL)
{ 0, C5_12 }, // k94 KC_RCTL
{ 0, C5_13 }, // k95 KC_LEFT
{ 0, C5_14 }, // k96 KC_DOWN
{ 0, C5_15 } // k97 KC_RGHT
};
const led_matrix g_leds[LED_DRIVER_LED_COUNT] = {
/*{row | col << 4}
| LED_ROW_COL(row, col)
| | modifier
| | | */
{{0|(1<<4)}, {0, 0}, 1}, // k00 KC_GESC
{{0|(2<<4)}, {14.45, 0}, 0}, // k01 KC_1
{{0|(3<<4)}, {28.9, 0}, 0}, // k02 KC_2
{{0|(4<<4)}, {43.35, 0}, 0}, // k03 KC_3
{{0|(5<<4)}, {57.8, 0}, 0}, // k04 KC_4
{{0|(6<<4)}, {72.25, 0}, 0}, // k05 KC_5
{{0|(7<<4)}, {86.7, 0}, 0}, // k06 KC_6
{{0|(8<<4)}, {101.2, 0}, 0}, // k07 KC_7
{{0|(9<<4)}, {115.6, 0}, 0}, // k50 KC_8
{{0|(10<<4)}, {130, 0}, 0}, // k51 KC_9
{{0|(11<<4)}, {144.5, 0}, 0}, // k52 KC_0
{{0|(12<<4)}, {159, 0}, 0}, // k53 KC_MINS
{{0|(13<<4)}, {173.4, 0}, 0}, // k54 KC_EQL
{{0|(14<<4)}, {195.1, 0}, 1}, // k55 KC_BSPC
{{0|(15<<4)}, {224, 0}, 1}, // k57 KC_PGUP
{{1|(0<<4)}, {3.6125, 16}, 1}, // k10 KC_TAB
{{1|(1<<4)}, {21.675, 16}, 0}, // k11 KC_Q
{{1|(2<<4)}, {36.125, 16}, 0}, // k12 KC_W
{{1|(3<<4)}, {50.575, 16}, 0}, // k13 KC_E
{{1|(4<<4)}, {65.025, 16}, 0}, // k14 KC_R
{{1|(5<<4)}, {79.475, 16}, 0}, // k15 KC_T
{{1|(6<<4)}, {93.925, 16}, 0}, // k16 KC_Y
{{1|(7<<4)}, {108.375, 16}, 0}, // k17 KC_U
{{1|(8<<4)}, {122.825, 16}, 0}, // k60 KC_I
{{1|(9<<4)}, {137.275, 16}, 0}, // k61 KC_O
{{1|(10<<4)}, {151.725, 16}, 0}, // k62 KC_P
{{1|(11<<4)}, {166.175, 16}, 0}, // k63 KC_LBRC
{{1|(12<<4)}, {180.625, 16}, 0}, // k64 KC_RBRC
{{1|(13<<4)}, {198.6875, 16}, 1}, // k65 KC_BSLS
{{1|(14<<4)}, {224, 16}, 1}, // k67 KC_PGDN
{{2|(0<<4)}, {5.41875, 32}, 1}, // k20 KC_CAPS
{{2|(1<<4)}, {25.2875, 32}, 0}, // k21 KC_A
{{2|(2<<4)}, {39.7375, 32}, 0}, // k22 KC_S
{{2|(3<<4)}, {54.1875, 32}, 0}, // k23 KC_D
{{2|(4<<4)}, {68.6375, 32}, 0}, // k24 KC_F
{{2|(5<<4)}, {83.0875, 32}, 0}, // k25 KC_G
{{2|(6<<4)}, {97.5375, 32}, 0}, // k26 KC_H
{{2|(7<<4)}, {111.9875, 32}, 0}, // k27 KC_J
{{2|(8<<4)}, {126.4375, 32}, 0}, // k70 KC_K
{{2|(9<<4)}, {140.8875, 32}, 0}, // k71 KC_L
{{2|(10<<4)}, {155.3375, 32}, 0}, // k72 KC_SCLN
{{2|(11<<4)}, {169.7875, 32}, 0}, // k73 KC_QUOT
{{2|(12<<4)}, {184.2375, 32}, 1}, // k75 KC_ENT
{{3|(0<<4)}, {16.25625, 48}, 1}, // k30 KC_LSFT
{{3|(1<<4)}, {32.5125, 48}, 0}, // k32 KC_Z
{{3|(2<<4)}, {46.9625, 48}, 0}, // k33 KC_X
{{3|(3<<4)}, {61.4125, 48}, 0}, // k34 KC_C
{{3|(4<<4)}, {75.8625, 48}, 0}, // k35 KC_V
{{3|(5<<4)}, {90.3125, 48}, 0}, // k36 KC_B
{{3|(6<<4)}, {104.7625, 48}, 0}, // k37 KC_N
{{3|(7<<4)}, {119.2125, 48}, 0}, // k80 KC_M
{{3|(8<<4)}, {133.6625, 48}, 0}, // k81 KC_COMM
{{3|(9<<4)}, {148.1125, 48}, 0}, // k82 KC_DOT
{{3|(10<<4)}, {162.5625, 48}, 0}, // k83 KC_SLSH
{{3|(11<<4)}, {187.85, 48}, 1}, // k85 KC_RSFT
{{3|(12<<4)}, {209.525, 48}, 1}, // k86 KC_UP
{{4|(0<<4)}, {9.03125, 64}, 1}, // k40 KC_LCTL
{{4|(1<<4)}, {27.09375, 64}, 1}, // k41 KC_LGUI
{{4|(2<<4)}, {45.15625, 64}, 1}, // k42 KC_LALT
{{4|(3<<4)}, {59.45, 64}, 1}, // Unassociated between LALT and SPACE_2.75
{{4|(4<<4)}, {73.9, 64}, 1}, // k45 KC_SPC SPACE_2.75
{{4|(5<<4)}, {88.35, 64}, 1}, // k45 KC_SPC SPACE_6.25
{{4|(6<<4)}, {102.8, 64}, 1}, // k46 KC_SPC SPACE_2.25
{{4|(7<<4)}, {117.40625, 64}, 1}, // Unassociated between SPACE_2.25 and SPACE_2.75
{{4|(8<<4)}, {135.46875, 64}, 1}, // k90 KC_RGUI
{{4|(9<<4)}, {153.53125, 64}, 1}, // k92 KC_RALT
{{4|(10<<4)}, {167.98125, 64}, 1}, // k93 MO(_FL)
{{4|(11<<4)}, {186.04375, 64}, 1}, // k94 KC_RCTL
{{4|(12<<4)}, {195.075, 64}, 1}, // k95 KC_LEFT
{{4|(13<<4)}, {209.525, 64}, 1}, // k96 KC_DOWN
{{4|(14<<4)}, {224, 64}, 1} // k97 KC_RGHT
led_config_t g_led_config = {
{
// Key Matrix to LED Index
{ 0, 1, 2, 3, 4, 5, 6, 7 },
{ 15, 16, 17, 18, 19, 20, 21, 22 },
{ 30, 31, 32, 33, 34, 35, 36, 37 },
{ 43, NO_LED, 44, 45, 46, 47, 48, 49 },
{ 56, 57, 58, NO_LED, NO_LED, 60, 61, NO_LED },
{ 8, 9, 10, 11, 12, 13, NO_LED, 14 },
{ 23, 24, 25, 26, 27, 28, NO_LED, 29 },
{ 38, 39, 40, 41, NO_LED, 42, NO_LED, NO_LED },
{ 50, 51, 52, 53, NO_LED, 54, 55, NO_LED },
{ 64, NO_LED, 65, 66, 67, 68, 69, 70 }
}, {
// LED Index to Physical Position
{ 0, 0 }, { 15, 0 }, { 29, 0 }, { 43, 0 }, { 58, 0 }, { 72, 0 }, { 87, 0 }, { 101, 0 }, { 116, 0 }, { 130, 0 }, { 145, 0 }, { 159, 0 }, { 173, 0 }, { 195, 0 }, { 224, 0 },
{ 4, 16 }, { 22, 16 }, { 36, 16 }, { 51, 16 }, { 65, 16 }, { 80, 16 }, { 94, 16 }, { 108, 16 }, { 123, 16 }, { 137, 16 }, { 152, 16 }, { 166, 16 }, { 181, 16 }, { 199, 16 }, { 224, 16 },
{ 5, 32 }, { 25, 32 }, { 40, 32 }, { 54, 32 }, { 69, 32 }, { 83, 32 }, { 98, 32 }, { 112, 32 }, { 126, 32 }, { 141, 32 }, { 155, 32 }, { 170, 32 }, { 184, 32 },
{ 16, 48 }, { 33, 48 }, { 47, 48 }, { 61, 48 }, { 76, 48 }, { 90, 48 }, { 105, 48 }, { 119, 48 }, { 134, 48 }, { 148, 48 }, { 163, 48 }, { 188, 48 }, { 210, 48 },
{ 9, 64 }, { 27, 64 }, { 45, 64 }, { 60, 64 }, { 74, 64 }, { 88, 64 }, { 103, 64 }, { 117, 64 }, { 136, 64 }, { 154, 64 }, { 168, 64 }, { 186, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 }
}, {
// LED Index to Flag
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
}
};
#endif

View File

@@ -457,6 +457,464 @@
"y": 5.5
}
]
},
"LAYOUT_tkl_iso": {
"layout": [
{
"label": "Esc",
"x": 0,
"y": 0
},
{
"label": "F1",
"x": 2,
"y": 0
},
{
"label": "F2",
"x": 3,
"y": 0
},
{
"label": "F3",
"x": 4,
"y": 0
},
{
"label": "F4",
"x": 5,
"y": 0
},
{
"label": "F5",
"x": 6.5,
"y": 0
},
{
"label": "F6",
"x": 7.5,
"y": 0
},
{
"label": "F7",
"x": 8.5,
"y": 0
},
{
"label": "F8",
"x": 9.5,
"y": 0
},
{
"label": "F9",
"x": 11,
"y": 0
},
{
"label": "F10",
"x": 12,
"y": 0
},
{
"label": "F11",
"x": 13,
"y": 0
},
{
"label": "F12",
"x": 14,
"y": 0
},
{
"label": "PrtSc",
"x": 15.25,
"y": 0
},
{
"label": "Scroll Lock",
"x": 16.25,
"y": 0
},
{
"label": "Pause",
"x": 17.25,
"y": 0
},
{
"label": "~",
"x": 0,
"y": 1.5
},
{
"label": "!",
"x": 1,
"y": 1.5
},
{
"label": "@",
"x": 2,
"y": 1.5
},
{
"label": "#",
"x": 3,
"y": 1.5
},
{
"label": "$",
"x": 4,
"y": 1.5
},
{
"label": "%",
"x": 5,
"y": 1.5
},
{
"label": "^",
"x": 6,
"y": 1.5
},
{
"label": "&",
"x": 7,
"y": 1.5
},
{
"label": "*",
"x": 8,
"y": 1.5
},
{
"label": "(",
"x": 9,
"y": 1.5
},
{
"label": ")",
"x": 10,
"y": 1.5
},
{
"label": "_",
"x": 11,
"y": 1.5
},
{
"label": "+",
"x": 12,
"y": 1.5
},
{
"label": "Backspace",
"x": 13,
"y": 1.5,
"w": 2
},
{
"label": "Insert",
"x": 15.25,
"y": 1.5
},
{
"label": "Home",
"x": 16.25,
"y": 1.5
},
{
"label": "PgUp",
"x": 17.25,
"y": 1.5
},
{
"label": "Tab",
"x": 0,
"y": 2.5,
"w": 1.5
},
{
"label": "Q",
"x": 1.5,
"y": 2.5
},
{
"label": "W",
"x": 2.5,
"y": 2.5
},
{
"label": "E",
"x": 3.5,
"y": 2.5
},
{
"label": "R",
"x": 4.5,
"y": 2.5
},
{
"label": "T",
"x": 5.5,
"y": 2.5
},
{
"label": "Y",
"x": 6.5,
"y": 2.5
},
{
"label": "U",
"x": 7.5,
"y": 2.5
},
{
"label": "I",
"x": 8.5,
"y": 2.5
},
{
"label": "O",
"x": 9.5,
"y": 2.5
},
{
"label": "P",
"x": 10.5,
"y": 2.5
},
{
"label": "{",
"x": 11.5,
"y": 2.5
},
{
"label": "}",
"x": 12.5,
"y": 2.5
},
{
"label": "Enter",
"x": 13.75,
"y": 2.5,
"w": 1.25,
"h": 2
},
{
"label": "Delete",
"x": 15.25,
"y": 2.5
},
{
"label": "End",
"x": 16.25,
"y": 2.5
},
{
"label": "PgDn",
"x": 17.25,
"y": 2.5
},
{
"label": "Caps Lock",
"x": 0,
"y": 3.5,
"w": 1.75
},
{
"label": "A",
"x": 1.75,
"y": 3.5
},
{
"label": "S",
"x": 2.75,
"y": 3.5
},
{
"label": "D",
"x": 3.75,
"y": 3.5
},
{
"label": "F",
"x": 4.75,
"y": 3.5
},
{
"label": "G",
"x": 5.75,
"y": 3.5
},
{
"label": "H",
"x": 6.75,
"y": 3.5
},
{
"label": "J",
"x": 7.75,
"y": 3.5
},
{
"label": "K",
"x": 8.75,
"y": 3.5
},
{
"label": "L",
"x": 9.75,
"y": 3.5
},
{
"label": ":",
"x": 10.75,
"y": 3.5
},
{
"label": "\"",
"x": 11.75,
"y": 3.5
},
{
"label": "#",
"x": 12.75,
"y": 3.5
},
{
"label": "Shift",
"x": 0,
"y": 4.5,
"w": 1.25
},
{
"label": "\\",
"x": 1.25,
"y": 4.5
},
{
"label": "Z",
"x": 2.25,
"y": 4.5
},
{
"label": "X",
"x": 3.25,
"y": 4.5
},
{
"label": "C",
"x": 4.25,
"y": 4.5
},
{
"label": "V",
"x": 5.25,
"y": 4.5
},
{
"label": "B",
"x": 6.25,
"y": 4.5
},
{
"label": "N",
"x": 7.25,
"y": 4.5
},
{
"label": "M",
"x": 8.25,
"y": 4.5
},
{
"label": "<",
"x": 9.25,
"y": 4.5
},
{
"label": ">",
"x": 10.25,
"y": 4.5
},
{
"label": "?",
"x": 11.25,
"y": 4.5
},
{
"label": "Shift",
"x": 12.25,
"y": 4.5,
"w": 2.75
},
{
"label": "\u2191",
"x": 16.25,
"y": 4.5
},
{
"label": "Ctrl",
"x": 0,
"y": 5.5,
"w": 1.25
},
{
"label": "Win",
"x": 1.25,
"y": 5.5,
"w": 1.25
},
{
"label": "Alt",
"x": 2.5,
"y": 5.5,
"w": 1.25
},
{
"x": 3.75,
"y": 5.5,
"w": 6.25
},
{
"label": "Alt",
"x": 10,
"y": 5.5,
"w": 1.25
},
{
"label": "Fn",
"x": 11.25,
"y": 5.5,
"w": 1.25
},
{
"label": "Menu",
"x": 12.5,
"y": 5.5,
"w": 1.25
},
{
"label": "Ctrl",
"x": 13.75,
"y": 5.5,
"w": 1.25
},
{
"label": "\u2190",
"x": 15.25,
"y": 5.5
},
{
"label": "\u2193",
"x": 16.25,
"y": 5.5
},
{
"label": "\u2192",
"x": 17.25,
"y": 5.5
}
]
}
}
}

View File

@@ -26,13 +26,12 @@ void on_all_leds(void);
// This a shortcut to help you visually see your layout.
#define LAYOUT_tkl_ansi( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \
K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4E, K4F, \
K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, \
K6F \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4E, \
K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \
K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \
@@ -42,3 +41,22 @@ void on_all_leds(void);
{ K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \
}
// This a shortcut to help you visually see your layout.
#define LAYOUT_tkl_iso( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4E, K3D, K3E, K3F, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \
K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \
) { \
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX, K2E, K2F }, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \
{ K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \
{ XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \
}

View File

@@ -45,13 +45,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' `-------------'
*/
[_BASE] = LAYOUT_tkl_ansi( /* Base Layer */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
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_PGUP,
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_INS, KC_HOME,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_END, 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_ENT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC),KC_APP, KC_RCTL, KC_LEFT, KC_DOWN,
KC_RGHT
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
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_INS, KC_HOME, KC_PGUP,
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_DEL, KC_END, KC_PGDN,
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_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC),KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Keymap _FUNC: Function Layer
* ,-----------------------------------------------------------. ,--------------.
@@ -69,13 +68,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' `-------------'
*/
[_FUNC] = LAYOUT_tkl_ansi( /* Function Layer */
_______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______,
_______
_______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

View File

@@ -0,0 +1,72 @@
/* Copyright 2021 kuenhlee and Don Kjer
*
* 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 {
_BASE,
_FUNC
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BASE: Base Layer (Default Layer)
* ,-----------------------------------------------------------. ,--------------.
* |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| |Prnt|ScLk|Paus|
* |-----------------------------------------------------------| |--------------|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp|
* |-----------------------------------------------------------| |--------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | Del| End|PgDn|
* |------------------------------------------------------ Ret | `--------------'
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| |
* |-----------------------------------------------------------| ,----.
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up |
* |-----------------------------------------------------------| ,-------------.
* |Ctrl|Gui |Alt | Space |Alt | Fn |App |Ctrl| |Lft| Dn |Rig |
* `-----------------------------------------------------------' `-------------'
*/
[_BASE] = LAYOUT_tkl_iso( /* Base Layer */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
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_INS, KC_HOME, KC_PGUP,
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_ENT, KC_DEL, KC_END, KC_PGDN,
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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC),KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Keymap _FUNC: Function Layer
* ,-----------------------------------------------------------. ,--------------.
* | |Play|Stop|Prev|Next| |Mute|Vol+|Vol-| | | | | | | | | | |
* |-----------------------------------------------------------| |--------------|
* | | | | | | | | | | | | | | | | | | |
* |-----------------------------------------------------------| |--------------|
* | | | | | | | | | | | | | | | | | | |
* |------------------------------------------------------- | `--------------'
* | | | | | | | | | | | | | | |
* |-----------------------------------------------------------| ,----.
* | | | | | | | | | | | | | | | |
* |-----------------------------------------------------------| ,-------------.
* | | | | | |Func | | | | | | |
* `-----------------------------------------------------------' `-------------'
*/
[_FUNC] = LAYOUT_tkl_iso( /* Function Layer */
_______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

View File

@@ -0,0 +1,7 @@
# The ISO keymap for Durgod Taurus K320.
Layer 0 : Standard ISO 88 Keys TKL layout (Windows)
Layer 1 : Media control and Windows lock key
- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7

View File

@@ -0,0 +1,71 @@
/* Copyright 2021 kuenhlee and Don Kjer
*
* 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 {
_BASE,
_FUNC
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BASE: Base Layer (Default Layer)
* ,-----------------------------------------------------------. ,--------------.
* |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| |Prnt|ScLk|Paus|
* |-----------------------------------------------------------| |--------------|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp|
* |-----------------------------------------------------------| |--------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | Del| End|PgDn|
* |------------------------------------------------------ Ret | `--------------'
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| |
* |-----------------------------------------------------------| ,----.
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up |
* |-----------------------------------------------------------| ,-------------.
* |Ctrl|Alt |Gui | Space |Alt | Fn |App |Ctrl| |Lft| Dn |Rig |
* `-----------------------------------------------------------' `-------------'
*/
[_BASE] = LAYOUT_tkl_iso( /* Base Layer */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
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_INS, KC_HOME, KC_PGUP,
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_ENT, KC_DEL, KC_END, KC_PGDN,
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_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FUNC),KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Keymap _FUNC: Function Layer
* ,-----------------------------------------------------------. ,--------------.
* | |Play|Stop|Prev|Next| |Mute|Vol+|Vol-| | | | | | | | | | |
* |-----------------------------------------------------------| |--------------|
* | | | | | | | | | | | | | | | | | | |
* |-----------------------------------------------------------| |--------------|
* | | | | | | | | | | | | | | | | | | |
* |------------------------------------------------------- | `--------------'
* | | | | | | | | | | | | | | |
* |-----------------------------------------------------------| ,----.
* | | | | | | | | | | | | | | | |
* |-----------------------------------------------------------| ,-------------.
* | | | | | |Func | | | | | | |
* `-----------------------------------------------------------' `-------------'
*/
[_FUNC] = LAYOUT_tkl_iso( /* Function Layer */
_______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

View File

@@ -0,0 +1,6 @@
# The ISO (Mac) keymap for Durgod Taurus K320.
Layer 0 : Standard ISO 88 Keys TKL layout (Mac)
Layer 1 : Media control
- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7

View File

@@ -67,13 +67,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' `-------------'
*/
[_WBL] = LAYOUT_tkl_ansi( /* Windows Base Layer */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
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_PGUP,
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_INS, KC_HOME,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_END, 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_ENT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN,
KC_RGHT
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
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_INS, KC_HOME, KC_PGUP,
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_DEL, KC_END, KC_PGDN,
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_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Keymap _WFL: Windows Function Layer
* ,-----------------------------------------------------------. ,--------------.
@@ -91,13 +90,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' `-------------'
*/
[_WFL] = LAYOUT_tkl_ansi( /* Windows First Layer */
_______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______,
_______
_______, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______
),
/* Keymap _WSL: Windows System Layer
* ,-----------------------------------------------------------. ,--------------.
@@ -115,13 +113,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' `-------------'
*/
[_WSL] = LAYOUT_tkl_ansi( /* Windows Second / System Layer */
RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX
RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
/* Keymap _MBL: Mac Base Layer (Alternate Layout)
@@ -140,13 +137,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' `-------------'
*/
[_MBL] = LAYOUT_tkl_ansi( /* Mac Base Layer */
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_F13, KC_F14, KC_F15,
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_PGUP,
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_INS, KC_HOME,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_END, 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_ENT, KC_UP,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN,
KC_RGHT
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_F13, KC_F14, KC_F15,
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_INS, KC_HOME, KC_PGUP,
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_DEL, KC_END, KC_PGDN,
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_UP,
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Keymap _MFL: Mac Function Layer
* ,-----------------------------------------------------------. ,--------------.
@@ -164,13 +160,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' `-------------'
*/
[_MFL] = LAYOUT_tkl_ansi( /* Mac First Layer */
_______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______,
_______
_______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______
),
/* Keymap _MSL: Mac System Layer
* ,-----------------------------------------------------------. ,--------------.
@@ -188,13 +183,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------' `-------------'
*/
[_MSL] = LAYOUT_tkl_ansi( /* Mac Second / System Layer */
RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX
RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
)
};

View File

@@ -109,43 +109,39 @@ const uint32_t PROGMEM unicode_map[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_tkl_ansi( /* Base Layer */
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
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_PGUP,
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_INS, KC_HOME,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_END, 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_ENT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN,
KC_RGHT
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
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_INS, KC_HOME, KC_PGUP,
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_DEL, KC_END, KC_PGDN,
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_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_FL] = LAYOUT_tkl_ansi( /* First Layer */
KC_TRNS, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PDTP,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TASK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MSEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_ADTP, KC_STOP,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_FIND, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DDTP, KC_SEND, KC_NDTP,
XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAIL, XXXXXXX, XXXXXXX, XXXXXXX, KC_MENU, XXXXXXX, KC_WINU,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_SL), KC_TRNS, MO(_UL), XXXXXXX, KC_WINL, KC_WIND,
KC_WINR
KC_TRNS, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ADTP, KC_STOP, KC_PDTP,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TASK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MSEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_DDTP, KC_SEND, KC_NDTP,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_FIND, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAIL, XXXXXXX, XXXXXXX, XXXXXXX, KC_MENU, KC_WINU,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_SL), KC_TRNS, MO(_UL), XXXXXXX, KC_WINL, KC_WIND, KC_WINR
),
[_SL] = LAYOUT_tkl_ansi( /* Second Layer */
XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX
XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
[_UL] = LAYOUT_tkl_ansi( /* Unicode Layer */
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
X(APPR), X(NEQU), X(POW2), X(POW3), XXXXXXX, XXXXXXX, X(BSQR), X(WSQR), X(INFI), X(BDOT), X(WDOT), XXXXXXX, X(PONE), XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(SUM), XXXXXXX, X(MYU), X(SAME), XXXXXXX, X(OHM), X(DLAR), X(DRAR), XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, X(SQRT), X(DELT), XXXXXXX, XXXXXXX, X(THFR), XXXXXXX, XXXXXXX, XXXXXXX, X(THET), X(DEGR), XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, X(COPY), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(LTOE), X(MTOE), X(DIV), XXXXXXX, XXXXXXX, X(UARR),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, X(LARR), X(DARR),
X(RARR)
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
X(APPR), X(NEQU), X(POW2), X(POW3), XXXXXXX, XXXXXXX, X(BSQR), X(WSQR), X(INFI), X(BDOT), X(WDOT), XXXXXXX, X(PONE), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(SUM), XXXXXXX, X(MYU), X(SAME), XXXXXXX, X(OHM), X(DLAR), X(DRAR), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, X(SQRT), X(DELT), XXXXXXX, XXXXXXX, X(THFR), XXXXXXX, XXXXXXX, XXXXXXX, X(THET), X(DEGR), XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, X(COPY), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, X(LTOE), X(MTOE), X(DIV), XXXXXXX, X(UARR),
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, X(LARR), X(DARR), X(RARR)
)
};

View File

@@ -24,4 +24,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
LAYOUTS = tkl_ansi
LAYOUTS = tkl_ansi tkl_iso

View File

@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN B15
#define RGBLED_NUM 16
#define RGBLIGT_LIMIT_VAL 200
#define RGBLIGHT_LIMIT_VAL 200
#define RGBLIGHT_SLEEP
#define RGBLIGHT_ANIMATIONS

View File

@@ -45,7 +45,7 @@
*/
#define LED_DRIVER_ADDR_1 0b1110100
#define LED_DRIVER_COUNT 1
#define LED_DRIVER_LED_COUNT 3
#define DRIVER_LED_TOTAL 3
/* Set 0 if debouncing isn't needed
*/

View File

@@ -25,7 +25,7 @@ void init_fallacy_leds(void) {
i2c_init();
IS31FL3731_init(LED_DRIVER_ADDR_1);
for (int i = 0; i < LED_DRIVER_LED_COUNT; i++) {
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
IS31FL3731_set_led_control_register(i, true);
}
@@ -54,7 +54,7 @@ void set_fallacy_led(int index, bool state) {
/* define LED matrix
*/
const is31_led g_is31_leds[LED_DRIVER_LED_COUNT] = {
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, C1_1},
{0, C2_1},
{0, C3_1},

View File

@@ -0,0 +1,21 @@
/* Copyright 2020 Weirdo
*
* 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 <http://www.gnu.org/licenses/>.
*/
// Need to override the SysTick timer to use TIM3 -- this is a 16-bit timer on F303
// so we need to change resolution and frequency to match.
#define CH_CFG_ST_RESOLUTION 16
#define CH_CFG_ST_FREQUENCY 10000
#include_next "chconf.h"

View File

@@ -0,0 +1,52 @@
/* Copyright 2020 Weirdo
*
* 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 0x7764
#define PRODUCT_ID 0x676D
#define DEVICE_VER 0x0001
#define MANUFACTURER Weirdo
#define PRODUCT Geminate60
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
#define MATRIX_ROW_PINS { A9, A10, B10, B11, B15}
#define MATRIX_COL_PINS { A8, B14, B13, B12, B1, B0, A7 , A1 , A15, B3, B4, B5, B6, B7, B8}
#define DIODE_DIRECTION ROW2COL
#define DEBOUNCE 5
#define RGB_DI_PIN A6
#define RGBLED_NUM 1
//#define RGBLIGHT_DISABLE_KEYCODES
/* 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

View File

@@ -0,0 +1,16 @@
/* Copyright 2020 Weirdo
*
* 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 "geminate60.h"

View File

@@ -0,0 +1,30 @@
/*
Copyright 2020 Weirdo
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( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, K013, K014, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, \
K40, K41, K42, K46, K410, K411, K412, K413 ) \
{ \
{K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, K013, K014}, \
{K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113 }, \
{K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213 }, \
{K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313 }, \
{K40, K41, K42, K46, K410, K411, K412, K413 } \
}

View File

@@ -0,0 +1,524 @@
/*
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/**
* @file templates/halconf.h
* @brief HAL configuration header.
* @details HAL configuration file, this file allows to enable or disable the
* various device drivers from your application. You may also use
* this file in order to override the device drivers default settings.
*
* @addtogroup HAL_CONF
* @{
*/
#ifndef HALCONF_H
# define HALCONF_H
# define _CHIBIOS_HAL_CONF_
# define _CHIBIOS_HAL_CONF_VER_7_0_
# include "mcuconf.h"
/**
* @brief Enables the PAL subsystem.
*/
# if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
# define HAL_USE_PAL TRUE
# endif
/**
* @brief Enables the ADC subsystem.
*/
# if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
# define HAL_USE_ADC FALSE
# endif
/**
* @brief Enables the CAN subsystem.
*/
# if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
# define HAL_USE_CAN FALSE
# endif
/**
* @brief Enables the cryptographic subsystem.
*/
# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
# define HAL_USE_CRY FALSE
# endif
/**
* @brief Enables the DAC subsystem.
*/
# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
# define HAL_USE_DAC TRUE
# endif
/**
* @brief Enables the GPT subsystem.
*/
# if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
# define HAL_USE_GPT TRUE
# endif
/**
* @brief Enables the I2C subsystem.
*/
# if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
# define HAL_USE_I2C TRUE
# endif
/**
* @brief Enables the I2S subsystem.
*/
# if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
# define HAL_USE_I2S FALSE
# endif
/**
* @brief Enables the ICU subsystem.
*/
# if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
# define HAL_USE_ICU FALSE
# endif
/**
* @brief Enables the MAC subsystem.
*/
# if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
# define HAL_USE_MAC FALSE
# endif
/**
* @brief Enables the MMC_SPI subsystem.
*/
# if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
# define HAL_USE_MMC_SPI FALSE
# endif
/**
* @brief Enables the PWM subsystem.
*/
# if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
# define HAL_USE_PWM TRUE
# endif
/**
* @brief Enables the RTC subsystem.
*/
# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
# define HAL_USE_RTC FALSE
# endif
/**
* @brief Enables the SDC subsystem.
*/
# if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
# define HAL_USE_SDC FALSE
# endif
/**
* @brief Enables the SERIAL subsystem.
*/
# if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
# define HAL_USE_SERIAL FALSE
# endif
/**
* @brief Enables the SERIAL over USB subsystem.
*/
# if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
# define HAL_USE_SERIAL_USB TRUE
# endif
/**
* @brief Enables the SIO subsystem.
*/
# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
# define HAL_USE_SIO FALSE
# endif
/**
* @brief Enables the SPI subsystem.
*/
# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
# define HAL_USE_SPI TRUE
# endif
/**
* @brief Enables the TRNG subsystem.
*/
# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
# define HAL_USE_TRNG FALSE
# endif
/**
* @brief Enables the UART subsystem.
*/
# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
# define HAL_USE_UART FALSE
# endif
/**
* @brief Enables the USB subsystem.
*/
# if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
# define HAL_USE_USB TRUE
# endif
/**
* @brief Enables the WDG subsystem.
*/
# if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
# define HAL_USE_WDG FALSE
# endif
/**
* @brief Enables the WSPI subsystem.
*/
# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
# define HAL_USE_WSPI FALSE
# endif
/*===========================================================================*/
/* PAL driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
# define PAL_USE_CALLBACKS TRUE
# endif
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
# define PAL_USE_WAIT TRUE
# endif
/*===========================================================================*/
/* ADC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
# define ADC_USE_WAIT TRUE
# endif
/**
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
# define ADC_USE_MUTUAL_EXCLUSION TRUE
# endif
/*===========================================================================*/
/* CAN driver related settings. */
/*===========================================================================*/
/**
* @brief Sleep mode related APIs inclusion switch.
*/
# if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
# define CAN_USE_SLEEP_MODE TRUE
# endif
/**
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
*/
# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
# define CAN_ENFORCE_USE_CALLBACKS FALSE
# endif
/*===========================================================================*/
/* CRY driver related settings. */
/*===========================================================================*/
/**
* @brief Enables the SW fall-back of the cryptographic driver.
* @details When enabled, this option, activates a fall-back software
* implementation for algorithms not supported by the underlying
* hardware.
* @note Fall-back implementations may not be present for all algorithms.
*/
# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
# define HAL_CRY_USE_FALLBACK FALSE
# endif
/**
* @brief Makes the driver forcibly use the fall-back implementations.
*/
# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
# define HAL_CRY_ENFORCE_FALLBACK FALSE
# endif
/*===========================================================================*/
/* DAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
# define DAC_USE_WAIT TRUE
# endif
/**
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
# define DAC_USE_MUTUAL_EXCLUSION TRUE
# endif
/*===========================================================================*/
/* I2C driver related settings. */
/*===========================================================================*/
/**
* @brief Enables the mutual exclusion APIs on the I2C bus.
*/
# if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
# define I2C_USE_MUTUAL_EXCLUSION TRUE
# endif
/*===========================================================================*/
/* MAC driver related settings. */
/*===========================================================================*/
/**
* @brief Enables the zero-copy API.
*/
# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
# define MAC_USE_ZERO_COPY FALSE
# endif
/**
* @brief Enables an event sources for incoming packets.
*/
# if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
# define MAC_USE_EVENTS TRUE
# endif
/*===========================================================================*/
/* MMC_SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
* This option is recommended also if the SPI driver does not
* use a DMA channel and heavily loads the CPU.
*/
# if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
# define MMC_NICE_WAITING TRUE
# endif
/*===========================================================================*/
/* SDC driver related settings. */
/*===========================================================================*/
/**
* @brief Number of initialization attempts before rejecting the card.
* @note Attempts are performed at 10mS intervals.
*/
# if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
# define SDC_INIT_RETRY 100
# endif
/**
* @brief Include support for MMC cards.
* @note MMC support is not yet implemented so this option must be kept
* at @p FALSE.
*/
# if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
# define SDC_MMC_SUPPORT FALSE
# endif
/**
* @brief Delays insertions.
* @details If enabled this options inserts delays into the MMC waiting
* routines releasing some extra CPU time for the threads with
* lower priority, this may slow down the driver a bit however.
*/
# if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
# define SDC_NICE_WAITING TRUE
# endif
/**
* @brief OCR initialization constant for V20 cards.
*/
# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
# define SDC_INIT_OCR_V20 0x50FF8000U
# endif
/**
* @brief OCR initialization constant for non-V20 cards.
*/
# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
# define SDC_INIT_OCR 0x80100000U
# endif
/*===========================================================================*/
/* SERIAL driver related settings. */
/*===========================================================================*/
/**
* @brief Default bit rate.
* @details Configuration parameter, this is the baud rate selected for the
* default configuration.
*/
# if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
# define SERIAL_DEFAULT_BITRATE 38400
# endif
/**
* @brief Serial buffers size.
* @details Configuration parameter, you can change the depth of the queue
* buffers depending on the requirements of your application.
* @note The default is 16 bytes for both the transmission and receive
* buffers.
*/
# if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
# define SERIAL_BUFFERS_SIZE 16
# endif
/*===========================================================================*/
/* SERIAL_USB driver related setting. */
/*===========================================================================*/
/**
* @brief Serial over USB buffers size.
* @details Configuration parameter, the buffer size must be a multiple of
* the USB data endpoint maximum packet size.
* @note The default is 256 bytes for both the transmission and receive
* buffers.
*/
# if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
# define SERIAL_USB_BUFFERS_SIZE 1
# endif
/**
* @brief Serial over USB number of buffers.
* @note The default is 2 buffers.
*/
# if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
# define SERIAL_USB_BUFFERS_NUMBER 2
# endif
/*===========================================================================*/
/* SPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
# define SPI_USE_WAIT TRUE
# endif
/**
* @brief Enables circular transfers APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
# define SPI_USE_CIRCULAR FALSE
# endif
/**
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
# define SPI_USE_MUTUAL_EXCLUSION TRUE
# endif
/**
* @brief Handling method for SPI CS line.
* @note Disabling this option saves both code and data space.
*/
# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
# endif
/*===========================================================================*/
/* UART driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
# define UART_USE_WAIT FALSE
# endif
/**
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
# define UART_USE_MUTUAL_EXCLUSION FALSE
# endif
/*===========================================================================*/
/* USB driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
# define USB_USE_WAIT TRUE
# endif
/*===========================================================================*/
/* WSPI driver related settings. */
/*===========================================================================*/
/**
* @brief Enables synchronous APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
# define WSPI_USE_WAIT TRUE
# endif
/**
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
* @note Disabling this option saves both code and data space.
*/
# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
# define WSPI_USE_MUTUAL_EXCLUSION TRUE
# endif
#endif /* HALCONF_H */
/** @} */

View File

@@ -0,0 +1,79 @@
{
"keyboard_name": "geminate60",
"url": "",
"maintainer": "qmk",
"width": 15,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"K00", "x":0, "y":0},
{"label":"K01", "x":1, "y":0},
{"label":"K02", "x":2, "y":0},
{"label":"K0", "x":3, "y":0},
{"label":"K04", "x":4, "y":0},
{"label":"K05", "x":5, "y":0},
{"label":"K06", "x":6, "y":0},
{"label":"K07", "x":7, "y":0},
{"label":"K08", "x":8, "y":0},
{"label":"K09", "x":9, "y":0},
{"label":"K010", "x":10, "y":0},
{"label":"K011", "x":11, "y":0},
{"label":"K012", "x":12, "y":0},
{"label":"K013", "x":13, "y":0},
{"label":"K014", "x":14, "y":0},
{"label":"K10", "x":0, "y":1, "w":1.5},
{"label":"K11", "x":1.5, "y":1},
{"label":"K12", "x":2.5, "y":1},
{"label":"K13", "x":3.5, "y":1},
{"label":"K14", "x":4.5, "y":1},
{"label":"K15", "x":5.5, "y":1},
{"label":"K16", "x":6.5, "y":1},
{"label":"K17", "x":7.5, "y":1},
{"label":"K18", "x":8.5, "y":1},
{"label":"K19", "x":9.5, "y":1},
{"label":"K110", "x":10.5, "y":1},
{"label":"K111", "x":11.5, "y":1},
{"label":"K112", "x":12.5, "y":1},
{"label":"K113", "x":13.5, "y":1, "w":1.5},
{"label":"K20", "x":0, "y":2, "w":1.75},
{"label":"K21", "x":1.75, "y":2},
{"label":"K22", "x":2.75, "y":2},
{"label":"K23", "x":3.75, "y":2},
{"label":"K24", "x":4.75, "y":2},
{"label":"K25", "x":5.75, "y":2},
{"label":"K26", "x":6.75, "y":2},
{"label":"K27", "x":7.75, "y":2},
{"label":"K28", "x":8.75, "y":2},
{"label":"K29", "x":9.75, "y":2},
{"label":"K210", "x":10.75, "y":2},
{"label":"K211", "x":11.75, "y":2},
{"label":"K212", "x":12.75, "y":2},
{"label":"K213", "x":13.75, "y":2, "w":1.25},
{"label":"K30", "x":0, "y":3, "w":1.25},
{"label":"K31", "x":1.25, "y":3},
{"label":"K32", "x":2.25, "y":3},
{"label":"K33", "x":3.25, "y":3},
{"label":"K34", "x":4.25, "y":3},
{"label":"K35", "x":5.25, "y":3},
{"label":"K36", "x":6.25, "y":3},
{"label":"K37", "x":7.25, "y":3},
{"label":"K38", "x":8.25, "y":3},
{"label":"K39", "x":9.25, "y":3},
{"label":"K310", "x":10.25, "y":3},
{"label":"K311", "x":11.25, "y":3},
{"label":"K312", "x":12.25, "y":3, "w":1.75},
{"label":"K313", "x":14, "y":3},
{"label":"K40", "x":0, "y":4, "w":1.25},
{"label":"K41", "x":1.25, "y":4, "w":1.25},
{"label":"K42", "x":2.5, "y":4, "w":1.25},
{"label":"K46", "x":3.75, "y":4, "w":6.25},
{"label":"K410", "x":10, "y":4, "w":1.25},
{"label":"K411", "x":11.25, "y":4, "w":1.25},
{"label":"K412", "x":12.5, "y":4, "w":1.25},
{"label":"K413", "x":13.75, "y":4, "w":1.25}
]
}
}
,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/"
}

View File

@@ -0,0 +1,50 @@
/* Copyright 2020 Weirdo
*
* 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
// [Keymaps] -----------------------------------------------------------------//
enum layer_names {
_BASE,
_FN
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = 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_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_BSLS, KC_ENT,
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
KC_LCTL, KC_LWIN, KC_LALT,KC_SPACE, KC_RALT, KC_RALT, KC_RWIN, KC_RCTL),
[_FN] = LAYOUT(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_DEL,
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_UP, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), //
};
bool led_update_user(led_t led_state) {
if(led_state.caps_lock){
rgblight_setrgb_at(192, 192, 192, 0);
}else{
rgblight_setrgb_at(0, 0, 0, 0);
}
return true;
}

View File

@@ -0,0 +1,58 @@
/* Copyright 2020 Weirdo
*
* 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
// [Keymaps] -----------------------------------------------------------------//
enum layer_names { _BASE, _FN ,_FN1 ,_FN2 };
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = 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_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_BSLS, KC_ENT,
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
KC_LCTL, KC_LWIN, KC_LALT, KC_SPACE, KC_RALT, KC_RALT, KC_RWIN, KC_RCTL),
[_FN] = LAYOUT(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_DEL,
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_UP, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), //
[_FN1] = LAYOUT(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,),
[_FN2] = LAYOUT(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),
};
bool led_update_user(led_t led_state) {
if(led_state.caps_lock){
rgblight_setrgb_at(192, 192, 192, 0);
}else{
rgblight_setrgb_at(0, 0, 0, 0);
}
return true;
}

View File

@@ -0,0 +1,15 @@
# Geminate60
![Geminate60](https://www.hualigs.cn/image/600d9391f16d7.jpg)
A 60% keyboard based on STM32f303
* Keyboard Maintainer: [Weirdo](https://weirdo-f.github.io)(https://github.com/1248314361)
* Hardware Supported: Geminate60
* Hardware Availability: Not yet
Make example for this keyboard (after setting up your build environment):
make geminate60: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).

View File

@@ -0,0 +1,21 @@
# 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 = 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 = 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
#LAYOUTS = ortho_5x15

View File

@@ -1,62 +0,0 @@
/* Copyright 2019 Jack Humbert
*
* 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 0x0e6f
#define PRODUCT_ID 0x0185
#define DEVICE_VER 0x0001
#define MANUFACTURER QMK
#define PRODUCT Proton C
#define DESCRIPTION Handwired Gamepad
/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 1
#define DIODE_DIRECTION COL2ROW
#define MATRIX_COL_PINS { A3 }
#define MATRIX_ROW_PINS { A1 }
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/*
* 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
#define GAMECUBE_DATA_PIN A2

View File

@@ -1,130 +0,0 @@
#include "gc_controller.h"
#include "gc_read.h"
#include "gamepad.h"
#include <string.h>
uint16_t gamecube_buttons = 0;
uint8_t gamecube_joysticks[6] = {0};
bool z_button = false;
report_gamepad_t report = {
.Button = 0,
.LX = STICK_CENTER,
.LY = STICK_CENTER,
.RX = STICK_CENTER,
.RY = STICK_CENTER,
.HAT = HAT_CENTER
};
void board_init(void) {
setPinOutput(C13);
writePinLow(C13);
gamecube_init();
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
gamecube_scan(&gamecube_buttons, gamecube_joysticks);
z_button = gamecube_buttons & GAMECUBE_Z;
// Home & Capture
if (gamecube_buttons & GAMECUBE_START) {
if (z_button && !(report.Button & SWITCH_HOME))
report.Button |= SWITCH_CAPTURE;
else
report.Button |= SWITCH_HOME;
} else {
report.Button &= ~SWITCH_HOME;
report.Button &= ~SWITCH_CAPTURE;
}
// Y and L
if (gamecube_buttons & GAMECUBE_Y) {
if (z_button && !(report.Button & SWITCH_Y))
report.Button |= SWITCH_L;
else
report.Button |= SWITCH_Y;
} else {
report.Button &= ~SWITCH_Y;
report.Button &= ~SWITCH_L;
}
// X and R
if (gamecube_buttons & GAMECUBE_X) {
if (z_button && !(report.Button & SWITCH_X))
report.Button |= SWITCH_R;
else
report.Button |= SWITCH_X;
} else {
report.Button &= ~SWITCH_X;
report.Button &= ~SWITCH_R;
}
// B and -
if (gamecube_buttons & GAMECUBE_B) {
if (z_button && !(report.Button & SWITCH_B))
report.Button |= SWITCH_MINUS;
else
report.Button |= SWITCH_B;
} else {
report.Button &= ~SWITCH_B;
report.Button &= ~SWITCH_MINUS;
}
// A and +
if (gamecube_buttons & GAMECUBE_A) {
if (z_button && !(report.Button & SWITCH_A))
report.Button |= SWITCH_PLUS;
else
report.Button |= SWITCH_A;
} else {
report.Button &= ~SWITCH_A;
report.Button &= ~SWITCH_PLUS;
}
if (gamecube_buttons & GAMECUBE_L) {
report.Button |= SWITCH_ZL;
} else {
report.Button &= ~SWITCH_ZL;
}
if (gamecube_buttons & GAMECUBE_R) {
report.Button |= SWITCH_ZR;
} else {
report.Button &= ~SWITCH_ZR;
}
if ((gamecube_buttons & GAMECUBE_UP) && (gamecube_buttons & GAMECUBE_RIGHT))
report.HAT = HAT_TOP_RIGHT;
else if ((gamecube_buttons & GAMECUBE_UP) && (gamecube_buttons & GAMECUBE_LEFT))
report.HAT = HAT_TOP_LEFT;
else if ((gamecube_buttons & GAMECUBE_DOWN) && (gamecube_buttons & GAMECUBE_RIGHT))
report.HAT = HAT_BOTTOM_RIGHT;
else if ((gamecube_buttons & GAMECUBE_DOWN) && (gamecube_buttons & GAMECUBE_LEFT))
report.HAT = HAT_BOTTOM_LEFT;
else if (gamecube_buttons & GAMECUBE_UP)
report.HAT = HAT_TOP;
else if (gamecube_buttons & GAMECUBE_DOWN)
report.HAT = HAT_BOTTOM;
else if (gamecube_buttons & GAMECUBE_RIGHT)
report.HAT = HAT_RIGHT;
else if (gamecube_buttons & GAMECUBE_LEFT)
report.HAT = HAT_LEFT;
else
report.HAT = HAT_CENTER;
if (report.Button || report.HAT != HAT_CENTER)
writePinHigh(C13);
else
writePinLow(C13);
// joystick calculations
report.LX = gamecube_joysticks[0];
report.LY = 255 - gamecube_joysticks[1];
report.RX = gamecube_joysticks[2];
report.RY = 255 - gamecube_joysticks[3];
send_gamepad(&report);
}

View File

@@ -1,47 +0,0 @@
#include "quantum.h"
typedef enum {
SWITCH_Y = 0x01,
SWITCH_B = 0x02,
SWITCH_A = 0x04,
SWITCH_X = 0x08,
SWITCH_L = 0x10,
SWITCH_R = 0x20,
SWITCH_ZL = 0x40,
SWITCH_ZR = 0x80,
SWITCH_MINUS = 0x100,
SWITCH_PLUS = 0x200,
SWITCH_LCLICK = 0x400,
SWITCH_RCLICK = 0x800,
SWITCH_HOME = 0x1000,
SWITCH_CAPTURE = 0x2000,
} SwitchButtons_t;
typedef enum {
GAMECUBE_A = 0b0000000000000001,
GAMECUBE_B = 0b0000000000000010,
GAMECUBE_X = 0b0000000000000100,
GAMECUBE_Y = 0b0000000000001000,
GAMECUBE_START = 0b0000000000010000,
GAMECUBE_LEFT = 0b0000000100000000,
GAMECUBE_RIGHT = 0b0000001000000000,
GAMECUBE_DOWN = 0b0000010000000000,
GAMECUBE_UP = 0b0000100000000000,
GAMECUBE_Z = 0b0001000000000000,
GAMECUBE_R = 0b0010000000000000,
GAMECUBE_L = 0b0100000000000000,
} GamecubeButtons_t;
#define HAT_TOP 0x00
#define HAT_TOP_RIGHT 0x01
#define HAT_RIGHT 0x02
#define HAT_BOTTOM_RIGHT 0x03
#define HAT_BOTTOM 0x04
#define HAT_BOTTOM_LEFT 0x05
#define HAT_LEFT 0x06
#define HAT_TOP_LEFT 0x07
#define HAT_CENTER 0x08
#define STICK_MIN 0
#define STICK_CENTER 128
#define STICK_MAX 255

View File

@@ -1,216 +0,0 @@
#include "gc_read.h"
#include "gc_controller.h"
#define CONTROLLER_TIMEOUT 60
bool init_message[9] = {0, 0, 0, 0, 0, 0, 0, 0, 1};
bool request_message[25] = {
0, 1, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 1, 1,
0, 0, 0, 0, 0, 0, 1, 0, 1};
void start_message(void) {
setPinOutput(GAMECUBE_DATA_PIN);
writePinLow(GAMECUBE_DATA_PIN);
}
void send_bit(bool b) {
if (b) {
writePinLow(GAMECUBE_DATA_PIN);
wait_ns(900);
writePinHigh(GAMECUBE_DATA_PIN);
wait_ns(2900);
} else {
writePinLow(GAMECUBE_DATA_PIN);
wait_ns(2900);
writePinHigh(GAMECUBE_DATA_PIN);
wait_ns(900);
}
}
void wait_for_ready(void) {
setPinInputHigh(GAMECUBE_DATA_PIN);
// wait for long high
uint8_t ready = 0;
while (ready < 5) {
if (readPin(GAMECUBE_DATA_PIN))
ready++;
else
ready = 0;
wait_us(1);
}
}
void end_message(void) {
setPinInputHigh(GAMECUBE_DATA_PIN);
}
uint8_t buffer[9] = {0};
uint16_t buttons_debounce = 0;
bool initialised = false;
bool calibrated = false;
uint8_t mid_values[4] = {128, 128, 128, 128};
uint8_t max_values[4] = {210, 210, 210, 210};
uint8_t min_values[4] = {35, 35, 35, 35};
void gamecube_init(void) {
setPinInputHigh(GAMECUBE_DATA_PIN);
}
void gamecube_scan(uint16_t * buttons, uint8_t * joysticks) {
bool exiting = false;
uint16_t timeout_counter = 0;
// somehow we're missing the first bit, which can safely be ignored
// i'm not sure if it's something with the timing or what
uint8_t buffer_bit = 1;
chSysLock();
if (!initialised) {
wait_for_ready();
start_message();
for (uint8_t i = 0; i < 9; i++)
send_bit(init_message[i]);
end_message();
initialised = true;
}
wait_for_ready();
start_message();
for (uint8_t i = 0; i < 25; i++)
send_bit(request_message[i]);
end_message();
while (!exiting) {
timeout_counter = 0;
// wait for low or timeout
while (readPin(GAMECUBE_DATA_PIN)) {
wait_ns(100);
timeout_counter++;
if (timeout_counter > CONTROLLER_TIMEOUT) {
exiting = true;
break;
}
}
if (!exiting) {
// wait for the data part
wait_ns(1950);
bool b = readPin(GAMECUBE_DATA_PIN);
if (b)
buffer[buffer_bit / 8] |= (1 << (7 - (buffer_bit % 8)));
else
buffer[buffer_bit / 8] &= ~(1 << (7 - (buffer_bit % 8)));
buffer_bit++;
// wait for high
while (!readPin(GAMECUBE_DATA_PIN));
}
}
chSysUnlock();
// basic debouncing for buttons
uint16_t combined_buttons = buffer[0] | (buffer[1] << 8);
*buttons |= buttons_debounce & combined_buttons;
*buttons &= buttons_debounce | combined_buttons;
buttons_debounce = combined_buttons;
if (!calibrated && mid_values[0] > 0) {
mid_values[0] = buffer[2];
mid_values[1] = buffer[3];
mid_values[2] = buffer[4];
mid_values[3] = buffer[5];
calibrated = true;
}
if (max_values[0] < buffer[2])
max_values[0] = buffer[2];
if (max_values[1] < buffer[3])
max_values[1] = buffer[3];
if (max_values[2] < buffer[4])
max_values[2] = buffer[4];
if (max_values[3] < buffer[5])
max_values[3] = buffer[5];
if (min_values[0] > buffer[2])
min_values[0] = buffer[2];
if (min_values[1] > buffer[3])
min_values[1] = buffer[3];
if (min_values[2] > buffer[4])
min_values[2] = buffer[4];
if (min_values[3] > buffer[5])
min_values[3] = buffer[5];
// values from my GC controller in Windows
// 30 - 138 - 236
// 20 - 124 - 225
// 37 - 135 - 222
// 34 - 126 - 216
// this should be 127? i don't understand what i'm doing wrong yet
#define JOYSTICK_SCALER 180.0
int32_t lx_temp = (int16_t)buffer[2] - mid_values[0];
if (lx_temp > 0)
lx_temp *= JOYSTICK_SCALER / (max_values[0]-mid_values[0]);
else
lx_temp *= JOYSTICK_SCALER / (mid_values[0]-min_values[0]);
lx_temp += STICK_CENTER;
if (lx_temp > 255)
lx_temp = 255;
if (lx_temp < 0)
lx_temp = 0;
int32_t ly_temp = (int16_t)buffer[3] - mid_values[1];
if (ly_temp > 0)
ly_temp *= JOYSTICK_SCALER / (max_values[1]-mid_values[1]);
else
ly_temp *= JOYSTICK_SCALER / (mid_values[1]-min_values[1]);
ly_temp += STICK_CENTER;
if (ly_temp > 255)
ly_temp = 255;
if (ly_temp < 0)
ly_temp = 0;
int32_t rx_temp = (int16_t)buffer[4] - mid_values[2];
if (rx_temp > 0)
rx_temp *= JOYSTICK_SCALER / (max_values[2]-mid_values[2]);
else
rx_temp *= JOYSTICK_SCALER / (mid_values[2]-min_values[2]);
rx_temp += STICK_CENTER;
if (rx_temp > 255)
rx_temp = 255;
if (rx_temp < 0)
rx_temp = 0;
int32_t ry_temp = (int16_t)buffer[5] - mid_values[3];
if (ry_temp > 0)
ry_temp *= JOYSTICK_SCALER / (max_values[3]-mid_values[3]);
else
ry_temp *= JOYSTICK_SCALER / (mid_values[3]-min_values[3]);
ry_temp += STICK_CENTER;
if (ry_temp > 255)
ry_temp = 255;
if (ry_temp < 0)
ry_temp = 0;
// checks to avoid a data skip (0 values on input, which aren't possible, i think)
if (buffer[2])
joysticks[0] = lx_temp;
if (buffer[3])
joysticks[1] = ly_temp;
if (buffer[4])
joysticks[2] = rx_temp;
if (buffer[5])
joysticks[3] = ry_temp;
if (buffer[6])
joysticks[4] = buffer[6];
if (buffer[7])
joysticks[5] = buffer[7];
}

View File

@@ -1,34 +0,0 @@
#include "quantum.h"
/* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */
#ifndef NOP_FUDGE
# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX)
# define NOP_FUDGE 0.4
# else
# error("NOP_FUDGE configuration required")
# define NOP_FUDGE 1 // this just pleases the compile so the above error is easier to spot
# endif
#endif
#define NUMBER_NOPS 6
#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE)
#define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives
#define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC)
#define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE)
#define wait_ns(x) \
do { \
for (int i = 0; i < NS_TO_CYCLES(x); i++) { \
__asm__ volatile("nop\n\t" \
"nop\n\t" \
"nop\n\t" \
"nop\n\t" \
"nop\n\t" \
"nop\n\t"); \
} \
} while (0)
void gamecube_init(void);
void gamecube_scan(uint16_t * buttons, uint8_t * joysticks);

View File

@@ -1,3 +0,0 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { { 0 } } };

View File

@@ -1,12 +0,0 @@
J1 header
---------
|#|Color |Proton C|Description|
|-|-------|----|------------|
|1|blue |3.3V| |
|2|yellow |5V | |
|3|red |A2 |Data (3.3V) |
|4|green |GND | |
|5|white |GND | |
|6|black |NC | |

View File

@@ -1,15 +0,0 @@
# MCU name
MCU = STM32F303
BACKLIGHT_ENABLE = no
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = no
CONSOLE_ENABLE = no
NKRO_ENABLE = no
RAW_ENABLE = no
MIDI_ENABLE = no
VIRTSER_ENABLE = no
KEYBOARD_ENABLE = no
SWITCH_CONTROLLER_ENABLE = yes
SRC += gc_read.c

View File

@@ -29,4 +29,4 @@
#define RGB_DI_PIN A0
#define ADC_PIN A1
#define ADC_PIN A0

View File

@@ -0,0 +1,90 @@
/*
* Copyright 2021 Joschua Gandert
*
* 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 "keymap_german.h"
enum layer_names {
_BASE,
_GAME, /* WASD shifted right once */
_LOWER,
_RAISE,
_ADJUST /* when both LOWER and RAISE pressed */
};
#define RAISE MO(_RAISE)
#define LOWER MO(_LOWER)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , DE_SS ,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , DE_Z , KC_U , KC_I , KC_O , KC_P , DE_UDIA,
KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , DE_ODIA, DE_ADIA,
KC_LCTL, DE_Y , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT, DE_MINS, DE_PLUS,
RAISE, KC_SPC, KC_LCTL, KC_RALT, KC_BSPC, LOWER,
KC_ENT, KC_LALT, KC_LGUI, KC_RSFT
),
[_GAME] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_T , KC_TAB , KC_Q , KC_W , KC_E , KC_R , _______, _______, KC_UP, _______, _______, _______,
KC_G , KC_LSFT, KC_A , KC_S , KC_D , KC_F , _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
KC_B , KC_LCTL, DE_Y , KC_X , KC_C , KC_V , _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______
),
[_LOWER] = LAYOUT(
KC_TILD, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL ,
_______, DE_HASH, DE_CIRC, KC_PGUP, DE_LABK, _______, _______, KC_P7 , KC_P8 , KC_P9 , KC_PPLS, KC_BSPC ,
_______, DE_ACUT, KC_HOME, KC_PGDN, KC_END , KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 , KC_PDOT, _______ ,
_______, KC_PLUS, KC_PIPE, KC_UNDS, _______, _______, KC_P0 , KC_P1 , KC_P2 , KC_P3 , KC_PENT, KC_KP_EQUAL,
_______, KC_RGHT, _______, _______, _______, _______,
KC_LEFT, _______, RESET , _______
),
[_RAISE] = LAYOUT(
KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 ,
_______, _______, _______, KC_UP , _______, _______, KC_LALT, KC_INS , KC_NLCK , KC_CALC, KC_PSCREEN, KC_MUTE,
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT , KC_MSEL, KC_MPRV , KC_MPLY , KC_MNXT, _______ , KC_VOLU,
_______, _______, _______, _______, _______, _______, DE_HASH, KC_MYCM , _______ , _______, KC_SLCK , KC_VOLD,
_______, _______, _______, _______, KC_UP , _______,
_______, _______, _______, KC_DOWN
),
[_ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, RESET , _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, DF(_GAME), _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, DF(_BASE), _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______,
_______, _______, _______, _______
),
};
layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}

View File

@@ -0,0 +1,24 @@
![German Gaming Layout Image](https://i.imgur.com/0y938rG.png)
Despite being less accurate, the columns in the image are shifted up and down to avoid the [Hermann grid illusion](https://en.wikipedia.org/wiki/Grid_illusion).
# German Gaming Layout
This layout was build with gaming in mind for a german user. As a result I added a "game" layer that shifts the keys of the left side (below the number row) one to the right, so that <kbd>WASD</kbd> is on the <kbd>ESDF</kbd> keys. The reason this layer was added is that using <kbd>WASD</kbd> is less comfortable with a contoured Dactyl-style keyboard, where each column is adjusted for the respective fingers. <kbd>ESDF</kbd> also has the upside of allowing one to stay in the home row. Note that the rightmost column of the default layer, so <kbd>TGB</kbd>, ends up in the leftmost position.
Of course, one could just be forced to reconfigure every game, but that wouldn't be very user-friendly and likely reduce satisfaction with the layout. When in game mode, the right side of keys also features arrow keys on <kbd>IJKL</kbd>.
## Raise and Lower layer
Additionally, via the RAISE layer, it's always possible to access the arrow keys, which are often used in game menues. On the exact same position one can access <kbd>Home</kbd>, <kbd>End</kbd>, <kbd>Page Down</kbd> and <kbd>Page Up</kbd> via the LOWER layer. The left side of the LOWER layer also contains the few characters that would usually have their own key in a traditional german keyboard.
The right side features various media keys in the RAISE layer, and a numpad in the LOWER layer.
## Firmware
The keyboard can be put into Reset mode (for flashing a keymap) by pressing <kbd>**LOWER**</kbd> + <kbd>Super</kbd> (also known as Windows key), or by pressing <kbd>**LOWER**</kbd> + <kbd>**RAISE**</kbd> + <kbd>R</kbd>.
`MOUSEKEY_ENABLE` was set to `no` for this keymap, since it wasn't used and the size of the firmware ended up being too large.

View File

@@ -0,0 +1 @@
MOUSEKEY_ENABLE = no

View File

@@ -1,4 +1,4 @@
/* Copyright 2020 Jay Greco
/* Copyright 2020 James Young (@noroadsleft)
*
* 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
@@ -13,9 +13,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Custom config starts after VIA's EEPROM usage,
// dynamic keymaps start after this.
// Custom config Usage:
// 1 for enabled encoder modes (1 byte)
// 6 for 3x custom encoder settings, left, right, and press (18 bytes)
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 19
#pragma once
#undef MANUFACTURER
#undef PRODUCT
#define MANUFACTURER KBDfans
#define PRODUCT KBD75 rev1
#define BACKLIGHT_BREATHING

View File

@@ -0,0 +1,212 @@
/* Copyright 2020 James Young (@noroadsleft)
*
* 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 "noroadsleft.h"
//#include "version.h"
#include "sendstring_dvorak.h"
#define LAYOUT_75_ansi_wkl( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
K500, K501, K506, K510, K512, K513, K514, K515 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
{ K500, K501, KC_NO, KC_NO, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
}
enum layer_names {
_QW,
_DV,
_Q2,
_FN,
_SY
};
enum custom_keycodes {
GO_Q2 = KEYMAP_SAFE_RANGE,
Q2_ENT
};
unsigned char q2InputMode = 0;
// Tap Dance declarations
enum tap_dances {
LAG,
RAG,
};
// Tap Dance definitions
qk_tap_dance_action_t tap_dance_actions[] = {
// Tap once for Escape, twice for Caps Lock
[LAG] = ACTION_TAP_DANCE_DOUBLE(KC_LALT, KC_LGUI),
[RAG] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_RGUI),
};
#define FN_CAPS LT(_FN,KC_CAPS)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QW] = LAYOUT_75_ansi_wkl(
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, _______, _______, MO(_SY),
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_HOME,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
FN_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_END,
KC_LCTL, TD(LAG), KC_SPC, TD(RAG), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_DV] = LAYOUT_75_ansi_wkl(
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, _______, _______, MO(_SY),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_HOME,
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_PGUP,
FN_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGDN,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, KC_END,
KC_LCTL, TD(LAG), KC_SPC, TD(RAG), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[_Q2] = LAYOUT_75_ansi_wkl(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ENT, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_LALT, _______, KC_RALT, _______, _______, _______, _______
),
[_FN] = LAYOUT_75_ansi_wkl(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______,
_______, KC_CALC, KC_APP, G_PUSH, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, _______,
_______, M_SALL, _______, G_FTCH, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______,
_______, M_UNDO, M_CUT, M_COPY, M_PASTE, G_BRCH, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
[_SY] = LAYOUT_75_ansi_wkl(
_______, TO(_QW), TO(_DV), _______, GO_Q2, _______, _______, _______, RESET, EEP_RST, DEBUG, _______, VRSN, _______, _______, _______,
_______, _______, M_MDSWP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______,
_______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
};
bool led_update_user(led_t led_state) {
writePin(B2, !led_state.caps_lock);
return false;
}
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case G_PUSH:
if (record->event.pressed) {
SEND_STRING("git push origin ");
};
return false;
case G_FTCH:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_SHIFT ) {
clear_mods();
SEND_STRING("git pull upstream ");
} else {
SEND_STRING("git fetch upstream ");
}
};
return false;
case G_BRCH:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_SHIFT ) {
clear_mods();
SEND_STRING("master");
} else {
SEND_STRING("$(git branch-name)");
}
};
return false;
case GO_Q2:
if (record->event.pressed) {
layer_move(_QW);
layer_on(_Q2);
};
return false;
case Q2_ENT:
if (record->event.pressed) {
if (q2InputMode == 0) {
tap_code(KC_ENT);
q2InputMode = 1;
layer_on(_DV);
//layer_on(_Q2);
} else if (q2InputMode == 1) {
tap_code(KC_ENT);
q2InputMode = 0;
layer_off(_DV);
} else {
tap_code(KC_ENT);
}
};
return false;
case KC_ESC:
if (record->event.pressed) {
if (q2InputMode > 0) {
tap_code(KC_ESC);
q2InputMode = 0;
layer_off(_DV);
} else {
tap_code(KC_ESC);
}
};
return false;
case KC_GRV:
if (IS_LAYER_ON(_Q2) == true) {
if (record->event.pressed) {
if (q2InputMode == 0) {
tap_code(KC_GRV);
q2InputMode = 2;
layer_on(_DV);
} else if (q2InputMode == 1) {
tap_code(KC_GRV);
q2InputMode = 2;
} else {
tap_code(KC_GRV);
q2InputMode = 0;
layer_off(_DV);
}
return false;
}
};
return true;
case KC_Z:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_RALT ) {
register_code(KC_NUBS);
} else {
register_code(KC_Z);
}
} else {
if ( get_mods() & MOD_MASK_RALT ) {
unregister_code(KC_NUBS);
} else {
unregister_code(KC_Z);
}
};
return false;
default:
return true;
}
}

View File

@@ -0,0 +1,6 @@
BOOTMAGIC_ENABLE = lite
CONSOLE_ENABLE = yes
TAP_DANCE_ENABLE = yes
VIA_ENABLE = no
LTO_ENABLE = yes

View File

@@ -1,3 +1,19 @@
/* Copyright 2018-2020 James Young (@noroadsleft)
*
* 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 PERMISSIVE_HOLD // https://docs.qmk.fm/#/feature_advanced_keycodes?id=permissive-hold

View File

@@ -1,8 +1,23 @@
#include QMK_KEYBOARD_H
#include "version.h"
#include <sendstring_dvorak.h>
//#include <sendstring_colemak.h>
#include <print.h>
/* Copyright 2018-2020 James Young (@noroadsleft)
*
* 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 "noroadsleft.h"
#include "sendstring_dvorak.h"
//#include "sendstring_colemak.h"
#include "print.h"
/**********************
@@ -10,83 +25,33 @@
**********************/
enum layer_names {
// BASE LAYERS
// SHORT CODES
_QWERTY = 0,
_QW = _QWERTY,
_DVORAK,
_DV = _DVORAK,
_COLEMAK,
_CM = _COLEMAK,
_MAC,
_MC = _MAC,
_QUAKE2,
_Q2 = _QUAKE2,
_QUAKE2_DVORAK,
_QD = _QUAKE2_DVORAK,
_QUAKE2_CONSOLE,
_QC = _QUAKE2_CONSOLE,
// FUNCTION LAYERS
_FUNCWIN,
_FW = _FUNCWIN,
_FUNCMAC,
_FM = _FUNCMAC,
_FUNCQ2,
_FQ = _FUNCQ2,
_QW, // QWERTY
_DV, // Dvorak
_CM, // Colemak
// QUAKE 2 OVERLAY
_Q2, // Quake 2
// FUNCTION LAYER
_FN, // Function
// OTHER LAYERS
_NUMPAD,
_NP = _NUMPAD,
_MACROS,
_MA = _MACROS,
_SYSTEM,
_SY = _SYSTEM,
_NP, // Numpad
_MA, // Macros
_SY, // System
};
// KEYCODE DEFINITIONS
#define NO_CHNG KC_TRNS // Note for me for keys I need to leave as Pass-through
#define FW_CAPS LT(_FUNCWIN, KC_CAPS) // _FUNCWIN when held, Caps Lock when tapped
#define FM_CAPS LT(_FUNCMAC, KC_CAPS) // _FUNCMAC when held, Caps Lock when tapped
#define Q2_CAPS LT(_FUNCQ2, KC_CAPS) // _FUNCQ2 when held, Caps Lock when tapped
#define WN_SALL LCTL(DV_A) // Windows/Linux Select All
#define WN_UNDO LCTL(DV_Z) // Windows/Linux Undo
#define WN_CUT LCTL(DV_X) // Windows/Linux Cut
#define WN_COPY LCTL(DV_C) // Windows/Linux Copy
#define WN_PSTE LCTL(DV_V) // Windows/Linux Paste
#define FN_CAPS LT(_FN, KC_CAPS) // Function Layer when held, Caps Lock when tapped
#define Q2_CAPS LT(_FQ, KC_CAPS) // Quake 2 Function Layer when held, Caps Lock when tapped
#define CTL_GRV MT(MOD_LCTL, KC_GRV) // Left Control when held, Grave accent when tapped
#define MC_PSCR LGUI(LSFT(KC_3)) // MacOS Print Screen (Command + Shift + 3)
#define MC_HOME LGUI(KC_LEFT) // MacOS Home (Command + Left Arrow)
#define MC_END LGUI(KC_RGHT) // MacOS End (Command + Right Arrow)
#define MC_SALL LGUI(KC_A) // MacOS Select All
//#define MC_UNDO LGUI(KC_Z) // MacOS Undo // replaced by macro
#define MC_CUT LGUI(KC_X) // MacOS Cut
#define MC_COPY LGUI(KC_C) // MacOS Copy
//#define MC_PSTE LGUI(KC_V) // MacOS Paste // replaced by macro
// MACRO DEFINITIONS
enum custom_keycodes {
F_CAPS = SAFE_RANGE,
T_L3DED,
G_PUSH,
G_FTCH,
G_COMM,
G_RST,
G_C10R,
G_BRCH,
SIGNA,
GO_Q2,
Q2_ON,
Q2_OFF,
Q2_ESC,
Q2_GRV,
MC_UNDO,
MC_PSTE,
NUBS_Z,
VRSN
GO_Q2 = KEYMAP_SAFE_RANGE,
Q2_ENT
};
@@ -94,158 +59,90 @@ enum custom_keycodes {
** MODIFIER MASKS **
*******************/
#define MOD_MASK_RALT (MOD_BIT(KC_RALT))
unsigned char q2InputMode = 0;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch(keycode) {
// these are our macros!
case F_CAPS:
/*
* Objective: write a macro that checks the current layers that are
* enabled, and activates the appropriate function layer.
*/
if ( biton32(layer_state) == _MAC ) {
if (record->event.pressed) {
layer_on(_FUNCMAC);
} else {
layer_off(_FUNCMAC);
}
} else {
if (record->event.pressed) {
layer_on(_FUNCWIN);
} else {
layer_off(_FUNCWIN);
}
};
return false;
case T_L3DED:
if (record->event.pressed) {
SEND_STRING("lavak3DED ");
};
return false;
case G_PUSH:
if (record->event.pressed) {
SEND_STRING("git push origin ");
};
return false;
case G_FTCH:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_SHIFT ) {
clear_mods();
SEND_STRING("git pull upstream ");
} else {
SEND_STRING("git fetch upstream ");
}
};
return false;
case G_COMM:
if (record->event.pressed) {
SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT));
layer_off(_MACROS);
};
return false;
case G_BRCH:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_SHIFT ) {
clear_mods();
SEND_STRING("master");
} else {
SEND_STRING("$(git branch-name)");
}
layer_off(_MACROS);
};
return false;
case SIGNA:
if (record->event.pressed) {
SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER));
layer_off(_MACROS);
};
return false;
case GO_Q2:
if (record->event.pressed) {
//default_layer_set(_QWERTY);
layer_move(_QWERTY); // TO(_QWERTY);
layer_on(_QUAKE2);
//layer_off(_SYSTEM);
//default_layer_set(_QW);
layer_move(_QW); // TO(_QW);
layer_on(_Q2);
//layer_off(_SY);
};
return false;
case Q2_ON:
case Q2_ENT:
if (record->event.pressed) {
SEND_STRING(SS_TAP(X_ENTER));
layer_on(_DVORAK);
layer_on(_QUAKE2_DVORAK);
};
return false;
case Q2_OFF:
if (record->event.pressed) {
SEND_STRING(SS_TAP(X_ENTER));
layer_move(_QWERTY); // TO(_QWERTY);
layer_on(_QUAKE2);
};
return false;
case Q2_ESC:
if (record->event.pressed) {
SEND_STRING(SS_TAP(X_ESCAPE));
layer_move(_QWERTY); // TO(_QWERTY);
layer_on(_QUAKE2);
};
return false;
case Q2_GRV:
if (record->event.pressed) {
SEND_STRING(SS_TAP(X_GRAVE));
layer_on(_DVORAK);
layer_on(_QUAKE2_DVORAK);
layer_on(_QUAKE2_CONSOLE);
};
return false;
case MC_UNDO:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_SHIFT ) {
SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
if (q2InputMode == 0) {
tap_code(KC_ENT);
q2InputMode = 1;
layer_on(_DV);
//layer_on(_Q2);
} else if (q2InputMode == 1) {
tap_code(KC_ENT);
q2InputMode = 0;
layer_off(_DV);
} else {
SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) );
tap_code(KC_ENT);
}
};
return false;
case MC_PSTE:
case KC_ESC:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_SHIFT ) {
SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) );
if (q2InputMode > 0) {
tap_code(KC_ESC);
q2InputMode = 0;
layer_off(_DV);
} else {
SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) );
tap_code(KC_ESC);
}
};
return false;
case NUBS_Z:
case KC_GRV:
if (IS_LAYER_ON(_Q2) == true) {
if (record->event.pressed) {
if (q2InputMode == 0) {
tap_code(KC_GRV);
q2InputMode = 2;
layer_on(_DV);
} else if (q2InputMode == 1) {
tap_code(KC_GRV);
q2InputMode = 2;
} else {
tap_code(KC_GRV);
q2InputMode = 0;
layer_off(_DV);
}
}
};
return false;
case KC_Z:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_RALT ) {
SEND_STRING( SS_DOWN(X_NONUS_BSLASH) );
register_code(KC_NUBS);
} else {
SEND_STRING( SS_DOWN(X_Z) );
register_code(KC_Z);
}
} else {
if ( get_mods() & MOD_MASK_RALT ) {
SEND_STRING( SS_UP(X_NONUS_BSLASH) );
unregister_code(KC_NUBS);
} else {
SEND_STRING( SS_UP(X_Z) );
unregister_code(KC_Z);
}
};
return false;
case VRSN:
if (record->event.pressed) {
SEND_STRING( QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION );
}
return false;
case KC_1 ... KC_0:
if (record->event.pressed) {
if ( get_mods() & MOD_MASK_RALT ) {
register_code( keycode + 0x3b );
register_code( keycode + 0x3B );
} else {
register_code( keycode );
}
} else {
if ( get_mods() & MOD_MASK_RALT ) {
unregister_code( keycode + 0x3b );
unregister_code( keycode + 0x3B );
} else {
unregister_code( keycode );
}
@@ -279,47 +176,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
****************/
/* QWERTY */
[_QWERTY] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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, \
FW_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, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \
[_QW] = 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,
FN_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,
CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FN), KC_RCTL
),
/* Dvorak */
[_DVORAK] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, \
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, \
FW_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, \
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \
CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \
[_DV] = 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_LBRC, KC_RBRC, KC_BSPC,
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS,
FN_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT,
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT,
CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FN), KC_RCTL
),
/* Colemak */
[_COLEMAK] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \
FW_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FW), KC_RCTL \
),
/****************
** OS OVERLAYS **
****************/
/* Mac */
[_MAC] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
FM_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, MO(_FM), _______ \
[_CM] = 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS,
FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
CTL_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_MA), MO(_FN), KC_RCTL
),
/*********************
@@ -327,65 +207,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*********************/
/* Quake 2 */
[_QUAKE2] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ON, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
),
[_QUAKE2_DVORAK] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_OFF, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
),
[_QUAKE2_CONSOLE] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Q2_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
Q2_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, MO(_FQ), _______ \
[_Q2] = LAYOUT_60_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, Q2_ENT,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_GRV, _______, _______, _______, _______, _______, _______, _______
),
/********************
** FUNCTION LAYERS **
********************/
/* Windows Fn layer */
[_FUNCWIN] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
NO_CHNG, WN_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT, \
_______, WN_UNDO, WN_CUT, WN_COPY, WN_PSTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______, \
_______, _______, _______, TG(_NP), _______, TG(_MA), NO_CHNG, _______ \
),
/* MacOS Fn layer */
[_FUNCMAC] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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_INS, MC_HOME, KC_UP, MC_END, KC_PGUP, MC_PSCR, _______, _______, \
NO_CHNG, MC_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, \
_______, MC_UNDO, MC_CUT, MC_COPY, MC_PSTE, _______, _______, _______, _______, _______, TG(_SY), _______, \
_______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
),
/* Quake 2 Fn layer */
[_FUNCQ2] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Q2_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_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS, \
NO_CHNG, _______, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_ENT, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(_SY), _______, \
_______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
/* Fn layer */
[_FN] = LAYOUT_60_ansi(
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_CALC, KC_APP, _______, _______, _______, KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSCR, KC_SLCK, KC_PAUS,
NO_CHNG, M_SALL, _______, _______, _______, _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_PENT,
_______, M_UNDO, M_CUT, M_COPY, M_PASTE, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, TG(_SY), _______,
_______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______
),
/*****************
@@ -393,33 +233,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*****************/
/* Numpad layer */
[_NUMPAD] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______, \
_______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______, \
_______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT, \
_______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______, \
_______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______ \
[_NP] = LAYOUT_60_ansi(
_______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, _______, _______,
_______, _______, _______, _______, KC_E, KC_F, _______, KC_P4, KC_P5, KC_P6, KC_PAST, KC_PSLS, KC_PEQL, _______,
_______, _______, _______, _______, KC_C, KC_D, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PMNS, KC_PENT,
_______, _______, _______, _______, KC_A, KC_B, _______, KC_P0, _______, KC_PDOT, _______, _______,
_______, _______, _______, TG(_NP), _______, _______, NO_CHNG, _______
),
/* Macro layer */
[_MACROS] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DM_REC1, DM_REC2, _______, \
_______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_RSTP, \
_______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, NO_CHNG, _______ \
[_MA] = LAYOUT_60_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DM_REC1, DM_REC2, _______,
_______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, DM_PLY1, DM_PLY2, DM_RSTP,
_______, _______, _______, G_FTCH, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, G_BRCH, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, NO_CHNG, _______
),
/* System layer */
[_SYSTEM] = LAYOUT_60_ansi(
// 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, \
XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX \
[_SY] = LAYOUT_60_ansi(
TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX,
XXXXXXX, XXXXXXX, M_MDSWP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_CHNG, XXXXXXX
),
};

View File

@@ -27,15 +27,12 @@ Descriptions of the physical locations of keys will use the key's function in a
- Layer 0: QWERTY `_QW`
- Layer 1: Hardware Dvorak `_DV`
- Layer 2: Hardware Colemak `_CM`
- [OS Overlays](./readme_ch2.md)
- Layer 3: MacOS Overlay `_MC`
- [Quake 2 Overlays](./readme_ch3.md)
- Layers 4, 5 and 6: Quake 2 `_Q2`, Quake 2 Dvorak `_QD`, and Quake 2 Console `_QC`
- [Function Layers](./readme_ch4.md)
- Layer 7: Windows Fn layer `_FW`
- Layer 8: MacOS-oriented Fn layer `_FM`
- Layer 9: Quake 2 Fn layer `_FQ`
- [Other Layers](./readme_ch5.md)
- Layer 10: Numpad layer `_NP`
- Layer 11: Macro layer `_MA`
- Layer 12: System layer `_SY`
- [Quake 2 Overlays](./readme_ch2.md)
- Layers 3, 4 and 5: Quake 2 `_Q2`, Quake 2 Dvorak `_QD`, and Quake 2 Console `_QC`
- [Function Layers](./readme_ch3.md)
- Layer 6: Fn layer `_FN`
- Layer 7: Quake 2 Fn layer `_FQ`
- [Other Layers](./readme_ch4.md)
- Layer 8: Numpad layer `_NP`
- Layer 9: Macro layer `_MA`
- Layer 10: System layer `_SY`

View File

@@ -2,10 +2,9 @@
- [Table of Contents](./readme.md)
1. **Base Layers**
2. [**OS Overlays**](./readme_ch2.md)
3. [Quake 2 Overlays](./readme_ch3.md)
4. [Function Layers](./readme_ch4.md)
5. [Other Layers](./readme_ch5.md)
2. [Quake 2 Overlays](./readme_ch2.md)
3. [Function Layers](./readme_ch3.md)
4. [Other Layers](./readme_ch4.md)
----
@@ -19,7 +18,7 @@ Standard QWERTY layout, with four QMK features:
- The `Caps Lock` key has been replaced with a dual function `LT()` key, which opens the Windows Fn layer when held, and is `Caps Lock` when tapped
- The Left `Control` key has been replaced with a `MT(MOD_CTRL, KC_GRV)` key, which is <code>&#96; ~</code> when tapped and `Ctrl` when held.
![QWERTY layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_00.png)
![QWERTY layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/QWERTY.png)
----
@@ -30,7 +29,7 @@ Standard QWERTY layout, with four QMK features:
A hardware-based Dvorak Simplified layout. At my weekend job, I use a shared computer that runs MacOS Sierra, in US QWERTY layout. In this layer, I can leave the system in QWERTY, plug my keyboard in, and still type in Dvorak.
![Hardware Dvorak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_01.png)
![Hardware Dvorak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Dvorak.png)
----
@@ -41,9 +40,9 @@ A hardware-based Dvorak Simplified layout. At my weekend job, I use a shared com
A hardware-based Colemak layout. Been thinking of trying it, so it's here.
![Hardware Colemak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_02.png)
![Hardware Colemak layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Colemak.png)
----
Next Chapter: [OS Overlays](./readme_ch2.md)
Next Chapter: [Quake 2 Overlays](./readme_ch2.md)

View File

@@ -2,23 +2,35 @@
- [Table of Contents](./readme.md)
1. [Base Layers](./readme_ch1.md)
2. **OS Overlays**
3. [Quake 2 Overlays](./readme_ch3.md)
4. [Function Layers](./readme_ch4.md)
5. [Other Layers](./readme_ch5.md)
2. **Quake 2 Overlays**
3. [Function Layers](./readme_ch3.md)
4. [Other Layers](./readme_ch4.md)
----
## Layer 3: Layer 3: MacOS Overlay `_MC`
## Layers 3, 4 and 5: Quake 2 `_Q2`, Quake 2 Dvorak `_QD`, and Quake 2 Console `_QC`
### Toggled by holding either `Fn` and tapping `/?` key, then tapping `W`.
### Accessed by holding either `Fn` key and tapping the `/?` key, then tapping `4$`
This layer overrides the `Fn` keys on whichever base layer is currently enabled, sending the keyboard to the MacOS-oriented Fn layer `_FM`, instead of the Windows Fn layer `_FW`.
These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method.
![MacOS Overlay](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_03.png)
I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L387), is a [macro](./keymap.c#L101-L108) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching.
When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L109-L115) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L116-L122) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L123-L129) that cancels the sending of the message, and undoes the layers.
I have been testing this configuration for a few months. Sometimes I end up still in Dvorak mode without any text input systems (in-game chat or the console) running, but it pretty much always happens when I'm focused on the game, so I don't know the cause yet.
### Layer 3: Quake 2
![Quake 2](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Quake%202.png)
### Layer 4: Quake 2 Dvorak
![Quake 2 Dvorak](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Quake%202%20Dvorak.png)
### Layer 5: Quake 2 Console
![Quake 2 Console](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Quake%202%20Console.png)
----
Next Chapter: [Quake 2 Overlays](./readme_ch3.md)
Next Chapter: [Function Layers](./readme_ch3.md)

View File

@@ -2,36 +2,39 @@
- [Table of Contents](./readme.md)
1. [Base Layers](./readme_ch1.md)
2. [OS Overlays](./readme_ch2.md)
3. **Quake 2 Overlays**
4. [Function Layers](./readme_ch4.md)
5. [Other Layers](./readme_ch5.md)
2. [Quake 2 Overlays](./readme_ch2.md)
3. **Function Layers**
4. [Other Layers](./readme_ch4.md)
----
## Layers 4, 5 and 6: Quake 2 `_Q2`, Quake 2 Dvorak `_QD`, and Quake 2 Console `_QC`
## Layer 6: Fn layer - `_FN`
### Accessed by holding either `Fn` key and tapping the `/?` key, then tapping `4$`
### Accessed by holding either `Fn` key from any base layer
These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method.
Arrows, Navigation keys (Insert, Home, Page Up, etc.), and Function keys are here. Also has keys for Calculator, Menu, Volume Control, and shortcuts for Select All, Undo, Cut, Copy, and Paste. Numpad Enter for when I'm working in Adobe Photoshop, because it treats Numpad Enter differently from the regular Enter key.
I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L418), is a [macro](./keymap.c#L164-L171) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching.
When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L172-L178) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L179-L185) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L186-L192) that cancels the sending of the message, and undoes the layers.
I have been testing this configuration for a few months. Sometimes I end up still in Dvorak mode without any text input systems (in-game chat or the console) running, but it pretty much always happens when I'm focused on the game, so I don't know the cause yet.
### Layer 4: Quake 2
![Quake 2](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_04.png)
### Layer 5: Quake 2 Dvorak
![Quake 2 Dvorak](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_05.png)
### Layer 6: Quake 2 Console
![Quake 2 Console](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_06.png)
![Windows Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Fn.png)
----
Next Chapter: [Function Layers](./readme_ch4.md)
## Layer 7: Quake 2 Fn layer - `_FQ`
### Accessed by holding either `Fn` key while either Quake 2 overlay is active.
Based on the Windows function layer, but removes some functions that are pointless to have while in the game.
![Quake 2 Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Quake%202%20Fn.png)
Keycode(s) Sent | Notes
:-------------------------------- | :----
[`Q2_GRV`](./keymap.c#L130-L137) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers.
----
Next Chapter: [Other Layers](./readme_ch4.md)

View File

@@ -2,51 +2,109 @@
- [Table of Contents](./readme.md)
1. [Base Layers](./readme_ch1.md)
2. [OS Overlays](./readme_ch2.md)
3. [Quake 2 Overlays](./readme_ch3.md)
4. **Function Layers**
5. [Other Layers](./readme_ch5.md)
2. [Quake 2 Overlays](./readme_ch2.md)
3. [Function Layers](./readme_ch3.md)
4. **Other Layers**
----
## Layer 7: Windows Fn layer - `_FW`
## Layer 8: Numpad layer - `_NP`
### Accessed by holding either `Fn` key in Layer 0
### Accessed by holding either `Fn` key and tapping `Space`, from any of the Base Layers
Arrows, Navigation keys (Insert, Home, Page Up, etc.), and Function keys are here. Also has keys for Calculator, Menu, Volume Control, and shortcuts for Select All, Undo, Cut, Copy, and Paste. Numpad Enter for when I'm working in Adobe Photoshop, because it treats Numpad Enter differently from the regular Enter key.
Puts a Numpad on the right-hand side of the keyboard. A through F included for hexadecimal input. Tapping `Space` returns to the previous Base Layer.
![Windows Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_07.png)
![Numpad layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Numpad.png)
----
## Layer 8: MacOS-oriented Fn layer - `_FM`
## Layer 9: Macro layer - `_MA`
### Accessed by holding either `Fn` key in Layer 1
### Accessed by holding the right-side `Win` key
Based on my Windows Fn layer, but swaps a few functions for a MacOS environment. Arrow, Navigation, and Function keys are basically unchanged from Layer 2. This layer enables using either `Fn` key as a sort of simulated `Command` key, which I find easier to reach and use.
Has some macros that I use in Git, some frequently-typed strings, and keys for use with the [Dynamic Macros feature](https://docs.qmk.fm/#/feature_dynamic_macros).
![MacOS-oriented Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_08.png)
Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatically.
![Macro layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/Macro.png)
### Macros
#### [G_PUSH](./keymap.c#L71-L75)
Output: `git push origin `
Everything from here down is related to Git or GitHub.
#### [G_FTCH](./keymap.c#L76-L85)
| Condition | Output |
| :-------- | :----- |
| If <kbd>Shift</kbd> is active | `git pull upstream ` |
| Otherwise | `git fetch upstream ` |
#### [G_BRCH](./keymap.c#L86-L95)
| Condition | Output |
| :-------- | :----- |
| If <kbd>Shift</kbd> is active | `master` |
| Otherwise | `$(git branch-name)` |
`$(git branch-name)` is a [git alias](./readme_git.md) that returns the name of the current branch.
#### [SIGNA](./keymap.c#L96-L100)
Output: `\- @noroadsleft` <kbd>Enter</kbd>
Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key.
#### "Macro Mode" Macros and Customized Keycodes
Some of my macros and keycodes do different things depending on the value of the [`macroMode` variable](./keymap.c#L65), which is toggled between `0` and `1` by the [`M_MDSWP` custom keycode](./keymap.c#L238-L242). This is mainly at attempt to make various shortcuts the same key combinations between Windows/Linux and MacOS (which I use at home and work, respectively).
| Keycode | `macroMode == 0` | `macroMode == 1` | `macroMode == 1` with Shift |
| :------------------------------ | :--------------- | :--------------- | :--------------------------- |
| [M_SALL](./keymap.c#L138-L146) | `Ctrl+A` | `Cmd+A` | `Cmd+A` |
| [M_UNDO](./keymap.c#L147-L159) | `Ctrl+Z` | `Cmd+Z` | `Cmd+Shift+Z` |
| [M_CUT](./keymap.c#L160-L168) | `Ctrl+X` | `Cmd+X` | `Cmd+X` |
| [M_COPY](./keymap.c#L169-L177) | `Ctrl+C` | `Cmd+C` | `Cmd+C` |
| [M_PASTE](./keymap.c#L178-L190) | `Ctrl+V` | `Cmd+V` | `Cmd+Shift+Opt+V` |
| `KC_HOME` | `KC_HOME` | `Cmd+Left` | `Cmd+Left` |
| `KC_END` | `KC_END` | `Cmd+Right` | `Cmd+Right` |
| `KC_PSCR` | `KC_PSCR` | `Cmd+Shift+3` | `Cmd+Shift+3` |
#### [Emulated Non-US Backslash](./keymap.c#L218-L232)
Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z.
#### [VRSN](./keymap.c#L233-L237)
Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like:
kc60/noroadsleft @ 0.6.326-6-gae6d7b-dirty
#### [Emulated Numeric Keypad](./keymap.c#L243-L257)
If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °.
#### [Emulated Extended Function Keys](./keymap.c#L258-L272)
Similar to the emulated numpad, if I hold the Right Alt key with the Fn key, the function row (`KC_F1` through `KC_F12`) will output keycodes `KC_F13` throught `KC_F24`.
----
### Layer 10: System layer - `_SY`
#### Accessed by holding either `Fn` key and tapping the `/?` key
This is where I change my keyboard function. Base layer select on `1` through `3`, Backlight controls on `C` through `N`, Reset on `8*`, Debug on `0)`.
![System layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/System.png)
----
## Layer 9: Quake 2 Fn layer - `_FQ`
### Accessed by holding either `Fn` key while either Quake 2 overlay is active.
Based on the Windows function layer, but removes some functions that are pointless to have while in the game.
![Quake 2 Fn layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_09.png)
Keycode(s) Sent | Notes
:-------------------------------- | :----
[`Q2_GRV`](./keymap.c#L193-L200) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers.
----
Next Chapter: [Other Layers](./readme_ch5.md)
[Back to the index.](./)

View File

@@ -1,125 +0,0 @@
# @noroadsleft's KC60 keymap
- [Table of Contents](./readme.md)
1. [Base Layers](./readme_ch1.md)
2. [OS Overlays](./readme_ch2.md)
3. [Quake 2 Overlays](./readme_ch3.md)
4. [Function Layers](./readme_ch4.md)
5. **Other Layers**
----
## Layer 10: Numpad layer - `_NP`
### Accessed by holding either `Fn` key and tapping `Space`, from any of the Base Layers
Puts a Numpad on the right-hand side of the keyboard. A through F included for hexadecimal input. Tapping `Space` returns to the previous Base Layer.
![Numpad layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_10.png)
----
## Layer 11: Macro layer - `_MA`
### Accessed by holding the `Fn` key and tapping the right-side `Win` key
Has some macros that I use in Git, some frequently-typed strings, and keys for use with the [Dynamic Macros feature](https://docs.qmk.fm/#/feature_dynamic_macros).
Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatically.
![Macro layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_11.png)
### Macros
#### [G_PUSH](./keymap.c#L126-L130)
Output: `git push origin `
Everything from here down is related to Git or GitHub.
#### [G_FTCH](./keymap.c#L131-L140)
| Condition | Output |
| :-------- | :----- |
| If <kbd>Shift</kbd> is active | `git pull upstream ` |
| Otherwise | `git fetch upstream ` |
#### [G_COMM](./keymap.c#L141-L146)
Output: `git commit -m ""` <kbd>Left</kbd>
Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer.
#### [G_BRCH](./keymap.c#L147-L157)
| Condition | Output |
| :-------- | :----- |
| If <kbd>Shift</kbd> is active | `master` |
| Otherwise | `$(git branch-name)` |
`$(git branch-name)` is a [git alias](./readme_git.md) that returns the name of the current branch. This macro disables the Macro layer when finished.
#### [SIGNA](./keymap.c#L158-L163)
Output: `\- @noroadsleft` <kbd>Enter</kbd>
Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key. Disables the Macro layer when finished.
#### [MC_UNDO](./keymap.c#L201-L209)
| Condition | Output |
| :-------- | :----- |
| If <kbd>Shift</kbd> is active | <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>Z</kbd> |
| Otherwise | <kbd>Command</kbd> + <kbd>Z</kbd> |
An Undo shortcut that turns to Redo if <kbd>Shift</kbd> is being held. I'm not sure that part is required to get that behavior, but it works as desired, so I'm not messing with it.
#### [MC_PSTE](./keymap.c#L210-L218)
| Condition | Output |
| :-------- | :----- |
| If <kbd>Shift</kbd> is active | <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>Option</kbd> + <kbd>V</kbd> |
| Otherwise | <kbd>Command</kbd> + <kbd>V</kbd> |
The program I use this in uses <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>Option</kbd> + <kbd>V</kbd> to paste while maintaining formatting (typeface, text size, etc.). Sometimes I want this and sometimes I don't. Using <kbd>Shift</kbd> changes the behavior.
#### [NUBS_Z](./keymap.c#L219-L233)
| Condition | Output |
| :-------- | :----- |
| If Right <kbd>Alt</kbd> is active | `KC_NUBS` |
| Otherwise | `KC_Z` |
Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z.
#### [VRSN](./keymap.c#L234-L238)
Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like:
kc60/noroadsleft @ 0.6.326-6-gae6d7b-dirty
#### [Emulated Numeric Keypad](./keymap.c#L239-L253)
If I hold the Right Alt key, the number row (`KC_1` through `KC_0`) will output numpad keycodes instead of number row keycodes, enabling quicker access to characters like ™ and °.
#### [Emulated Extended Function Keys](./keymap.c#L254-L268)
Similar to the emulated numpad, if I hold the Right Alt key with the Fn key, the function row (`KC_F1` through `KC_F12`) will output keycodes `KC_F13` throught `KC_F24`.
----
### Layer 12: System layer - `_SY`
#### Accessed by holding either `Fn` key and tapping the `/?` key
This is where I change my keyboard function. Base layer select on `1` through `3`, Backlight controls on `C` through `N`, Reset on `8*`, Debug on `0)`.
![System layer](https://raw.githubusercontent.com/noroadsleft/qmk_images/master/keyboards/kc60/keymaps/noroadsleft/layer_12.png)
----
[Back to the index.](./)

View File

@@ -1,8 +1,6 @@
# https://github.com/qmk/qmk_firmware/issues/3448#issuecomment-406636125
# EXTRAFLAGS += -flto
LTO_ENABLE = yes
MOUSEKEY_ENABLE = no # Mouse keys
# COMMAND_ENABLE = no # Commands for debug and configuration
SPACE_CADET_ENABLE = no # Space Cadet
DYNAMIC_MACRO_ENABLE = yes
LTO_ENABLE = yes

View File

@@ -19,9 +19,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EE_HANDS
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define USB_POLLING_INTERVAL_MS 1

View File

@@ -0,0 +1,19 @@
/* Copyright 2021 Atsushi Nagase
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// place overrides here

View File

@@ -0,0 +1,45 @@
/* Copyright 2021 Atsushi Nagase
*
* 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 meishi2_moc_layers {
_DEFAULT,
_RAISE
};
#define PRO_MICRO_LED_TX D5
#define RAISE MO(_RAISE)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_DEFAULT] = LAYOUT( /* Base */
RAISE, KC_B, KC_N, KC_SPC
),
[_RAISE] = LAYOUT( /* Raise */
_______, KC_LEFT, KC_RGHT, LSFT(KC_S)
)
};
void matrix_init_user(void) {
setPinOutput(PRO_MICRO_LED_TX);
writePinHigh(PRO_MICRO_LED_TX);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (keycode == RAISE) {
writePin(PRO_MICRO_LED_TX, !record->event.pressed);
}
return true;
}

View File

@@ -0,0 +1,17 @@
# [MOC] keymap for meishi2
```
,--------- ------ ------ -----,
| RAISE | ⏮ | ⏭ | ⏯ |
`--------- ------ ------ -----'
```
## Raise Layer
```
,--------- ------ ------ -----,
| | ⏪ | ⏩ | 🔀 |
`--------- ------ ------ -----'
```
[moc]: http://moc.daper.net/

View File

@@ -0,0 +1,51 @@
/* Copyright 2020 MelGeek <melgeek001365@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xEDED
#define PRODUCT_ID 0x0065
#define DEVICE_VER 0x0001
#define MANUFACTURER MelGeek
#define PRODUCT MJ65
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3
/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1

View File

@@ -0,0 +1,85 @@
{
"keyboard_name": "MJ65",
"url": "",
"maintainer": "melgeek001365",
"width": 16,
"height": 5,
"layouts": {
"LAYOUT_65_ansi": {
"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},
{"x":11, "y":4},
{"x":12, "y":4},
{"x":13, "y":4},
{"x":14, "y":4},
{"x":15, "y":4}
]
}
}
}

View File

@@ -0,0 +1,34 @@
/* Copyright 2020 MelGeek <melgeek001365@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_65_ansi( /* Base */
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_INS,
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_BSLASH, KC_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
[1] = LAYOUT_65_ansi( /* FN */
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_HOME,
_______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, RESET, _______,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, KC_HOME, _______, EEP_RST, _______,
_______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, KC_INS, KC_END, _______, KC_VOLU, KC_MUTE,
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
)
};

View File

@@ -0,0 +1,48 @@
/* Copyright 2020 MelGeek <melgeek001365@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_65_ansi( /* Base */
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_INS,
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_BSLASH, KC_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
),
[1] = LAYOUT_65_ansi( /* FN */
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_HOME,
_______, RGB_TOG, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_PSCR, KC_SLCK, KC_PAUS, RESET, _______,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_SPI, RGB_SPD, KC_HOME, _______, EEP_RST, _______,
_______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, KC_INS, KC_END, _______, KC_VOLU, KC_MUTE,
_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT
),
[2] = LAYOUT_65_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[3] = LAYOUT_65_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};

View File

@@ -0,0 +1,2 @@
VIA_ENABLE = yes
LTO_ENABLE = yes

View File

@@ -0,0 +1,17 @@
/* Copyright 2020 MelGeek <melgeek001365@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 "mj65.h"

View File

@@ -0,0 +1,36 @@
/* Copyright 2020 MelGeek <melgeek001365@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
#define XXX KC_NO
#define LAYOUT_65_ansi( \
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, K3C, K3E, \
K40, K41, K42, K45, K49, K4A, K4B, 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, XXX, K2E}, \
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, XXX, K3E}, \
{ K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E} \
}

View File

@@ -0,0 +1,16 @@
# MelGeek MJ65
![MJ65](https://cdn.shopifycdn.net/s/files/1/0078/2863/5712/products/c34621677ffc53ea6d1c68ab82100749_1024x1024@2x.jpg?v=1612186093)
A hotswap 65% RGB Custom Mechanical keyboard with arrow.
* Keyboard Maintainer: [melgeek001365](https://github.com/melgeek001365)
* Hardware Supported: MJ65 REV3 20210120
* Hardware Availability: [MelGeek](https://www.melgeek.com/)
Make example for this keyboard (after setting up your build environment):
make melgeek/mj65/rev3:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

View File

@@ -0,0 +1,39 @@
/* Copyright 2020 MelGeek <melgeek001365@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/*
* 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 { B12, B11, B10, B1, A3 }
#define MATRIX_COL_PINS { B15, A8, B13, A15, B3, B4, B5, B8, B9, C13, C14, C15, A0, A1, B14 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define DRIVER_1_LED_TOTAL 76
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0

View File

@@ -0,0 +1,139 @@
/* Copyright 2020 MelGeek <melgeek001365@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 "mj65.h"
#ifdef RGB_MATRIX_ENABLE
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */
{0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB4 */
{0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB5 */
{0, CS9_SW6, CS8_SW6, CS7_SW6}, /* RGB6 */
{0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB7 */
{0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB8 */
{0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB9 */
{0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB46 */
{0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB47 */
{0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB48 */
{0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB49 */
{0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB50 */
{0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB51 */
{0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB52 */
{0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB53 */
{0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB10 */
{0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB11 */
{0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB12 */
{0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB13 */
{0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB14 */
{0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB15 */
{0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB16 */
{0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB17 */
{0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB18 */
{0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB54 */
{0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB55 */
{0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB56 */
{0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB57 */
{0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB58 */
{0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB59 */
{0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB19 */
{0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB20 */
{0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB21 */
{0, CS15_SW4, CS14_SW4, CS13_SW4}, /* RGB22 */
{0, CS15_SW5, CS14_SW5, CS13_SW5}, /* RGB23 */
{0, CS15_SW6, CS14_SW6, CS13_SW6}, /* RGB24 */
{0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB25 */
{0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB26 */
{0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB27 */
{0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB60 */
{0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB61 */
{0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB62 */
{0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB63 */
{0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB64 */
{0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB65 */
{0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB66 */
{0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB28 */
{0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB29 */
{0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB30 */
{0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB31 */
{0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB32 */
{0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB33 */
{0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB34 */
{0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB35 */
{0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB36 */
{0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB67 */
{0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB68 */
{0, CS30_SW6, CS29_SW6, CS28_SW6}, /* RGB69 */
{0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB70 */
{0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB71 */
{0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB72 */
{0, CS33_SW1, CS32_SW1, CS31_SW1}, /* RGB73 */
{0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB37 */
{0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB38 */
{0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB39 */
{0, CS21_SW4, CS20_SW4, CS19_SW4}, /* RGB40 */
{0, CS21_SW5, CS20_SW5, CS19_SW5}, /* RGB41 */
{0, CS21_SW6, CS20_SW6, CS19_SW6}, /* RGB42 */
{0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB43 */
{0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB44 */
{0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB45 */
{0, CS33_SW2, CS32_SW2, CS31_SW2}, /* RGB74 */
{0, CS33_SW3, CS32_SW3, CS31_SW3}, /* RGB75 */
{0, CS33_SW4, CS32_SW4, CS31_SW4}, /* RGB76 */
};
led_config_t g_led_config = {
{
/* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 */
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16 }, /* R0 */
{ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, /* R1 */
{ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, NO_LED, 47 }, /* R2 */
{ 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, NO_LED, 63 }, /* R3 */
{ 64, 65, 66, NO_LED, NO_LED, 68, NO_LED, NO_LED, NO_LED, 70, 71, 72, 73, 74, 75 }, /* R4 */
}, {
{0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, {224, 0}, {240, 0}, {255, 0},
{0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, {224, 16}, {240, 16}, {255, 16},
{0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32},
{0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48},
{0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {144, 64}, {160, 64}, {176, 64}, {192, 64}, {208, 64}, {224, 64},
}, {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
}
};
void suspend_power_down_kb(void) {
rgb_matrix_set_suspend_state(true);
suspend_power_down_user();
}
void suspend_wakeup_init_kb(void) {
rgb_matrix_set_suspend_state(false);
suspend_wakeup_init_user();
}
#endif
void keyboard_pre_init_kb(void) {
setPinOutput(A2);
writePinHigh(A2);
keyboard_pre_init_user();
}

View File

@@ -0,0 +1,26 @@
# MCU name
MCU = STM32F303
# 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 = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
RGB_MATRIX_ENABLE = yes # Use RGB matrix
RGB_MATRIX_DRIVER = IS31FL3741
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
RGB_MATRIX_SUPPORTED = yes
RGBLIGHT_SUPPORTED = no
BACKLIGHT_SUPPORTED = no
LAYOUTS = 65_ansi

View File

@@ -17,3 +17,36 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xEDED
#define PRODUCT_ID 0x7075
#define DEVICE_VER 0x0001
#define MANUFACTURER MelGeek
#define PRODUCT MOJO75
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 16
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3
/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1

View File

@@ -16,17 +16,6 @@
#pragma once
/* USB Device descriptor parameter */
#define VENDOR_ID 0xEDED
#define PRODUCT_ID 0x7075
#define DEVICE_VER 0x0001
#define MANUFACTURER MelGeek
#define PRODUCT MOJO75
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 16
/*
* Keyboard Matrix Assignments
*
@@ -45,27 +34,6 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 3
/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_LED_PROCESS_LIMIT 4
#define RGB_MATRIX_LED_FLUSH_LIMIT 26
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_MULTISPLASH
#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL
//#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons.
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 92
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0

View File

@@ -17,6 +17,7 @@
#include "mojo75.h"
#ifdef RGB_MATRIX_ENABLE
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1 */
{0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB2 */
@@ -27,6 +28,13 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS6_SW7, CS5_SW7, CS4_SW7}, /* RGB7 */
{0, CS6_SW8, CS5_SW8, CS4_SW8}, /* RGB8 */
{0, CS6_SW9, CS5_SW9, CS4_SW9}, /* RGB9 */
{0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB55 */
{0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB56 */
{0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB57 */
{0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB58 */
{0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB59 */
{0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB60 */
{0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB61 */
{0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB10 */
{0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB11 */
{0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB12 */
@@ -36,6 +44,14 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB16 */
{0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB17 */
{0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB18 */
{0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB62 */
{0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB63 */
{0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB64 */
{0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB65 */
{0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB66 */
{0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB67 */
{0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB68 */
{0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB69 */
{0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB19 */
{0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB20 */
{0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB21 */
@@ -45,6 +61,12 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB25 */
{0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB26 */
{0, CS12_SW9, CS11_SW9, CS10_SW9}, /* RGB27 */
{0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB70 */
{0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB71 */
{0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB72 */
{0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB86 */
{0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB73 */
{0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB74 */
{0, CS15_SW1, CS14_SW1, CS13_SW1}, /* RGB28 */
{0, CS15_SW2, CS14_SW2, CS13_SW2}, /* RGB29 */
{0, CS15_SW3, CS14_SW3, CS13_SW3}, /* RGB30 */
@@ -54,6 +76,13 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS15_SW7, CS14_SW7, CS13_SW7}, /* RGB34 */
{0, CS15_SW8, CS14_SW8, CS13_SW8}, /* RGB35 */
{0, CS15_SW9, CS14_SW9, CS13_SW9}, /* RGB36 */
{0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB75 */
{0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB76 */
{0, CS30_SW6, CS29_SW6, CS28_SW6}, /* RGB77 */
{0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB78 */
{0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB79 */
{0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB80 */
{0, CS39_SW1, CS38_SW1, CS37_SW1}, /* RGB91 */
{0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB37 */
{0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB38 */
{0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB39 */
@@ -63,6 +92,13 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS18_SW7, CS17_SW7, CS16_SW7}, /* RGB43 */
{0, CS18_SW8, CS17_SW8, CS16_SW8}, /* RGB44 */
{0, CS18_SW9, CS17_SW9, CS16_SW9}, /* RGB45 */
{0, CS36_SW3, CS35_SW3, CS34_SW3}, /* RGB84 */
{0, CS36_SW4, CS35_SW4, CS34_SW4}, /* RGB83 */
{0, CS36_SW2, CS35_SW2, CS34_SW2}, /* RGB82 */
{0, CS36_SW6, CS35_SW6, CS34_SW6}, /* RGB85 */
{0, CS36_SW1, CS35_SW1, CS34_SW1}, /* RGB81 */
{0, CS39_SW2, CS38_SW2, CS37_SW2}, /* RGB87 */
{0, CS39_SW3, CS38_SW3, CS37_SW3}, /* RGB89 */
{0, CS21_SW1, CS20_SW1, CS19_SW1}, /* RGB46 */
{0, CS21_SW2, CS20_SW2, CS19_SW2}, /* RGB47 */
{0, CS21_SW3, CS20_SW3, CS19_SW3}, /* RGB48 */
@@ -72,69 +108,34 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
{0, CS21_SW7, CS20_SW7, CS19_SW7}, /* RGB52 */
{0, CS21_SW8, CS20_SW8, CS19_SW8}, /* RGB53 */
{0, CS21_SW9, CS20_SW9, CS19_SW9}, /* RGB54 */
{0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB55 */
{0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB56 */
{0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB57 */
{0, CS24_SW4, CS23_SW4, CS22_SW4}, /* RGB58 */
{0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB59 */
{0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB60 */
{0, CS24_SW7, CS23_SW7, CS22_SW7}, /* RGB61 */
{0, CS24_SW8, CS23_SW8, CS22_SW8}, /* RGB62 */
{0, CS24_SW9, CS23_SW9, CS22_SW9}, /* RGB63 */
{0, CS27_SW1, CS26_SW1, CS25_SW1}, /* RGB64 */
{0, CS27_SW2, CS26_SW2, CS25_SW2}, /* RGB65 */
{0, CS27_SW3, CS26_SW3, CS25_SW3}, /* RGB66 */
{0, CS27_SW4, CS26_SW4, CS25_SW4}, /* RGB67 */
{0, CS27_SW5, CS26_SW5, CS25_SW5}, /* RGB68 */
{0, CS27_SW6, CS26_SW6, CS25_SW6}, /* RGB69 */
{0, CS27_SW7, CS26_SW7, CS25_SW7}, /* RGB70 */
{0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB71 */
{0, CS27_SW9, CS26_SW9, CS25_SW9}, /* RGB72 */
{0, CS30_SW2, CS29_SW2, CS28_SW2}, /* RGB73 */
{0, CS30_SW3, CS29_SW3, CS28_SW3}, /* RGB74 */
{0, CS30_SW4, CS29_SW4, CS28_SW4}, /* RGB75 */
{0, CS30_SW5, CS29_SW5, CS28_SW5}, /* RGB76 */
{0, CS30_SW6, CS29_SW6, CS28_SW6}, /* RGB77 */
{0, CS30_SW7, CS29_SW7, CS28_SW7}, /* RGB78 */
{0, CS30_SW8, CS29_SW8, CS28_SW8}, /* RGB79 */
{0, CS30_SW9, CS29_SW9, CS28_SW9}, /* RGB80 */
{0, CS36_SW1, CS35_SW1, CS34_SW1}, /* RGB81 */
{0, CS36_SW2, CS35_SW2, CS34_SW2}, /* RGB82 */
{0, CS36_SW4, CS35_SW4, CS34_SW4}, /* RGB83 */
{0, CS36_SW3, CS35_SW3, CS34_SW3}, /* RGB84 */
{0, CS36_SW6, CS35_SW6, CS34_SW6}, /* RGB85 */
{0, CS30_SW1, CS29_SW1, CS28_SW1}, /* RGB86 */
{0, CS39_SW2, CS38_SW2, CS37_SW2}, /* RGB87 */
{0, CS39_SW3, CS38_SW3, CS37_SW3}, /* RGB89 */
{0, CS39_SW4, CS38_SW4, CS37_SW4}, /* RGB88 */
{0, CS39_SW6, CS38_SW6, CS37_SW6}, /* RGB90 */
{0, CS39_SW1, CS38_SW1, CS37_SW1}, /* RGB91 */
{0, CS39_SW5, CS38_SW5, CS37_SW5}, /* RGB92 */
{0, CS39_SW6, CS38_SW6, CS37_SW6}, /* RGB90 */
};
led_config_t g_led_config = {
{
/* C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 */
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 54, 55, 56, 57, 58, 59, 60 }, /* R0 */
{ 9, 10, 11, 12, 13, 14, 15, 16, 17, 61, 62, 63, 64, 66, 67, 68 }, /* R1 */
{ 18, 19, 20, 21, 22, 23, 24, 25, 26, 69, 70, 71, 85, 72, 65,/*?*/ 73 }, /* R2 */
{ 27, 28, 29, 30, 31, 32, 33, 34, 35, 74, 75, 76, 77, 78, 79, 90 }, /* R3 */
{ 36, 37, 38, 39, 40, 41, 42, 43, 44, 83, 82, 81, 84, 80, 86, 88 }, /* R4 */
{ 45, 46, 47, 48, 49, NO_LED, NO_LED, 50, NO_LED, NO_LED, 51, 52, 53, 87, 91, 89 }, /* R5 */
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, /* R0 */
{ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, NO_LED, 32 }, /* R1 */
{ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, NO_LED, 47 }, /* R2 */
{ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, NO_LED, 61, NO_LED, 63 }, /* R3 */
{ 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, NO_LED, 77, NO_LED, 78, 79 }, /* R4 */
{ 80, 81, 82, NO_LED, NO_LED, 84, NO_LED, NO_LED, NO_LED, 86, 87, NO_LED, 88, 89, 90, 91 }, /* R5 */
}, {
{0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, {224, 0}, {240, 0},
{0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, {224, 16}, {240, 16},
{0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, {224, 32}, {240, 32},
{0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, {224, 0}, {240, 0},
{0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, {224, 16}, {240, 16}, {255, 16},
{0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, {224, 32},
{0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {224, 48}, {240, 48},
{0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, {160, 64}, {176, 64}, {192, 64}, {208, 64}, {224, 64}, {240, 64},
{0, 80}, {16, 80}, {32, 80}, {48, 80}, {64, 80}, {80, 80}, {96, 80}, {112, 80}, {128, 80}, {144, 80}, {160, 80}, {176, 80},
{0, 80}, {16, 80}, {32, 80}, {48, 80}, {64, 80}, {80, 80}, {96, 80}, {112, 80}, {128, 80}, {144, 80}, {160, 80}, {176, 80},
}, {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
}
};

View File

@@ -19,3 +19,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth
RGB_MATRIX_ENABLE = yes # Use RGB matrix
RGB_MATRIX_DRIVER = IS31FL3741
NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in
LAYOUTS = 75_ansi

View File

@@ -0,0 +1,67 @@
/* Copyright 2021 James Young (@noroadsleft)
*
* 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 0x4E4B // "NK"
#define PRODUCT_ID 0x5048
#define DEVICE_VER 0x0100
#define MANUFACTURER NEO Keys
#define PRODUCT Palette G67 Hotswap
/* 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)
*
*/
#define MATRIX_ROW_PINS { B0, B1, B2, B3, F7 }
#define MATRIX_COL_PINS { C7, F6, F5, F4, F1, E6, D0, D1, D2, D3, D4, D5, D6, D7, B4 }
#define DIODE_DIRECTION COL2ROW
#if defined(RGBLIGHT_ENABLE)
#define RGB_DI_PIN F0
#define RGBLED_NUM 77
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#define RGBLIGHT_LIMIT_VAL 150 /* 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

View File

@@ -0,0 +1,17 @@
/* Copyright 2021 James Young (@noroadsleft)
*
* 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 "hotswap.h"

View File

@@ -0,0 +1,33 @@
/* Copyright 2021 James Young (@noroadsleft)
*
* 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_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, K2D, K2E, \
K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \
K40, K41, K43, K46, K4A, K4B, 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, KC_NO, K2D, K2E }, \
{ K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \
{ K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \
}

View File

@@ -0,0 +1,84 @@
{
"keyboard_name": "NEO Keys Palette G67 Hotswap",
"url": "",
"maintainer": "qmk",
"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}
]
}
}
}

View File

@@ -0,0 +1,34 @@
/* Copyright 2021 James Young (@noroadsleft)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_65_ansi_blocker(
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_TILD,
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_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_65_ansi_blocker(
_______, 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_HOME,
_______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, KC_PGUP,
_______, RESET, BL_DEC, BL_TOGG, BL_INC, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_DEL, KC_END, KC_PGDN, _______, KC_PGDN,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

View File

@@ -0,0 +1,49 @@
/* Copyright 2021 James Young (@noroadsleft)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_65_ansi_blocker(
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_TILD,
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_DEL,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
[1] = LAYOUT_65_ansi_blocker(
_______, 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_HOME,
_______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END,
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, KC_PGUP,
_______, RESET, BL_DEC, BL_TOGG, BL_INC, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_DEL, KC_END, KC_PGDN, _______, KC_PGDN,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT_65_ansi_blocker(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
[3] = LAYOUT_65_ansi_blocker(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______
),
};

View File

@@ -0,0 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
KEY_LOCK_ENABLE = no

Some files were not shown because too many files have changed in this diff Show More