Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1fa6c1d818 | ||
|
|
1e96346f28 | ||
|
|
6a629e5d0d | ||
|
|
cd23984afc | ||
|
|
cd87a8a323 | ||
|
|
d63fb6f716 | ||
|
|
8517f8a660 | ||
|
|
c60a312ba9 | ||
|
|
b9811fd7e7 | ||
|
|
0f086e4889 | ||
|
|
214241853a | ||
|
|
9d27bb512f | ||
|
|
d29a61e9ce | ||
|
|
ba7a1e8976 | ||
|
|
7b3ead0133 | ||
|
|
4df74f6058 | ||
|
|
796bce5ab2 | ||
|
|
6ed925103f | ||
|
|
76b5ac621d | ||
|
|
2776b9ee90 | ||
|
|
3d15038dd4 | ||
|
|
2abb29402a | ||
|
|
4ffcacd920 | ||
|
|
5be438f03d | ||
|
|
9ea0103520 | ||
|
|
569545a78f | ||
|
|
2da8522154 | ||
|
|
6916c0d728 | ||
|
|
23cd9f4dee | ||
|
|
73e92ef0c0 | ||
|
|
d210ac7a3e | ||
|
|
f16b5cc92b | ||
|
|
5632552558 | ||
|
|
d3a6296199 | ||
|
|
b1bf0879ad | ||
|
|
b11a776cef | ||
|
|
6fa3cfbf53 | ||
|
|
24b3556e84 | ||
|
|
85688e5b52 | ||
|
|
e22c399245 | ||
|
|
cc87445481 | ||
|
|
ca02863b56 | ||
|
|
db8454ca99 | ||
|
|
357c1bb657 | ||
|
|
8cf15bffa0 | ||
|
|
340dd09758 | ||
|
|
899731679d | ||
|
|
39addf8bc9 | ||
|
|
fa1ac4d724 | ||
|
|
fc1e22ea94 | ||
|
|
3c95de3c69 | ||
|
|
ffb2557a3a | ||
|
|
a5b10e5da2 | ||
|
|
bef554d18b | ||
|
|
9ed0c2d57b | ||
|
|
b0a021c07a | ||
|
|
c8267d9fea | ||
|
|
6539426f61 | ||
|
|
03d16db942 | ||
|
|
572c316e7d | ||
|
|
cb1e45b4ef | ||
|
|
95619bdaca | ||
|
|
8421a89820 | ||
|
|
5dc41446aa | ||
|
|
e26a7b0ed8 | ||
|
|
418a886ae4 | ||
|
|
552b1cccec | ||
|
|
11c4c71131 | ||
|
|
79d495f51d | ||
|
|
ca56c2145f | ||
|
|
704a2e8d3c | ||
|
|
e745144836 | ||
|
|
352bef99a9 | ||
|
|
6d7745a110 | ||
|
|
bf57587e62 | ||
|
|
47dcda1087 | ||
|
|
a2b650df47 | ||
|
|
9374c0c9db | ||
|
|
ab3fbfdb3b | ||
|
|
7e99d869de | ||
|
|
00b6f14821 | ||
|
|
5694e7b6a6 | ||
|
|
cf19cb0dbe | ||
|
|
387bd555c7 | ||
|
|
f69333a0e5 | ||
|
|
4665e4ffff | ||
|
|
fbc6bd8266 | ||
|
|
91bfbb6256 | ||
|
|
dedbc37196 |
No files matched your search
Vendored
+1
-1
@@ -59,7 +59,7 @@ Vagrant.configure(2) do |config|
|
|||||||
# add a # before ,args: and run 'vagrant up' to get a working
|
# add a # before ,args: and run 'vagrant up' to get a working
|
||||||
# non-updated box and then attempt to troubleshoot or open a Github issue
|
# non-updated box and then attempt to troubleshoot or open a Github issue
|
||||||
|
|
||||||
config.vm.provision "shell", run: "always", path: "./util/install_dependencies.sh", args: "-update"
|
config.vm.provision "shell", run: "always", path: "./util/qmk_install.sh", args: "-update"
|
||||||
|
|
||||||
config.vm.post_up_message = <<-EOT
|
config.vm.post_up_message = <<-EOT
|
||||||
|
|
||||||
|
|||||||
@@ -219,6 +219,11 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
|||||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||||
|
SRC += $(QUANTUM_DIR)/encoder.c
|
||||||
|
OPT_DEFS += -DENCODER_ENABLE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||||
SRC += drivers/avr/hd44780.c
|
SRC += drivers/avr/hd44780.c
|
||||||
OPT_DEFS += -DHD44780_ENABLE
|
OPT_DEFS += -DHD44780_ENABLE
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
* [Combos](feature_combo)
|
* [Combos](feature_combo)
|
||||||
* [Command](feature_command.md)
|
* [Command](feature_command.md)
|
||||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||||
|
* [Encoders](feature_encoders.md)
|
||||||
* [Grave Escape](feature_grave_esc.md)
|
* [Grave Escape](feature_grave_esc.md)
|
||||||
* [Key Lock](feature_key_lock.md)
|
* [Key Lock](feature_key_lock.md)
|
||||||
* [Layouts](feature_layouts.md)
|
* [Layouts](feature_layouts.md)
|
||||||
|
|||||||
@@ -52,6 +52,7 @@
|
|||||||
* [Combos](feature_combo)
|
* [Combos](feature_combo)
|
||||||
* [Command](feature_command.md)
|
* [Command](feature_command.md)
|
||||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||||
|
* [Encoders](feature_encoders.md)
|
||||||
* [Grave Escape](feature_grave_esc.md)
|
* [Grave Escape](feature_grave_esc.md)
|
||||||
* [Key Lock](feature_key_lock.md)
|
* [Key Lock](feature_key_lock.md)
|
||||||
* [Layouts](feature_layouts.md)
|
* [Layouts](feature_layouts.md)
|
||||||
|
|||||||
@@ -105,10 +105,12 @@ The solution is to remove and reinstall all affected modules.
|
|||||||
```
|
```
|
||||||
brew rm avr-gcc
|
brew rm avr-gcc
|
||||||
brew rm dfu-programmer
|
brew rm dfu-programmer
|
||||||
|
brew rm dfu-util
|
||||||
brew rm gcc-arm-none-eabi
|
brew rm gcc-arm-none-eabi
|
||||||
brew rm avrdude
|
brew rm avrdude
|
||||||
brew install avr-gcc
|
brew install avr-gcc
|
||||||
brew install dfu-programmer
|
brew install dfu-programmer
|
||||||
|
brew install dfu-util
|
||||||
brew install gcc-arm-none-eabi
|
brew install gcc-arm-none-eabi
|
||||||
brew install avrdude
|
brew install avrdude
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Your keymap can include keycodes that are more advanced than normal, for example keys that switch layers or send modifiers when held, but send regular keycodes when tapped. This page documents the functions that are available to you.
|
Your keymap can include keycodes that are more advanced than normal, for example keys that switch layers or send modifiers when held, but send regular keycodes when tapped. This page documents the functions that are available to you.
|
||||||
|
|
||||||
### Assigning Custom Names
|
## Assigning Custom Names
|
||||||
|
|
||||||
People often define custom names using `#define`. For example:
|
People often define custom names using `#define`. For example:
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ People often define custom names using `#define`. For example:
|
|||||||
|
|
||||||
This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable.
|
This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable.
|
||||||
|
|
||||||
### Caveats
|
## Caveats
|
||||||
|
|
||||||
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored.
|
Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored.
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ These functions allow you to activate layers in various ways. Note that layers a
|
|||||||
|
|
||||||
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
|
Care must be taken when switching layers, it's possible to lock yourself into a layer with no way to deactivate that layer (without unplugging your keyboard.) We've created some guidelines to help users avoid the most common problems.
|
||||||
|
|
||||||
### Beginners
|
## Beginners
|
||||||
|
|
||||||
If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers:
|
If you are just getting started with QMK you will want to keep everything simple. Follow these guidelines when setting up your layers:
|
||||||
|
|
||||||
@@ -44,11 +44,11 @@ If you are just getting started with QMK you will want to keep everything simple
|
|||||||
* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer.
|
* Arrange your layers in a "tree" layout, with layer 0 as the root. Do not try to enter the same layer from more than one other layer.
|
||||||
* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone.
|
* In a layer's keymap, only reference higher-numbered layers. Because layers are processed from the highest-numbered (topmost) active layer down, modifying the state of lower layers can be tricky and error-prone.
|
||||||
|
|
||||||
### Intermediate Users
|
## Intermediate Users
|
||||||
|
|
||||||
Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
|
Sometimes you need more than one base layer. For example, if you want to switch between QWERTY and Dvorak, switch between layouts for different countries, or switch your layout for different videogames. Your base layers should always be the lowest numbered layers. When you have multiple base layers you should always treat them as mutually exclusive. When one base layer is on the others are off.
|
||||||
|
|
||||||
### Advanced Users
|
## Advanced Users
|
||||||
|
|
||||||
Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways.
|
Once you have a good feel for how layers work and what you can do, you can get more creative. The rules listed in the beginner section will help you be successful by avoiding some of the tricker details but they can be constraining, especially for ultra-compact keyboard users. Understanding how layers work will allow you to use them in more advanced ways.
|
||||||
|
|
||||||
@@ -126,6 +126,14 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations
|
|||||||
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped |
|
||||||
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped |
|
||||||
|
|
||||||
|
## Caveats
|
||||||
|
|
||||||
|
Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since any modifiers specified in the keycode are ignored.
|
||||||
|
|
||||||
|
Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes.
|
||||||
|
|
||||||
|
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||||
|
|
||||||
# One Shot Keys
|
# One Shot Keys
|
||||||
|
|
||||||
One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys".
|
One shot keys are keys that remain active until the next key is pressed, and then are released. This allows you to type keyboard combinations without pressing more than one key at a time. These keys are usually called "Sticky keys" or "Dead keys".
|
||||||
@@ -134,6 +142,8 @@ For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A ch
|
|||||||
|
|
||||||
One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key.
|
One shot keys also work as normal modifiers. If you hold down a one shot key and type other keys, your one shot will be released immediately after you let go of the key.
|
||||||
|
|
||||||
|
Additionally, hitting keys five times in a short period will lock that key. This applies for both One Shot Modifiers and One Shot Layers, and is controlled by the `ONESHOT_TAP_TOGGLE` define.
|
||||||
|
|
||||||
You can control the behavior of one shot keys by defining these in `config.h`:
|
You can control the behavior of one shot keys by defining these in `config.h`:
|
||||||
|
|
||||||
```c
|
```c
|
||||||
@@ -144,15 +154,20 @@ You can control the behavior of one shot keys by defining these in `config.h`:
|
|||||||
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](#mod-tap), not the `KC_*` codes.
|
||||||
* `OSL(layer)` - momentary switch to *layer*.
|
* `OSL(layer)` - momentary switch to *layer*.
|
||||||
|
|
||||||
Sometimes, you want to activate a one-shot layer as part of a macro or tap dance routine. To do this, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. For more complicated actions, take a look at the oneshot implementation in [`process_record`](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action.c#L429).
|
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
|
||||||
|
|
||||||
|
For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `set_oneshot_layer(ONESHOT_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`.
|
||||||
|
|
||||||
|
For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it.
|
||||||
|
|
||||||
|
!> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop.
|
||||||
|
|
||||||
If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop.
|
|
||||||
|
|
||||||
# Permissive Hold
|
# Permissive Hold
|
||||||
|
|
||||||
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option:
|
||||||
|
|
||||||
```
|
```c
|
||||||
#define PERMISSIVE_HOLD
|
#define PERMISSIVE_HOLD
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -197,6 +212,6 @@ With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allo
|
|||||||
|
|
||||||
# Retro Tapping
|
# Retro Tapping
|
||||||
|
|
||||||
When you hold a dual function key, and haven't pressed anything when you release the key, normally nothing happens. However, if you enable this, if you release the key without pressing another key, it will send the original key, even if it is outside of the tapping term.
|
Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term.
|
||||||
|
|
||||||
For instance, if you're using `LT(2, KC_SPACE)`, if you hold the key, don't hit anything else and then release it, normally, nothing happens. But with `RETRO_TAPPING` defined in your `config.h`, it will send `KC_SPACE`.
|
For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With `RETRO_TAPPING` defined in your `config.h`, it will send `KC_SPACE`.
|
||||||
@@ -61,7 +61,7 @@ In this handler, the value of an incrementing counter is mapped onto a precomput
|
|||||||
|`backlight_increase()` |Increase the backlight level |
|
|`backlight_increase()` |Increase the backlight level |
|
||||||
|`backlight_decrease()` |Decrease the backlight level |
|
|`backlight_decrease()` |Decrease the backlight level |
|
||||||
|`backlight_level(x)` |Sets the backlight level to specified level |
|
|`backlight_level(x)` |Sets the backlight level to specified level |
|
||||||
|`get_backlight_level()`|Toggle backlight breathing |
|
|`get_backlight_level()`|Return the current backlight level |
|
||||||
|
|
||||||
### Backlight Breathing Functions
|
### Backlight Breathing Functions
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,15 @@ There are three separate but related features that allow you to change the behav
|
|||||||
On some keyboards Bootmagic is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk` with:
|
On some keyboards Bootmagic is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk` with:
|
||||||
|
|
||||||
```make
|
```make
|
||||||
BOOTMAGIC_ENABLE = yes
|
BOOTMAGIC_ENABLE = full
|
||||||
|
```
|
||||||
|
|
||||||
|
?> You may see `yes` being used in place of `full`, and this is okay. However, `yes` is deprecated, and ideally `full` (or `lite`) ideally should be used instead.
|
||||||
|
|
||||||
|
Additionally, you can use [Bootmagic Lite](#bootmagic-lite) (a scaled down, very basic version of Bootmagic) by adding the following to your `rules.mk` file:
|
||||||
|
|
||||||
|
```make
|
||||||
|
BOOTMAGIC_ENABLE = lite
|
||||||
```
|
```
|
||||||
|
|
||||||
## Hotkeys
|
## Hotkeys
|
||||||
@@ -99,3 +107,45 @@ If you would like to change the hotkey assignments for Bootmagic, `#define` thes
|
|||||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_5` |`KC_5` |Make layer 5 the default layer |
|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_5` |`KC_5` |Make layer 5 the default layer |
|
||||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_6` |`KC_6` |Make layer 6 the default layer |
|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_6` |`KC_6` |Make layer 6 the default layer |
|
||||||
|`BOOTMAGIC_KEY_DEFAULT_LAYER_7` |`KC_7` |Make layer 7 the default layer |
|
|`BOOTMAGIC_KEY_DEFAULT_LAYER_7` |`KC_7` |Make layer 7 the default layer |
|
||||||
|
|
||||||
|
# Bootmagic Lite
|
||||||
|
|
||||||
|
In addition to the full blown Bootmagic feature, is the Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button but you need a way to jump into the bootloader, and don't want to deal with the headache that Bootmagic can cause.
|
||||||
|
|
||||||
|
To enable this version of Bootmagic, you need to enable it in your `rules.mk` with:
|
||||||
|
|
||||||
|
```make
|
||||||
|
BOOTMAGIC_ENABLE = lite
|
||||||
|
```
|
||||||
|
|
||||||
|
Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file:
|
||||||
|
|
||||||
|
```c
|
||||||
|
#define BOOTMAGIC_LITE_ROW 0
|
||||||
|
#define BOOTMAGIC_LITE_COLUMN 1
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, these are set to 0 and 0, which is usually the "ESC" key on a majority of keyboards.
|
||||||
|
|
||||||
|
And to trigger the bootloader, you hold this key down when plugging the keyboard in. Just the single key.
|
||||||
|
|
||||||
|
## Advanced Bootmagic Lite
|
||||||
|
|
||||||
|
The `bootmagic_lite` function is defined weakly, so that you can replace this in your code, if you need. A great example of this is the Zeal60 boards that have some additional handling needed.
|
||||||
|
|
||||||
|
To replace the function, all you need to do is add something like this to your code:
|
||||||
|
|
||||||
|
```c
|
||||||
|
void bootmagic_lite(void) {
|
||||||
|
matrix_scan();
|
||||||
|
wait_ms(DEBOUNCING_DELAY * 2);
|
||||||
|
matrix_scan();
|
||||||
|
|
||||||
|
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
|
||||||
|
// Jump to bootloader.
|
||||||
|
bootloader_jump();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
You can additional feature here. For instance, resetting the eeprom or requiring additional keys to be pressed to trigger bootmagic. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware.
|
||||||
@@ -19,6 +19,7 @@ combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)};
|
|||||||
This will send "Escape" if you hit the A and B keys.
|
This will send "Escape" if you hit the A and B keys.
|
||||||
|
|
||||||
!> This method only supports [basic keycodes](keycodes_basic.md). See the examples for more control.
|
!> This method only supports [basic keycodes](keycodes_basic.md). See the examples for more control.
|
||||||
|
!> You cannot reuse (share) keys in combos. Each key should only belong to a single combo.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# Encoders
|
||||||
|
|
||||||
|
Basic encoders are supported by adding this to your `rules.mk`:
|
||||||
|
|
||||||
|
ENCODER_ENABLE = yes
|
||||||
|
|
||||||
|
and this to your `config.h`:
|
||||||
|
|
||||||
|
#define NUMBER_OF_ENCODERS 1
|
||||||
|
#define ENCODERS_PAD_A { B12 }
|
||||||
|
#define ENCODERS_PAD_B { B13 }
|
||||||
|
|
||||||
|
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.:
|
||||||
|
|
||||||
|
#define ENCODERS_PAD_A { encoder1a, encoder2a }
|
||||||
|
#define ENCODERS_PAD_B { encoder1a, encoder2b }
|
||||||
|
|
||||||
|
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions.
|
||||||
|
|
||||||
|
Additionally, the resolution can be specified in the same file (the default & suggested is 4):
|
||||||
|
|
||||||
|
#define ENCODER_RESOLUTION 4
|
||||||
|
|
||||||
|
## Callbacks
|
||||||
|
|
||||||
|
The callback functions can be inserted into your `<keyboard>.c`:
|
||||||
|
|
||||||
|
void encoder_update_kb(uint8_t index, bool clockwise) {
|
||||||
|
encoder_update_user(index, clockwise);
|
||||||
|
}
|
||||||
|
|
||||||
|
or `keymap.c`:
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
register_code(KC_PGDN);
|
||||||
|
unregister_code(KC_PGDN);
|
||||||
|
} else {
|
||||||
|
register_code(KC_PGUP);
|
||||||
|
unregister_code(KC_PGUP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
|
||||||
|
The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground.
|
||||||
@@ -26,6 +26,8 @@ This array specifies what actions shall be taken when a tap-dance key is in acti
|
|||||||
|
|
||||||
The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
|
The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
|
||||||
|
|
||||||
|
!> Keep in mind that only [basic keycodes](keycodes_basic.md) are supported here. Custom keycodes are not supported.
|
||||||
|
|
||||||
And that's the bulk of it!
|
And that's the bulk of it!
|
||||||
|
|
||||||
And now, on to the explanation of how it works!
|
And now, on to the explanation of how it works!
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ Note: If it is your first time here, Check out the "Complete Newbs guide" instea
|
|||||||
|
|
||||||
## Linux
|
## Linux
|
||||||
|
|
||||||
To ensure you are always up to date, you can just run `sudo util/install_dependencies.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
|
To ensure you are always up to date, you can just run `sudo util/qmk_install.sh`. That should always install all the dependencies needed. **This will run `apt-get upgrade`.**
|
||||||
|
|
||||||
You can also install things manually, but this documentation might not be always up to date with all requirements.
|
You can also install things manually, but this documentation might not be always up to date with all requirements.
|
||||||
|
|
||||||
@@ -58,10 +58,11 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
|||||||
brew update
|
brew update
|
||||||
brew install avr-gcc@7
|
brew install avr-gcc@7
|
||||||
brew install dfu-programmer
|
brew install dfu-programmer
|
||||||
|
brew install dfu-util
|
||||||
brew install gcc-arm-none-eabi
|
brew install gcc-arm-none-eabi
|
||||||
brew install avrdude
|
brew install avrdude
|
||||||
|
|
||||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
|
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of `avr-gcc@7` can take over 20 minutes and exhibit high CPU usage.
|
||||||
|
|
||||||
## Windows with msys2 (recommended)
|
## Windows with msys2 (recommended)
|
||||||
|
|
||||||
@@ -69,9 +70,9 @@ The best environment to use, for Windows Vista through any later version (tested
|
|||||||
|
|
||||||
* Install msys2 by downloading it and following the instructions here: http://www.msys2.org
|
* Install msys2 by downloading it and following the instructions here: http://www.msys2.org
|
||||||
* Open the ``MSYS2 MingGW 64-bit`` shortcut
|
* Open the ``MSYS2 MingGW 64-bit`` shortcut
|
||||||
* Navigate to your qmk checkout. For example, if it's in the root of your c drive:
|
* Navigate to your QMK repository. For example, if it's in the root of your c drive:
|
||||||
* `$ cd /c/qmk_firmware`
|
* `$ cd /c/qmk_firmware`
|
||||||
* Run `util/msys2_install.sh` and follow the prompts
|
* Run `util/qmk_install.sh` and follow the prompts
|
||||||
|
|
||||||
## Windows 10 (deprecated)
|
## Windows 10 (deprecated)
|
||||||
These are the old instructions for Windows 10. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
|
These are the old instructions for Windows 10. We recommend you use [MSYS2 as outlined above](#windows-with-msys2-recommended).
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ Do change the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` lines to accurately r
|
|||||||
#define DESCRIPTION A custom keyboard
|
#define DESCRIPTION A custom keyboard
|
||||||
```
|
```
|
||||||
|
|
||||||
?> Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. On Linux these values will not be visible in `lsusb`, since Linux takes that information from the list published by the USB-IF.
|
?> Note: On Windows and macOS the `MANUFACTURER`, `PRODUCT`, and `DESCRIPTION` fields will be displayed in the list of USB devices. ?> On Linux these values will not be visible in lsusb by default, since Linux takes the information from the list maintained by [USB ID Repository](http://www.linux-usb.org/usb-ids.html) by default. lsusb will show the information reported by the device when executed with -v option. It is also present in kernel logs after plugging in the device.
|
||||||
|
|
||||||
### Keyboard Matrix Configuration
|
### Keyboard Matrix Configuration
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ These keycodes correspond to characters that are "shifted" on a standard US ANSI
|
|||||||
|
|
||||||
Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since any modifiers specified in the keycode are ignored.
|
Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since any modifiers specified in the keycode are ignored.
|
||||||
|
|
||||||
|
Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes.
|
||||||
|
|
||||||
|
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||||
|
|
||||||
## Keycodes
|
## Keycodes
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ Start by navigating to the `keymaps` folder for your keyboard.
|
|||||||
|
|
||||||
?> Windows:
|
?> Windows:
|
||||||
|
|
||||||
start keyboards/<keyboard_folder>/keymaps
|
start .\\keyboards\\<keyboard_folder>\\keymaps
|
||||||
|
|
||||||
## Create a Copy Of The `default` Keymap
|
## Create a Copy Of The `default` Keymap
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,4 @@ void ws2812_sendarray_mask(uint8_t *array,uint16_t length, uint8_t pinmask);
|
|||||||
#define CONCAT_EXP(a, b) CONCAT(a, b)
|
#define CONCAT_EXP(a, b) CONCAT(a, b)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// #define ws2812_PORTREG CONCAT_EXP(PORT,ws2812_port)
|
|
||||||
// #define ws2812_DDRREG CONCAT_EXP(DDR,ws2812_port)
|
|
||||||
|
|
||||||
#endif /* LIGHT_WS2812_H_ */
|
#endif /* LIGHT_WS2812_H_ */
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* tap dance stuff*/
|
||||||
|
#undef TAPPING_TERM
|
||||||
|
#define TAPPING_TERM 500
|
||||||
|
|
||||||
|
#define TAPPING_TOGGLE 2
|
||||||
|
|
||||||
|
#define EXAMPLESTRING1 "tapdance_1"
|
||||||
|
#define EXAMPLESTRING2 "tapdance_2"
|
||||||
|
#define EXAMPLESTRING3 "tapdance_3"
|
||||||
|
#define EXAMPLESTRING4 "tapdance_4"
|
||||||
|
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
#define RGBLED_NUM 16
|
||||||
@@ -0,0 +1,215 @@
|
|||||||
|
/*
|
||||||
|
tap danc eis turned on in the rules now...
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define _EMOJI 0
|
||||||
|
#define _TAPLAND 1
|
||||||
|
#define _LEDCNTL 2
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
SHRUG,
|
||||||
|
DISFACE,
|
||||||
|
FU,
|
||||||
|
TFLIP,
|
||||||
|
TFLIP2,
|
||||||
|
SAD_EYES,
|
||||||
|
TPUT,
|
||||||
|
HAPPYFACE,
|
||||||
|
HEARTFACE,
|
||||||
|
CLOUD,
|
||||||
|
CHANFACE,
|
||||||
|
CMDCLEAR
|
||||||
|
};
|
||||||
|
//Tap Dance Declarations
|
||||||
|
enum {
|
||||||
|
TD_EXAMPLE1 = 0,
|
||||||
|
TD_EXAMPLE2,
|
||||||
|
TD_EXAMPLE3,
|
||||||
|
TD_EXAMPLE4
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* EMOJI Pad
|
||||||
|
* ,-------------------------------.
|
||||||
|
* |TFLIP | TFlIP2|DISFACE| FU |
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* | CLOUD| | | CLEAR |
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* |SHRUG |DISFACE| HRTFAC| HAPPYF |
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* | ENTER| |LEDCNTR| tapland|
|
||||||
|
* `-------------------------------'
|
||||||
|
*/
|
||||||
|
//purple
|
||||||
|
[_EMOJI] = LAYOUT_ortho_4x4(
|
||||||
|
TFLIP, TFLIP2, KC_NO, FU ,
|
||||||
|
CLOUD, KC_NO, KC_NO, CMDCLEAR,
|
||||||
|
SHRUG, DISFACE, HEARTFACE, HAPPYFACE,
|
||||||
|
KC_ENT, RGB_TOG, MO(_LEDCNTL), MO(_TAPLAND)
|
||||||
|
),
|
||||||
|
|
||||||
|
/* TapLand //
|
||||||
|
* ,-------------------------------.
|
||||||
|
* | str1 | str2 | str3 | str4 |
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* | | | | |
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* | | | | |
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* | | | | |
|
||||||
|
* `-------------------------------'
|
||||||
|
*/
|
||||||
|
//blue
|
||||||
|
[_TAPLAND] = LAYOUT_ortho_4x4(
|
||||||
|
TD(TD_EXAMPLE1), TD(TD_EXAMPLE2), TD(TD_EXAMPLE3), TD(TD_EXAMPLE4),
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
|
KC_NO, KC_NO, KC_NO, KC_NO
|
||||||
|
),
|
||||||
|
/* LEDControl Pad
|
||||||
|
* ,-------------------------------.
|
||||||
|
* | snake|breathe|rainbow|gradient|
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* | xmas | Val+ | Sat+ | HUE+ |
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* |kngrdr| Val- | Sat- | HUE- |
|
||||||
|
* |------+-------+-------+--------|
|
||||||
|
* | swirl| PLAIN | | ON/OFF |
|
||||||
|
* `-------------------------------'
|
||||||
|
*/
|
||||||
|
//blue
|
||||||
|
[_LEDCNTL] = LAYOUT_ortho_4x4(
|
||||||
|
RGB_M_SN, RGB_M_B, RGB_M_R, RGB_M_G,
|
||||||
|
RGB_M_X, RGB_VAI, RGB_SAI, RGB_HUI,
|
||||||
|
RGB_M_K, RGB_VAD, RGB_SAD, RGB_HUD,
|
||||||
|
RGB_M_SW, RGB_M_P, KC_NO, RGB_TOG
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch(keycode) {
|
||||||
|
case CLOUD: // (っ◕‿◕)っ
|
||||||
|
if(record->event.pressed){
|
||||||
|
send_unicode_hex_string("0028 3063 25D5 203F 25D5 0029 3063");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case FU: // t(-_-t)
|
||||||
|
if(record->event.pressed){
|
||||||
|
SEND_STRING("t(-_-t)");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case HAPPYFACE: // ʘ‿ʘ
|
||||||
|
if(record->event.pressed){
|
||||||
|
send_unicode_hex_string("0298 203F 0298");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case CMDCLEAR:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_LGUI);
|
||||||
|
tap_code(KC_A);
|
||||||
|
unregister_code(KC_LGUI);
|
||||||
|
tap_code(KC_DEL);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case SHRUG: // ¯\_(ツ)_/¯
|
||||||
|
if (record->event.pressed) {
|
||||||
|
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case HEARTFACE: // ♥‿♥
|
||||||
|
if(record->event.pressed){
|
||||||
|
send_unicode_hex_string("2665 203F 2665");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case DISFACE: // ಠ_ಠ
|
||||||
|
if(record->event.pressed){
|
||||||
|
send_unicode_hex_string("0CA0 005F 0CA0");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case TFLIP: // (╯°□°)╯ ︵ ┻━┻
|
||||||
|
if(record->event.pressed){
|
||||||
|
send_unicode_hex_string("0028 256F 00B0 25A1 00B0 0029 256F 0020 FE35 0020 253B 2501 253B");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case TFLIP2: // ┻━┻︵ \(°□°)/ ︵ ┻━┻
|
||||||
|
if(record->event.pressed){
|
||||||
|
send_unicode_hex_string("253B 2501 253B FE35 0020 005C 0028 00B0 25A1 00B0 0029 002F 0020 FE35 0020 253B 2501 253B");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* tap dance time */
|
||||||
|
void tdexample1(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
if (state->count >= 2) {
|
||||||
|
SEND_STRING(EXAMPLESTRING1);
|
||||||
|
reset_tap_dance (state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void tdexample2(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
if (state->count >= 2) {
|
||||||
|
SEND_STRING(EXAMPLESTRING2);
|
||||||
|
reset_tap_dance (state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void tdexample3(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
if (state->count >= 2) {
|
||||||
|
SEND_STRING(EXAMPLESTRING3);
|
||||||
|
reset_tap_dance (state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void tdexample4(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
if (state->count >= 2) {
|
||||||
|
SEND_STRING(EXAMPLESTRING4);
|
||||||
|
reset_tap_dance (state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_EXAMPLE1] = ACTION_TAP_DANCE_FN(tdexample1),
|
||||||
|
[TD_EXAMPLE2] = ACTION_TAP_DANCE_FN(tdexample2),
|
||||||
|
[TD_EXAMPLE3] = ACTION_TAP_DANCE_FN(tdexample3),
|
||||||
|
[TD_EXAMPLE4] = ACTION_TAP_DANCE_FN(tdexample4)
|
||||||
|
};
|
||||||
|
|
||||||
|
// Runs just one time when the keyboard initializes.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
static bool has_ran_yet;
|
||||||
|
if (!has_ran_yet) {
|
||||||
|
has_ran_yet = true;
|
||||||
|
rgblight_setrgb (16, 0, 16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
switch (biton32(state)) {
|
||||||
|
case _TAPLAND:
|
||||||
|
rgblight_setrgb(0, 16, 0); //green
|
||||||
|
break;
|
||||||
|
case _LEDCNTL:
|
||||||
|
rgblight_setrgb(0, 0, 16); //blue
|
||||||
|
break;
|
||||||
|
case _EMOJI:
|
||||||
|
rgblight_setrgb (16, 0, 16); //purple
|
||||||
|
break;
|
||||||
|
|
||||||
|
default: // for any other layers, or the default layer
|
||||||
|
rgblight_setrgb (16, 0, 16); //purple
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# Ridingtraffic's examples
|
||||||
|
===
|
||||||
|
This keymap has many features:
|
||||||
|
3 layers
|
||||||
|
Momentary layer switching
|
||||||
|
16 pixel neopixel
|
||||||
|
Unicode Enabled
|
||||||
|
Tap dance enabled
|
||||||
|
|
||||||
|
The rgb also updates depending on what layer you are on, and then flips back when done.
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# turning on tap dance
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
RGBLIGHT_ENABLE = yes
|
||||||
|
MOUSEKEY_ENABLE = no
|
||||||
|
UNICODE_ENABLE = yes
|
||||||
@@ -39,11 +39,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN F7
|
#define RGB_DI_PIN F7
|
||||||
#define RGBLIGHT_TIMER
|
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
#define RGBLED_NUM 6 // Number of LEDs
|
#define RGBLED_NUM 6 // Number of LEDs
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
/* COL2ROW or ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|||||||
@@ -39,10 +39,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN F7
|
#define RGB_DI_PIN F7
|
||||||
#define RGBLIGHT_TIMER
|
|
||||||
#define RGBLED_NUM 1 // Number of LEDs
|
#define RGBLED_NUM 1 // Number of LEDs
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
/* COL2ROW or ROW2COL */
|
/* COL2ROW or ROW2COL */
|
||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
@@ -13,14 +13,11 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
include ../../../../Makefile
|
include ../../../../Makefile
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
@@ -13,15 +13,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
@@ -13,15 +13,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. It uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. It uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change to "no" to disable the options, or define them in the Makefile in
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
@@ -13,15 +13,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
|
||||||
include ../../../../Makefile
|
|
||||||
endif
|
|
||||||
@@ -13,7 +13,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = yes # Audio output on port C6
|
AUDIO_ENABLE = yes # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -63,7 +63,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = yes # Unicode
|
UNICODE_ENABLE = yes # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
//Norwegian layout - dependant on previous definitions
|
//Norwegian layout - dependant on previous definitions
|
||||||
#define NO_UNDS LSFT(NO_MINS) // _
|
#define NO_UNDS LSFT(NO_MINS) // _
|
||||||
#define NO_QUES LSFT(NO_PLUS) // ?
|
#define NO_QUES LSFT(NO_PLUS) // ?
|
||||||
|
#define NO_ACUT RALT(NO_BSLS) // Acute
|
||||||
#define NO_GRAV LSFT(NO_BSLS) // `
|
#define NO_GRAV LSFT(NO_BSLS) // `
|
||||||
#define NO_GT LSFT(NO_LT) // >
|
#define NO_GT LSFT(NO_LT) // >
|
||||||
#define NO_HALF RALT(NO_LT) // ½
|
#define NO_HALF RALT(NO_LT) // ½
|
||||||
@@ -56,6 +57,9 @@
|
|||||||
#define OSM_RSFT OSM(MOD_RSFT)
|
#define OSM_RSFT OSM(MOD_RSFT)
|
||||||
#define OSM_RGUI OSM(MOD_RGUI)
|
#define OSM_RGUI OSM(MOD_RGUI)
|
||||||
|
|
||||||
|
//CTRL on hold, ESC on tap
|
||||||
|
#define CTL_ESC CTL_T(KC_ESC)
|
||||||
|
|
||||||
//Layers
|
//Layers
|
||||||
#define L1 0
|
#define L1 0
|
||||||
#define L2 1
|
#define L2 1
|
||||||
@@ -63,23 +67,51 @@
|
|||||||
#define L4 3
|
#define L4 3
|
||||||
#define L5 4
|
#define L5 4
|
||||||
|
|
||||||
|
// Momentary switch to layer
|
||||||
|
#define MO_L2 MO(L2)
|
||||||
|
#define MO_L4 MO(L4)
|
||||||
|
#define MO_L5 MO(L5)
|
||||||
// Momentary switch to layer - One Shot Layer
|
// Momentary switch to layer - One Shot Layer
|
||||||
|
#define OSL_L2 OSL(L2)
|
||||||
#define OSL_L3 OSL(L3)
|
#define OSL_L3 OSL(L3)
|
||||||
#define OSL_L4 OSL(L4)
|
#define OSL_L4 OSL(L4)
|
||||||
|
|
||||||
|
//Tap Dance Declarations
|
||||||
|
enum {
|
||||||
|
SCLN_OE = 0,
|
||||||
|
QUOT_AE,
|
||||||
|
DQT_AO
|
||||||
|
};
|
||||||
|
|
||||||
|
//Tap Dance Definitions
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
//Tap once for semicolon, twice for ø
|
||||||
|
[SCLN_OE] = ACTION_TAP_DANCE_DOUBLE(NO_SCLN, NO_OE),
|
||||||
|
//Tap once for single quote, twice for æ
|
||||||
|
[QUOT_AE] = ACTION_TAP_DANCE_DOUBLE(NO_QUOT, NO_AE),
|
||||||
|
//Tap once for double quote, twice for å
|
||||||
|
[DQT_AO] = ACTION_TAP_DANCE_DOUBLE(NO_DQT, NO_AO),
|
||||||
|
// Other declarations would go here, separated by commas, if you have them
|
||||||
|
};
|
||||||
|
|
||||||
|
//Tap Dance keys
|
||||||
|
#define TD_SCLN_OE TD(SCLN_OE)
|
||||||
|
#define TD_QUOT_AE TD(QUOT_AE)
|
||||||
|
#define TD_DQT_AO TD(DQT_AO)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[L1] = LAYOUT(
|
[L1] = LAYOUT(
|
||||||
KC_LGUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RGUI,
|
KC_LGUI, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RGUI,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_DQT,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, TD_DQT_AO,
|
||||||
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_SCLN, NO_QUOT,
|
KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD_SCLN_OE, TD_QUOT_AE,
|
||||||
OSM_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, OSM_RSFT,
|
OSM_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, OSM_RSFT,
|
||||||
CTL_T(KC_ESC), MO(L5), KC_LEAD, OSM_LALT, MO(L4), OSL_L3, KC_SPC, KC_ENT, OSL_L3, MO(L4), OSM_RALT, NO_EQL, NO_PLUS, KC_RCTL
|
CTL_ESC, MO_L5, KC_TAB, OSM_LALT, MO_L4, OSL_L3, KC_SPC, KC_ENT, OSL_L3, MO_L4, OSM_LALT, NO_EQL, NO_PLUS, KC_RCTL
|
||||||
),
|
),
|
||||||
[L2] = LAYOUT(
|
[L2] = LAYOUT(
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NO_AO,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NO_DQT,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NO_OE, NO_AE,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NO_SCLN, NO_QUOT,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
),
|
),
|
||||||
@@ -95,66 +127,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX,
|
XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, XXXXXXX,
|
||||||
_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, KC_DEL,
|
_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, KC_DEL,
|
||||||
XXXXXXX, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, KC_VOLD, XXXXXXX,
|
XXXXXXX, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, KC_APP, XXXXXXX, XXXXXXX, KC_VOLD, XXXXXXX,
|
||||||
OSM_LCTL, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLU, OSM_RCTL
|
OSM_LCTL, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, OSM_RALT, KC_MUTE, KC_VOLU, OSM_RCTL
|
||||||
),
|
),
|
||||||
[L5] = LAYOUT(
|
[L5] = LAYOUT(
|
||||||
XXXXXXX, TO(L1), TO(L2), TO(L3), TO(L4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, TO(L1), TO(L2), TO(L3), TO(L4), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_AO,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, NO_OE, NO_AE,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, KC_CAPS, 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
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//TODO: Is there productivity gain in the use of unicode?
|
||||||
// Unicode Linux
|
// - Won't work in xterm.
|
||||||
void matrix_init_user(void) {
|
// Create a layer for macros and/or unicode?
|
||||||
set_unicode_input_mode(UC_LNX);
|
// Are macros useful?
|
||||||
};
|
// - Found no gain in having sendstring for commands.
|
||||||
|
// - Find repeated tasks that cannot be done easily on the OS.
|
||||||
|
// - Most other keymaps have macros for game/fun stuff, hard to find "serious" onces.
|
||||||
#define TAP_ONCE(code) \
|
// Screw Norwegian layout, switch to US with unicode æøå or US/English International?
|
||||||
register_code (code); \
|
// - Will be different from laptop keyboard, requiring a switch on the OS side when only using the laptop.
|
||||||
unregister_code (code)
|
|
||||||
|
|
||||||
|
|
||||||
LEADER_EXTERNS();
|
|
||||||
|
|
||||||
// Runs constantly in the background, in a loop. Only supports basic keycodes.
|
|
||||||
void matrix_scan_user(void) {
|
|
||||||
LEADER_DICTIONARY() {
|
|
||||||
leading = false;
|
|
||||||
leader_end();
|
|
||||||
|
|
||||||
//probably useless in practice, but cool
|
|
||||||
SEQ_ONE_KEY (KC_P) {
|
|
||||||
tap_random_base64();
|
|
||||||
tap_random_base64();
|
|
||||||
tap_random_base64();
|
|
||||||
tap_random_base64();
|
|
||||||
tap_random_base64();
|
|
||||||
tap_random_base64();
|
|
||||||
tap_random_base64();
|
|
||||||
tap_random_base64();
|
|
||||||
}
|
|
||||||
|
|
||||||
SEQ_ONE_KEY (KC_G) {
|
|
||||||
SEND_STRING("grep something !");
|
|
||||||
register_code(KC_RALT);
|
|
||||||
TAP_ONCE(KC_4);
|
|
||||||
unregister_code(KC_RALT);
|
|
||||||
}
|
|
||||||
SEQ_ONE_KEY (KC_T) {
|
|
||||||
SEND_STRING("tail ");
|
|
||||||
TAP_ONCE(KC_SLSH);
|
|
||||||
SEND_STRING("f !");
|
|
||||||
register_code(KC_RALT);
|
|
||||||
TAP_ONCE(KC_4);
|
|
||||||
unregister_code(KC_RALT);
|
|
||||||
}
|
|
||||||
SEQ_ONE_KEY (KC_S) {
|
|
||||||
SEND_STRING("sudo !!");
|
|
||||||
TAP_ONCE(KC_ENT);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
TAP_DANCE_ENABLE = no
|
TAP_DANCE_ENABLE = yes
|
||||||
NKRO_ENABLE = true
|
NKRO_ENABLE = true
|
||||||
MOUSEKEY_ENABLE = no
|
MOUSEKEY_ENABLE = no
|
||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
KEY_LOCK_ENABLE = no
|
KEY_LOCK_ENABLE = no
|
||||||
AUTO_SHIFT_ENABLE = no
|
LEADER_ENABLE = no
|
||||||
LEADER_ENABLE = yes
|
|
||||||
@@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN B4
|
#define RGB_DI_PIN B4
|
||||||
#define RGBLIGHT_TIMER
|
|
||||||
#define RGBLED_NUM 20 // Number of LEDs
|
#define RGBLED_NUM 20 // Number of LEDs
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
|||||||
@@ -51,11 +51,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN B1
|
#define RGB_DI_PIN B1
|
||||||
#define RGBLIGHT_TIMER
|
|
||||||
#define RGBLED_NUM 4
|
|
||||||
#define ws2812_PORTREG PORTB
|
|
||||||
#define ws2812_DDRREG DDRB
|
|
||||||
|
|
||||||
|
#define RGBLED_NUM 4
|
||||||
#define RGBLIGHT_HUE_STEP 10
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
#define RGBLIGHT_SAT_STEP 17
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -13,7 +13,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ AUDIO_ENABLE = no # Audio output on port C6
|
|||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
UNICODEMAP_ENABLE = yes # unicodemap
|
UNICODEMAP_ENABLE = yes # unicodemap
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
LEADER_ENABLE = yes
|
LEADER_ENABLE = yes
|
||||||
|
|||||||
@@ -13,5 +13,5 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
TAP_DANCE_ENABLE = yes # see https://docs.qmk.fm/#/feature_tap_dance (+1000)
|
TAP_DANCE_ENABLE = yes # see https://docs.qmk.fm/#/feature_tap_dance (+1000)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
|
|
||||||
CUSTOM_MATRIX = yes
|
CUSTOM_MATRIX = yes
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
/* Set 0 if debouncing isn't needed */
|
/* Set 0 if debouncing isn't needed */
|
||||||
#define DEBOUNCING_DELAY 50
|
// #define DEBOUNCING_DELAY 0
|
||||||
|
|
||||||
/* key combination for command */
|
/* key combination for command */
|
||||||
#define IS_COMMAND() ( \
|
#define IS_COMMAND() ( \
|
||||||
|
|||||||
@@ -50,32 +50,30 @@
|
|||||||
// The first section contains all of the arguements
|
// The first section contains all of the arguements
|
||||||
// The second converts the arguments into a two-dimensional array
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
|
||||||
#define KC_KEYMAP( \
|
#define LAYOUT_ortho_4x12( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \
|
||||||
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \
|
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \
|
||||||
k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \
|
k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \
|
||||||
k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47 \
|
k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47 \
|
||||||
) \
|
) { \
|
||||||
{ \
|
{ k43, k45, k34, k11, k23, k40, k38, k25, k00, k12 }, \
|
||||||
{ KC_##k43, KC_##k45, KC_##k34, KC_##k11, KC_##k23, KC_##k40, KC_##k38, KC_##k25, KC_##k00, KC_##k12 }, \
|
{ k31, k44, k46, k35, k22, k28, k39, k37, k24, k13 }, \
|
||||||
{ KC_##k31, KC_##k44, KC_##k46, KC_##k35, KC_##k22, KC_##k28, KC_##k39, KC_##k37, KC_##k24, KC_##k13 }, \
|
{ k30, k32, k33, k47, k09, k29, k27, k26, k36, k02 }, \
|
||||||
{ KC_##k30, KC_##k32, KC_##k33, KC_##k47, KC_##k09, KC_##k29, KC_##k27, KC_##k26, KC_##k36, KC_##k02 }, \
|
{ k19, k20, k21, k42, k18, k16, k15, k14, k41, k17 }, \
|
||||||
{ KC_##k19, KC_##k20, KC_##k21, KC_##k42, KC_##k18, KC_##k16, KC_##k15, KC_##k14, KC_##k41, KC_##k17 }, \
|
{ k06, k07, k08, k10, KC_NO, k05, k04, k03, k01, KC_NO } \
|
||||||
{ KC_##k06, KC_##k07, KC_##k08, KC_##k10, KC_NO, KC_##k05, KC_##k04, KC_##k03, KC_##k01, KC_NO }, \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define KEYMAP( \
|
#define LAYOUT_kc_ortho_4x12( \
|
||||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, \
|
||||||
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \
|
k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, \
|
||||||
k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \
|
k24, k25, k26, k27, k28, k29, k30, k31, k32, k33, k34, k35, \
|
||||||
k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47 \
|
k36, k37, k38, k39, k40, k41, k42, k43, k44, k45, k46, k47 \
|
||||||
) \
|
) { \
|
||||||
{ \
|
{ KC_##k43, KC_##k45, KC_##k34, KC_##k11, KC_##k23, KC_##k40, KC_##k38, KC_##k25, KC_##k00, KC_##k12 }, \
|
||||||
{ k43, k45, k34, k11, k23, k40, k38, k25, k00, k12 }, \
|
{ KC_##k31, KC_##k44, KC_##k46, KC_##k35, KC_##k22, KC_##k28, KC_##k39, KC_##k37, KC_##k24, KC_##k13 }, \
|
||||||
{ k31, k44, k46, k35, k22, k28, k39, k37, k24, k13 }, \
|
{ KC_##k30, KC_##k32, KC_##k33, KC_##k47, KC_##k09, KC_##k29, KC_##k27, KC_##k26, KC_##k36, KC_##k02 }, \
|
||||||
{ k30, k32, k33, k47, k09, k29, k27, k26, k36, k02 }, \
|
{ KC_##k19, KC_##k20, KC_##k21, KC_##k42, KC_##k18, KC_##k16, KC_##k15, KC_##k14, KC_##k41, KC_##k17 }, \
|
||||||
{ k19, k20, k21, k42, k18, k16, k15, k14, k41, k17 }, \
|
{ KC_##k06, KC_##k07, KC_##k08, KC_##k10, KC_NO, KC_##k05, KC_##k04, KC_##k03, KC_##k01, KC_NO } \
|
||||||
{ k06, k07, k08, k10, KC_NO, k05, k04, k03, k01, KC_NO }, \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Chimera LS",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 13,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_4x12": {
|
||||||
|
"key_count": 48,
|
||||||
|
"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":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// this is the style you want to emulate.
|
// this is the style you want to emulate.
|
||||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||||
|
|
||||||
#include "chimera_ls.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
@@ -24,168 +24,163 @@ enum chimera_lets_split_layers
|
|||||||
#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
|
#define KC_SCTR MT(MOD_LCTL, KC_RBRC)
|
||||||
#define KC_SPLT MT(MOD_LALT, KC_MINS)
|
#define KC_SPLT MT(MOD_LALT, KC_MINS)
|
||||||
#define KC_MESC LT(_MACROS, KC_ESC)
|
#define KC_MESC LT(_MACROS, KC_ESC)
|
||||||
#define KC_INCL M(0)
|
|
||||||
#define KC_PULL M(1)
|
|
||||||
#define KC_PUSH M(2)
|
|
||||||
#define KC_SCAP M(3)
|
|
||||||
#define KC_SCOF M(4)
|
|
||||||
#define KC_CAD LALT(LCTL(KC_DEL))
|
#define KC_CAD LALT(LCTL(KC_DEL))
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
KC_INCL = SAFE_RANGE,
|
||||||
|
KC_PULL,
|
||||||
|
KC_PUSH,
|
||||||
|
KC_SCAP,
|
||||||
|
KC_SCOF
|
||||||
|
};
|
||||||
|
|
||||||
#define LONGPRESS_DELAY 150
|
#define LONGPRESS_DELAY 150
|
||||||
//#define LAYER_TOGGLE_DELAY 300
|
//#define LAYER_TOGGLE_DELAY 300
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
#define KC_ KC_TRNS
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = KC_KEYMAP(
|
[_QWERTY] = LAYOUT_ortho_4x12(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||||
MESC, Q , W , E , R , T , Y , U , I , O , P ,BSPC,
|
KC_MESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
TAB , A , S , D , F , G , H , J , K , L ,SCLN, ENT,
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
LSPO, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSPC,
|
KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
SCTL,SPFN,SPLT,AMPR,NMPD,SPC , SPC ,SYMB,ASTR,EXLM,LBRC,SCTR
|
KC_SCTL, KC_SPFN, KC_SPLT, KC_AMPR, KC_NMPD, KC_SPC, KC_SPC, KC_SYMB, KC_ASTR, KC_EXLM, KC_LBRC, KC_SCTR
|
||||||
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
//`--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_CAPS] = KC_KEYMAP(
|
[_CAPS] = LAYOUT_ortho_4x12(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||||
, , , , , , , , , , , ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , , , , , , , , ,COLN, ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, _______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , , , , , , , , , , ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, ,UNDS, , , , , , , , ,
|
_______, _______, KC_UNDS, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
//`--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------'
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
[_NUMPAD] = KC_KEYMAP(
|
[_NUMPAD] = LAYOUT_ortho_4x12(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||||
, , , , , , , 7 , 8 , 9 ,MINS,QUOT,
|
_______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_MINS, KC_QUOT,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , , , , , , 4 , 5 , 6 ,PLUS, ENT,
|
_______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, KC_PLUS, KC_ENT,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
LSFT, , , , , , , 1 , 2 , 3 ,ASTR, EQL,
|
KC_LSFT, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_ASTR, KC_EQL,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , , , ,BSPC, SPC , 0 , 0 , DOT,SLSH,
|
_______, _______, _______, _______, _______, KC_BSPC, KC_SPC, KC_0, KC_0, KC_DOT, KC_SLSH, _______
|
||||||
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
//`--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_SYMBOLS] = KC_KEYMAP(
|
[_SYMBOLS] = LAYOUT_ortho_4x12(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||||
,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,QUOT,
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_QUOT,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
F1 , F2 , F3 , F4 , F5 , F6 , TILD,EQL ,UNDS,LCBR,RCBR,PIPE,
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TILD, KC_EQL, KC_UNDS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
F7 , F8 , F9 , F10, F11, F12, GRV ,PLUS,MINS,LBRC,RBRC,BSLS,
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRV, KC_PLUS, KC_MINS, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , , , NO ,BSPC, SPC , , , , ,
|
_______, _______, _______, _______, XXXXXXX, KC_BSPC, KC_SPC, _______, _______, _______, _______, _______
|
||||||
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
//`--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_NAV] = KC_KEYMAP(
|
[_NAV] = LAYOUT_ortho_4x12(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||||
, , , , DEL,BSPC, ,HOME, UP , END, INS,PSCR,
|
_______, _______, _______, _______, KC_DEL, KC_BSPC, _______, KC_HOME, KC_UP, KC_END, KC_INS, KC_PSCR,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , ,LSFT,LCTL, ENT, ,LEFT,DOWN,RGHT, DEL, ,
|
_______, _______, _______, KC_LSFT, KC_LCTL, KC_ENT, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, _______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , , , , , ,PGUP,PGDN, , , ,
|
_______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, _______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , , , ,DEL , , , , , ,
|
_______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______
|
||||||
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
//`--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_MACROS] = KC_KEYMAP(
|
[_MACROS] = LAYOUT_ortho_4x12(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------.
|
||||||
, , , , , , , ,INCL, , , ,
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_INCL, _______, _______, _______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , ,CAD , , , , , , , , ,
|
_______, _______, _______, KC_CAD, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
SCAP, , , , , , , ,PULL,PUSH, ,SCAP,
|
KC_SCAP, _______, _______, _______, _______, _______, _______, _______, KC_PULL, KC_PUSH, _______, KC_SCAP,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||||
, , , , , , , , , , ,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
//`----+----+----+----+----+----' `----+----+----+----+----+----'
|
//`--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------'
|
||||||
),
|
),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch(keycode) {
|
||||||
};
|
|
||||||
|
|
||||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
||||||
{
|
|
||||||
switch(id) {
|
|
||||||
/* include some kind of library or header */
|
/* include some kind of library or header */
|
||||||
case 0:
|
case KC_INCL:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING("#include <>");
|
SEND_STRING("#include <>" SS_TAP(X_LEFT) );
|
||||||
return MACRO( T(LEFT), END);
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case KC_PULL:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
SEND_STRING("git pull");
|
SEND_STRING("git pull" SS_TAP(X_ENTER) );
|
||||||
return MACRO( T(ENT), END );
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case KC_PUSH:
|
||||||
if (record->event.pressed){
|
if (record->event.pressed){
|
||||||
SEND_STRING("git push");
|
SEND_STRING("git push" SS_TAP(X_ENTER) );
|
||||||
return MACRO( T(ENT), END );
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case KC_SCAP:
|
||||||
if (record->event.pressed){
|
if (record->event.pressed){
|
||||||
layer_on(_CAPS);
|
layer_on(_CAPS);
|
||||||
register_code(KC_CAPSLOCK);
|
register_code(KC_CAPSLOCK);
|
||||||
unregister_code(KC_CAPSLOCK);
|
unregister_code(KC_CAPSLOCK);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case KC_SCOF:
|
||||||
if (record->event.pressed){
|
if (record->event.pressed){
|
||||||
layer_off(_CAPS);
|
layer_off(_CAPS);
|
||||||
register_code(KC_CAPSLOCK);
|
register_code(KC_CAPSLOCK);
|
||||||
unregister_code(KC_CAPSLOCK);
|
unregister_code(KC_CAPSLOCK);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return MACRO_NONE;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
uint8_t layer = biton32(layer_state);
|
uint8_t layer = biton32(layer_state);
|
||||||
|
|
||||||
switch (layer) {
|
switch (layer) {
|
||||||
case _QWERTY:
|
case _QWERTY:
|
||||||
set_led_green;
|
set_led_green;
|
||||||
break;
|
break;
|
||||||
case _CAPS:
|
case _CAPS:
|
||||||
set_led_white;
|
set_led_white;
|
||||||
break;
|
break;
|
||||||
case _NUMPAD:
|
case _NUMPAD:
|
||||||
set_led_blue;
|
set_led_blue;
|
||||||
break;
|
break;
|
||||||
case _SYMBOLS:
|
case _SYMBOLS:
|
||||||
set_led_red;
|
set_led_red;
|
||||||
break;
|
break;
|
||||||
case _NAV:
|
case _NAV:
|
||||||
set_led_magenta;
|
set_led_magenta;
|
||||||
break;
|
break;
|
||||||
case _MACROS:
|
case _MACROS:
|
||||||
set_led_cyan;
|
set_led_cyan;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
set_led_green;
|
set_led_green;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -2,18 +2,14 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
A wireless version of the let's split: a split 40% ortholinear keyboard
|
A wireless version of the Let's Split: a split 40% ortholinear keyboard.
|
||||||
|
|
||||||
Keyboard Maintainer: [William Wilson](https://github.com/GlenPickle)
|
Keyboard Maintainer: [William Wilson](https://github.com/GlenPickle)
|
||||||
|
Hardware Supported: Chimera LS PCB, WaveShare core nRF51822
|
||||||
|
|
||||||
Hardware Supported: Chimera LS PCB, WaveShare core nRF51822
|
|
||||||
|
|
||||||
Hardware Availability: [Gerbers](https://github.com/GlenPickle/Chimera/tree/master/ls/gerbers)
|
Hardware Availability: [Gerbers](https://github.com/GlenPickle/Chimera/tree/master/ls/gerbers)
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make chimera_ls:default
|
make chimera_ls:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
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).
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ F_USB = $(F_CPU)
|
|||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
@@ -80,3 +80,5 @@ UNICODE_ENABLE = YES # Unicode
|
|||||||
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
|
||||||
USB = /dev/ttyACM0
|
USB = /dev/ttyACM0
|
||||||
|
|
||||||
|
LAYOUTS = ortho_4x12
|
||||||
@@ -47,9 +47,7 @@
|
|||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#endif
|
#endif
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_TIMER
|
|
||||||
#define RGBLED_NUM 4
|
#define RGBLED_NUM 4
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
# change to "no" to disable the options, or define them in the makefile.mk in
|
# change to "no" to disable the options, or define them in the makefile.mk in
|
||||||
# the appropriate keymap folder that will get included automatically
|
# the appropriate keymap folder that will get included automatically
|
||||||
#
|
#
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
include ../../../../Makefile
|
include ../../../../Makefile
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
ONEHAND_ENABLE = no # Enable one-hand typing
|
ONEHAND_ENABLE = no # Enable one-hand typing
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# Contra layout
|
||||||
|
|
||||||
|
My current setup consists of a very simple base layer, numbers layer, mouse layer and emoji layer.
|
||||||
|
Still many options, but time will tell if changes are needed.
|
||||||
|
|
||||||
|
## Keymap
|
||||||
|
|
||||||
|
```
|
||||||
|
#define SP_MSE LT(_MOUSE, KC_SPC)
|
||||||
|
|
||||||
|
|
||||||
|
BASE layer
|
||||||
|
{ KC_GESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC },
|
||||||
|
{ KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_ENT },
|
||||||
|
{ KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_QUOT },
|
||||||
|
{ KC_LCTL , KC_GRV , KC_LALT , KC_LGUI , MO(1) , SP_MSE , SP_MSE , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , MO(2) },
|
||||||
|
|
||||||
|
LOWER layer
|
||||||
|
{ _______ , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL },
|
||||||
|
{ _______ , KC_F1 , KC_F2 , KC_F3 , KC_LBRC , KC_MINS , KC_EQL , KC_RBRC , KC_F7 , KC_F8 , KC_F9 , _______ },
|
||||||
|
{ _______ , KC_F4 , KC_F5 , KC_F6 , KC_HOME , KC_BSLS , KC_MPLY , KC_END , KC_F10 , KC_F11 , KC_F12 , _______ },
|
||||||
|
{ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ },
|
||||||
|
|
||||||
|
EMOJI layer
|
||||||
|
{ _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ },
|
||||||
|
{ _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ },
|
||||||
|
{ _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ },
|
||||||
|
{ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ },
|
||||||
|
|
||||||
|
MOUSE layer
|
||||||
|
{ _______ , KC_WH_L , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_U , KC_WH_U , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_L , _______ },
|
||||||
|
{ _______ , KC_WH_R , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_D , KC_WH_D , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_R , _______ },
|
||||||
|
{ _______ , KC_VOLD , KC_VOLU , KC_MPRV , KC_MNXT , KC_MPLY , KC_MPLY , KC_MPRV , KC_MNXT , KC_VOLD , KC_VOLU , _______ },
|
||||||
|
{ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ },
|
||||||
|
```
|
||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define MOUSEKEY_DELAY 0
|
||||||
|
#define MOUSEKEY_INTERVAL 16
|
||||||
|
#define MOUSEKEY_MAX_SPEED 7
|
||||||
|
#define MOUSEKEY_TIME_TO_MAX 60
|
||||||
|
#define MOUSEKEY_WHEEL_MAX_SPEED 8
|
||||||
|
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
||||||
|
#define MOUSEKEY_WHEEL_DELAY 0
|
||||||
@@ -0,0 +1,126 @@
|
|||||||
|
/* Copyright 2018 darm
|
||||||
|
*
|
||||||
|
* 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 emoji_map {
|
||||||
|
UNAM, // unamused 😒
|
||||||
|
HEYE, // smiling face with heart shaped eyes 😍
|
||||||
|
OK, // ok hand sign 👌
|
||||||
|
SMIR, // smirk 😏
|
||||||
|
PRAY, // pray 🙏
|
||||||
|
CELE, // celebration 🙌
|
||||||
|
COOL, // smile with sunglasses 😎
|
||||||
|
EYES, // eyes
|
||||||
|
THNK, // BIG THONK
|
||||||
|
NAIL, // Nailcare
|
||||||
|
SOS, // Vuile sos
|
||||||
|
REDB, // Red B
|
||||||
|
HNDR, // 100
|
||||||
|
MONY,
|
||||||
|
FIRE,
|
||||||
|
CAR,
|
||||||
|
BUTT,
|
||||||
|
BNIS,
|
||||||
|
CUM,
|
||||||
|
CLAP,
|
||||||
|
TRIU, // Fart from nose
|
||||||
|
SCRM,
|
||||||
|
VOMI,
|
||||||
|
DTIV, // Detective
|
||||||
|
EXPL, // Brainsplosion
|
||||||
|
HAIR, // Haircut
|
||||||
|
DANC, // Salsa dancer
|
||||||
|
STRN, // Stronk
|
||||||
|
LEFT, // Point Left
|
||||||
|
RGHT, // Point Right
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint32_t PROGMEM unicode_map[] = {
|
||||||
|
[UNAM] = 0x1F612,
|
||||||
|
[HEYE] = 0x1f60d,
|
||||||
|
[OK] = 0x1F44C,
|
||||||
|
[SMIR] = 0x1F60F,
|
||||||
|
[PRAY] = 0x1F64F,
|
||||||
|
[CELE] = 0x1F64C,
|
||||||
|
[COOL] = 0x1F60E,
|
||||||
|
[EYES] = 0x1F440,
|
||||||
|
[THNK] = 0x1F914,
|
||||||
|
[NAIL] = 0x1F485,
|
||||||
|
[SOS] = 0x1F198,
|
||||||
|
[REDB] = 0x1F171,
|
||||||
|
[HNDR] = 0x1F4AF,
|
||||||
|
[MONY] = 0x1F480,
|
||||||
|
[FIRE] = 0x1F525,
|
||||||
|
[CAR] = 0x1F697,
|
||||||
|
[BUTT] = 0x1F351,
|
||||||
|
[BNIS] = 0x1F346,
|
||||||
|
[CUM] = 0x1F4A6,
|
||||||
|
[CLAP] = 0x1F44F,
|
||||||
|
[TRIU] = 0x1F624,
|
||||||
|
[SCRM] = 0x1F631,
|
||||||
|
[VOMI] = 0x1F92E,
|
||||||
|
[DTIV] = 0x1F575,
|
||||||
|
[EXPL] = 0x1F92F,
|
||||||
|
[HAIR] = 0x2640,
|
||||||
|
[DANC] = 0x1F483,
|
||||||
|
[STRN] = 0x1F4AA,
|
||||||
|
[LEFT] = 0x1F448,
|
||||||
|
[RGHT] = 0x1F449,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Layer shorthand
|
||||||
|
#define _BASE 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _EMOJI 2
|
||||||
|
#define _MOUSE 3
|
||||||
|
|
||||||
|
#define SP_MSE LT(_MOUSE, KC_SPC)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT_ortho_4x12(
|
||||||
|
KC_GESC , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC ,
|
||||||
|
KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_ENT ,
|
||||||
|
KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_QUOT ,
|
||||||
|
KC_LCTL , KC_GRV , KC_LALT , KC_LGUI , MO(1) , SP_MSE , SP_MSE , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , MO(2)
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT_ortho_4x12(
|
||||||
|
_______ , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL ,
|
||||||
|
_______ , KC_F1 , KC_F2 , KC_F3 , KC_LBRC , KC_MINS , KC_EQL , KC_RBRC , KC_F7 , KC_F8 , KC_F9 , _______ ,
|
||||||
|
_______ , KC_F4 , KC_F5 , KC_F6 , KC_HOME , KC_BSLS , KC_MPLY , KC_END , KC_F10 , KC_F11 , KC_F12 , _______ ,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_EMOJI] = LAYOUT_ortho_4x12(
|
||||||
|
_______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ ,
|
||||||
|
_______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ ,
|
||||||
|
_______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ ,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
),
|
||||||
|
|
||||||
|
[_MOUSE] = LAYOUT_ortho_4x12(
|
||||||
|
_______ , KC_WH_L , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_U , KC_WH_U , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_L , _______ ,
|
||||||
|
_______ , KC_WH_R , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_D , KC_WH_D , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_R , _______ ,
|
||||||
|
_______ , KC_VOLD , KC_VOLU , KC_MPRV , KC_MNXT , KC_MPLY , KC_MPLY , KC_MPRV , KC_MNXT , KC_VOLD , KC_VOLU , _______ ,
|
||||||
|
_______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
}
|
||||||
Executable
+6
@@ -0,0 +1,6 @@
|
|||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
UNICODEMAP_ENABLE = yes # Unicode
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
|
|||||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
MIDI_ENABLE = no # MIDI controls
|
MIDI_ENABLE = no # MIDI controls
|
||||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
|
||||||
ifndef QUANTUM_DIR
|
ifndef QUANTUM_DIR
|
||||||
include ../../../../Makefile
|
include ../../../../Makefile
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
ADB-to USB Keyboard Converter
|
||||||
|
=============================
|
||||||
|
This firmware converts Apple Desktop Bus (ADB) keyboard protocol to USB so that you can use an ADB keyboard on a modern computer. It works on the PJRC Teensy 2.0 and other USB AVR MCUs (ATMega32U4, AT90USB64/128, etc) and needs at least 10KB of flash memory.
|
||||||
|
|
||||||
|
|
||||||
|
This is a port of the TMK ADB-to-USB converter to QMK. For information on QMK, please consult the following:
|
||||||
|
https://github.com/qmk/qmk_firmware
|
||||||
|
https://docs.qmk.fm
|
||||||
|
|
||||||
|
|
||||||
|
Wiring
|
||||||
|
------
|
||||||
|
Connect the VCC, GND, and DATA lines of the ADB keyboard to the controller (Teensy 2.0 or similar). By default the DATA line uses port PD0. The Power SW line is unused by the converter.
|
||||||
|
|
||||||
|
ADB female socket from the front:
|
||||||
|
|
||||||
|
,--_--.
|
||||||
|
/ o4 3o \ 1: DATA
|
||||||
|
| o2 1o | 2: Power SW
|
||||||
|
- === - 3: VCC
|
||||||
|
`-___-' 4: GND
|
||||||
|
|
||||||
|
This converter uses AVR's internal pull-up, but it seems to be too weak, in particular when you want to use a long or coiled cable. Using an external pull-up resistor (1K-10K Ohm) between the DATA and VCC lines is strongly recommended.
|
||||||
|
|
||||||
|
Pull-up resistor:
|
||||||
|
|
||||||
|
Keyboard Converter
|
||||||
|
,------.
|
||||||
|
5V------+------|VCC |
|
||||||
|
| | |
|
||||||
|
[R] | |
|
||||||
|
| | |
|
||||||
|
Signal--+------|PD0 |
|
||||||
|
| |
|
||||||
|
GND------------|GND |
|
||||||
|
`------'
|
||||||
|
R: 1K Ohm resistor
|
||||||
|
|
||||||
|
|
||||||
|
Define following macros for ADB connection in config.h if you use other than port PD0.
|
||||||
|
|
||||||
|
ADB_PORT, ADB_PIN, ADB_DDR, ADB_DATA_BIT
|
||||||
|
|
||||||
|
|
||||||
|
Building the Firmware
|
||||||
|
------------------------------------------
|
||||||
|
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).
|
||||||
|
|
||||||
|
|
||||||
|
Keymap
|
||||||
|
------
|
||||||
|
To build the default keymap run this command:
|
||||||
|
|
||||||
|
$ make converter/adb_usb:default
|
||||||
|
|
||||||
|
You may add your own keymap to the converter/adb_usb/keymaps directory, as you would with any other QMK-powered keyboard.
|
||||||
|
|
||||||
|
To build your custom keymap, change the build command to:
|
||||||
|
|
||||||
|
$ make converter/adb_usb:my_keymap
|
||||||
|
|
||||||
|
Where 'my_keymap' is the name of your custom keymap directory.
|
||||||
|
|
||||||
|
|
||||||
|
Locking Caps Lock
|
||||||
|
----------------
|
||||||
|
Many old ADB keyboards use a locking switch for the caps lock key. This converter supports the locking caps lock key by default.
|
||||||
|
|
||||||
|
|
||||||
|
Notes
|
||||||
|
-----
|
||||||
|
Non-extended ADB keyboards make no distinction between the left and right modifiers,
|
||||||
|
i.e. the keycode for the left modifier will be sent even if the right modifier
|
||||||
|
|
||||||
|
The Apple Extended Keyboard and Apple Extended Keyboard II can differentiate between the left and right modifiers except for the GUI key (Windows/Command).
|
||||||
|
|
||||||
|
Most ADB keyboards have no diodes in its matrix so they are not NKRO,
|
||||||
|
though the ADB protocol itself supports it. See protocol/adb.c for more info.
|
||||||
|
|
||||||
|
|
||||||
|
QMK Port Changelog
|
||||||
|
---------
|
||||||
|
- 2018/09/16 - Initial release.
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#include "adb_usb.h"
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include "quantum.h"
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011,2012,2013 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Ported to QMK by Peter Roe <[email protected]>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef KEYMAP_COMMON_H
|
||||||
|
#define KEYMAP_COMMON_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* M0115/M3501 Apple Extended Keyboard ANSI
|
||||||
|
* ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,---.
|
||||||
|
* |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr|
|
||||||
|
* `---' `---------------' `---------------' `---------------' `-----------' `---'
|
||||||
|
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||||
|
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| =| /| *|
|
||||||
|
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| -|
|
||||||
|
* |-----------------------------------------------------------| `-----------' |---------------|
|
||||||
|
* |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| +|
|
||||||
|
* |-----------------------------------------------------------| ,---. |---------------|
|
||||||
|
* |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| |
|
||||||
|
* |-----------------------------------------------------------| ,-----------. |-----------|Ent|
|
||||||
|
* |Ctrl |Opt |Cmd | Space | |Opt |Ctrl | |Lef|Dow|Rig| | 0| .| |
|
||||||
|
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||||
|
*/
|
||||||
|
#define LAYOUT_ext_ansi( \
|
||||||
|
K35, K7A,K78,K63,K76,K60,K61,K62,K64,K65,K6D,K67,K6F, K69,K6B,K71, K7F, \
|
||||||
|
K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74, K47,K51,K4B,K43, \
|
||||||
|
K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K75,K77,K79, K59,K5B,K5C,K4E, \
|
||||||
|
K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K45, \
|
||||||
|
K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K3E, K53,K54,K55, \
|
||||||
|
K36,K3A,K37, K31, K7C,K7D, K3B,K3D,K3C, K52, K41,K4C \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
|
||||||
|
{ K08, K09, KC_NO, K0B, K0C, K0D, K0E, K0F }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
|
||||||
|
{ K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
|
||||||
|
{ K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
|
||||||
|
{ K30, K31, K32, K33, KC_NO, K35, K36, K37 }, \
|
||||||
|
{ K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, }, \
|
||||||
|
{ KC_NO, K41, KC_NO, K43, KC_NO, K45, KC_NO, K47 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, K4E, KC_NO, }, \
|
||||||
|
{ KC_NO, KC_NO, K52, K53, K54, K55, K56, K57 }, \
|
||||||
|
{ K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO, }, \
|
||||||
|
{ K60, K61, K62, K63, K64, K65, KC_NO, K67 }, \
|
||||||
|
{ KC_NO, K69, KC_NO, K6B, KC_NO, K6D, KC_NO, K6F }, \
|
||||||
|
{ KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \
|
||||||
|
{ K78, K79, K7A, K7B, K7C, K7D, KC_NO, K7F } \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* M0116 Apple Standard Keyboard ANSI
|
||||||
|
* +-------+
|
||||||
|
* | power |
|
||||||
|
* +-------+
|
||||||
|
* +---+---+---+---+---+---+---+---+---+---+---+---+---+-----+ +---+---+---+---+
|
||||||
|
* |esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | bks | |clr| = | / | * |
|
||||||
|
* +---------------------------------------------------------+ +---+---+---+---+
|
||||||
|
* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | | | 7 | 8 | 9 | + |
|
||||||
|
* +-----------------------------------------------------+ | +---+---+---+---+
|
||||||
|
* | ctrl | a | s | d | f | g | h | j | k | l | ; | ' |return| | 4 | 5 | 6 | - |
|
||||||
|
* +---------------------------------------------------------+ +---+---+---+---+
|
||||||
|
* | shift | z | x | c | v | b | n | m | , | . | / | shift | | 1 | 2 | 3 | |
|
||||||
|
* +---------------------------------------------------------+ +-------+---|ent|
|
||||||
|
* |cap|opt|comnd| ` | | \ |lef|rig|dwn|up | | 0 | . | |
|
||||||
|
* +---------------------------------------------------------+ +-------+---+---+
|
||||||
|
*/
|
||||||
|
#define LAYOUT_m0116_ansi( \
|
||||||
|
K7F, \
|
||||||
|
K35,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K51,K4B,K43, \
|
||||||
|
K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K45, \
|
||||||
|
K36,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K4E, \
|
||||||
|
K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K53,K54,K55, \
|
||||||
|
K39,K3A,K37,K32, K31, K2A,K3B,K3C,K3D,K3E, K52, K41,K4C \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
|
||||||
|
{ K08, K09, KC_NO, K0B, K0C, K0D, K0E, K0F }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
|
||||||
|
{ K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27 }, \
|
||||||
|
{ K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \
|
||||||
|
{ K30, K31, K32, K33, KC_NO, K35, K36, K37 }, \
|
||||||
|
{ K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO }, \
|
||||||
|
{ KC_NO, K41, KC_NO, K43, KC_NO, K45, KC_NO, K47 }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, K4E, KC_NO }, \
|
||||||
|
{ KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \
|
||||||
|
{ K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, K7B, KC_NO, KC_NO, KC_NO, K7F } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Ported to QMK by Peter Roe <[email protected]>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0ADB
|
||||||
|
#define DEVICE_VER 0x0101
|
||||||
|
#define MANUFACTURER QMK
|
||||||
|
#define PRODUCT ADB keyboard converter
|
||||||
|
#define DESCRIPTION Convert ADB keyboard to USB
|
||||||
|
|
||||||
|
/* matrix size */
|
||||||
|
#define MATRIX_ROWS 16 // keycode bit: 3-0
|
||||||
|
#define MATRIX_COLS 8 // keycode bit: 6-4
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/* ADB port setting */
|
||||||
|
#define ADB_PORT PORTD
|
||||||
|
#define ADB_PIN PIND
|
||||||
|
#define ADB_DDR DDRD
|
||||||
|
#define ADB_DATA_BIT 0
|
||||||
|
//#define ADB_PSW_BIT 1 // optional
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define MCTL LCTL(KC_UP)
|
||||||
|
#define SCST LSFT(LGUI(KC_4))
|
||||||
|
#define SLP LALT(LGUI(KC_EJCT))
|
||||||
|
|
||||||
|
#define APP1 LSFT(LALT(LCTL(LGUI(KC_1))))
|
||||||
|
#define APP2 LSFT(LALT(LCTL(LGUI(KC_2))))
|
||||||
|
#define APP3 LSFT(LALT(LCTL(LGUI(KC_3))))
|
||||||
|
#define APP4 LSFT(LALT(LCTL(LGUI(KC_4))))
|
||||||
|
#define APP5 LSFT(LALT(LCTL(LGUI(KC_5))))
|
||||||
|
#define APP6 LSFT(LALT(LCTL(LGUI(KC_6))))
|
||||||
|
#define APP7 LSFT(LALT(LCTL(LGUI(KC_7))))
|
||||||
|
#define APP8 LSFT(LALT(LCTL(LGUI(KC_8))))
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
LAYOUT_ext_ansi(
|
||||||
|
KC_ESC, APP1, APP2, APP3, APP4, APP5, APP6, APP7, APP8, MCTL, KC_MUTE, KC_VOLD, KC_VOLU, SCST, KC_SLCK, KC_PAUS, SLP,
|
||||||
|
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_NLCK, KC_EQL, KC_PSLS, KC_PAST,
|
||||||
|
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_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
|
KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
LAYOUT_ext_ansi(
|
||||||
|
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_EJCT,
|
||||||
|
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_NLCK, KC_EQL, KC_PSLS, KC_PAST,
|
||||||
|
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_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
|
KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3,
|
||||||
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "adb.h"
|
||||||
|
#include "led.h"
|
||||||
|
|
||||||
|
|
||||||
|
void led_set(uint8_t usb_led)
|
||||||
|
{
|
||||||
|
adb_host_kbd_led(ADB_ADDR_KEYBOARD, ~usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Ported to QMK by Peter Roe <[email protected]>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef LED_H
|
||||||
|
#define LED_H
|
||||||
|
#include "stdint.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* keyboard LEDs */
|
||||||
|
#define USB_LED_NUM_LOCK 0
|
||||||
|
#define USB_LED_CAPS_LOCK 1
|
||||||
|
#define USB_LED_SCROLL_LOCK 2
|
||||||
|
#define USB_LED_COMPOSE 3
|
||||||
|
#define USB_LED_KANA 4
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void led_set(uint8_t usb_led);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,267 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Ported to QMK by Peter Roe <[email protected]>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <avr/io.h>
|
||||||
|
#include <util/delay.h>
|
||||||
|
#include "print.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "adb.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
#include "report.h"
|
||||||
|
#include "host.h"
|
||||||
|
#include "led.h"
|
||||||
|
#include "timer.h"
|
||||||
|
|
||||||
|
static bool is_iso_layout = false;
|
||||||
|
|
||||||
|
// matrix state buffer(1:on, 0:off)
|
||||||
|
static matrix_row_t matrix[MATRIX_ROWS];
|
||||||
|
|
||||||
|
static void register_key(uint8_t key);
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
// LED on
|
||||||
|
DDRD |= (1<<6); PORTD |= (1<<6);
|
||||||
|
|
||||||
|
adb_host_init();
|
||||||
|
// wait for keyboard to boot up and receive command
|
||||||
|
_delay_ms(2000);
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||||
|
|
||||||
|
led_set(host_keyboard_leds());
|
||||||
|
|
||||||
|
// debug_enable = false;
|
||||||
|
// debug_matrix = true;
|
||||||
|
// debug_keyboard = true;
|
||||||
|
// debug_mouse = true;
|
||||||
|
// print("debug enabled.\n");
|
||||||
|
|
||||||
|
// LED off
|
||||||
|
DDRD |= (1<<6); PORTD &= ~(1<<6);
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ADB_MOUSE_ENABLE
|
||||||
|
|
||||||
|
#ifdef MAX
|
||||||
|
#undef MAX
|
||||||
|
#endif
|
||||||
|
#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
|
||||||
|
|
||||||
|
static report_mouse_t mouse_report = {};
|
||||||
|
|
||||||
|
void adb_mouse_task(void)
|
||||||
|
{
|
||||||
|
uint16_t codes;
|
||||||
|
int16_t x, y;
|
||||||
|
static int8_t mouseacc;
|
||||||
|
|
||||||
|
/* tick of last polling */
|
||||||
|
static uint16_t tick_ms;
|
||||||
|
|
||||||
|
// polling with 12ms interval
|
||||||
|
if (timer_elapsed(tick_ms) < 12) return;
|
||||||
|
tick_ms = timer_read();
|
||||||
|
|
||||||
|
codes = adb_host_mouse_recv();
|
||||||
|
// If nothing received reset mouse acceleration, and quit.
|
||||||
|
if (!codes) {
|
||||||
|
mouseacc = 1;
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
// Bit sixteen is button.
|
||||||
|
if (~codes & (1 << 15))
|
||||||
|
mouse_report.buttons |= MOUSE_BTN1;
|
||||||
|
if (codes & (1 << 15))
|
||||||
|
mouse_report.buttons &= ~MOUSE_BTN1;
|
||||||
|
// lower seven bits are movement, as signed int_7.
|
||||||
|
// low byte is X-axis, high byte is Y.
|
||||||
|
y = (codes>>8 & 0x3F);
|
||||||
|
x = (codes>>0 & 0x3F);
|
||||||
|
// bit seven and fifteen is negative
|
||||||
|
// usb does not use int_8, but int_7 (measuring distance) with sign-bit.
|
||||||
|
if (codes & (1 << 6))
|
||||||
|
x = (x-0x40);
|
||||||
|
if (codes & (1 << 14))
|
||||||
|
y = (y-0x40);
|
||||||
|
// Accelerate mouse. (They weren't meant to be used on screens larger than 320x200).
|
||||||
|
x *= mouseacc;
|
||||||
|
y *= mouseacc;
|
||||||
|
// Cap our two bytes per axis to one byte.
|
||||||
|
// Easier with a MIN-function, but since -MAX(-a,-b) = MIN(a,b)...
|
||||||
|
// I.E. MIN(MAX(x,-127),127) = -MAX(-MAX(x, -127), -127) = MIN(-MIN(-x,127),127)
|
||||||
|
mouse_report.x = -MAX(-MAX(x, -127), -127);
|
||||||
|
mouse_report.y = -MAX(-MAX(y, -127), -127);
|
||||||
|
if (debug_mouse) {
|
||||||
|
print("adb_host_mouse_recv: "); print_bin16(codes); print("\n");
|
||||||
|
print("adb_mouse raw: [");
|
||||||
|
phex(mouseacc); print(" ");
|
||||||
|
phex(mouse_report.buttons); print("|");
|
||||||
|
print_decs(mouse_report.x); print(" ");
|
||||||
|
print_decs(mouse_report.y); print("]\n");
|
||||||
|
}
|
||||||
|
// Send result by usb.
|
||||||
|
host_mouse_send(&mouse_report);
|
||||||
|
// increase acceleration of mouse
|
||||||
|
mouseacc += ( mouseacc < ADB_MOUSE_MAXACC ? 1 : 0 );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
/* extra_key is volatile and more convoluted than necessary because gcc refused
|
||||||
|
to generate valid code otherwise. Making extra_key uint8_t and constructing codes
|
||||||
|
here via codes = extra_key<<8 | 0xFF; would consistently fail to even LOAD
|
||||||
|
extra_key from memory, and leave garbage in the high byte of codes. I tried
|
||||||
|
dozens of code variations and it kept generating broken assembly output. So
|
||||||
|
beware if attempting to make extra_key code more logical and efficient. */
|
||||||
|
static volatile uint16_t extra_key = 0xFFFF;
|
||||||
|
uint16_t codes;
|
||||||
|
uint8_t key0, key1;
|
||||||
|
|
||||||
|
/* tick of last polling */
|
||||||
|
static uint16_t tick_ms;
|
||||||
|
|
||||||
|
codes = extra_key;
|
||||||
|
extra_key = 0xFFFF;
|
||||||
|
|
||||||
|
if ( codes == 0xFFFF )
|
||||||
|
{
|
||||||
|
// polling with 12ms interval
|
||||||
|
if (timer_elapsed(tick_ms) < 12) return 0;
|
||||||
|
tick_ms = timer_read();
|
||||||
|
|
||||||
|
codes = adb_host_kbd_recv();
|
||||||
|
}
|
||||||
|
|
||||||
|
key0 = codes>>8;
|
||||||
|
key1 = codes&0xFF;
|
||||||
|
|
||||||
|
if (debug_matrix && codes) {
|
||||||
|
print("adb_host_kbd_recv: "); phex16(codes); print("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (codes == 0) { // no keys
|
||||||
|
return 0;
|
||||||
|
} else if (codes == 0x7F7F) { // power key press
|
||||||
|
register_key(0x7F);
|
||||||
|
} else if (codes == 0xFFFF) { // power key release
|
||||||
|
register_key(0xFF);
|
||||||
|
} else if (key0 == 0xFF) { // error
|
||||||
|
xprintf("adb_host_kbd_recv: ERROR(%d)\n", codes);
|
||||||
|
// something wrong or plug-in
|
||||||
|
matrix_init();
|
||||||
|
return key1;
|
||||||
|
} else {
|
||||||
|
/* Swap codes for ISO keyboard
|
||||||
|
* https://github.com/tmk/tmk_keyboard/issues/35
|
||||||
|
*
|
||||||
|
* ANSI
|
||||||
|
* ,----------- ----------.
|
||||||
|
* | *a| 1| 2 =|Backspa|
|
||||||
|
* |----------- ----------|
|
||||||
|
* |Tab | Q| | ]| *c|
|
||||||
|
* |----------- ----------|
|
||||||
|
* |CapsLo| A| '|Return |
|
||||||
|
* |----------- ----------|
|
||||||
|
* |Shift | Shift |
|
||||||
|
* `----------- ----------'
|
||||||
|
*
|
||||||
|
* ISO
|
||||||
|
* ,----------- ----------.
|
||||||
|
* | *a| 1| 2 =|Backspa|
|
||||||
|
* |----------- ----------|
|
||||||
|
* |Tab | Q| | ]|Retur|
|
||||||
|
* |----------- -----` |
|
||||||
|
* |CapsLo| A| '| *c| |
|
||||||
|
* |----------- ----------|
|
||||||
|
* |Shif| *b| Shift |
|
||||||
|
* `----------- ----------'
|
||||||
|
*
|
||||||
|
* ADB scan code USB usage
|
||||||
|
* ------------- ---------
|
||||||
|
* Key ANSI ISO ANSI ISO
|
||||||
|
* ---------------------------------------------
|
||||||
|
* *a 0x32 0x0A 0x35 0x35
|
||||||
|
* *b ---- 0x32 ---- 0x64
|
||||||
|
* *c 0x2A 0x2A 0x31 0x31(or 0x32)
|
||||||
|
*/
|
||||||
|
if (is_iso_layout) {
|
||||||
|
if ((key0 & 0x7F) == 0x32) {
|
||||||
|
key0 = (key0 & 0x80) | 0x0A;
|
||||||
|
} else if ((key0 & 0x7F) == 0x0A) {
|
||||||
|
key0 = (key0 & 0x80) | 0x32;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
register_key(key0);
|
||||||
|
if (key1 != 0xFF) // key1 is 0xFF when no second key.
|
||||||
|
extra_key = key1<<8 | 0xFF; // process in a separate call
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
matrix_row_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
static void register_key(uint8_t key)
|
||||||
|
{
|
||||||
|
uint8_t col, row;
|
||||||
|
col = key&0x07;
|
||||||
|
row = (key>>3)&0x0F;
|
||||||
|
if (key&0x80) {
|
||||||
|
matrix[row] &= ~(1<<col);
|
||||||
|
} else {
|
||||||
|
matrix[row] |= (1<<col);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
# MCU name
|
||||||
|
# atmega32u4 Teensy2.0
|
||||||
|
# atemga32u4 TMK Converter rev.1
|
||||||
|
# atemga32u2 TMK Converter rev.2
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
#
|
||||||
|
F_CPU = 16000000
|
||||||
|
# F_CPU = 8000000
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA
|
||||||
|
EXTRAKEY_ENABLE = yes
|
||||||
|
USB_HID_ENABLE = yes
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
|
#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line
|
||||||
|
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
SRC = matrix.c \
|
||||||
|
adb.c
|
||||||
@@ -14,7 +14,7 @@ AUDIO_ENABLE = no # Audio output on port C6
|
|||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
UNICODEMAP_ENABLE = yes
|
UNICODEMAP_ENABLE = yes
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
PS2_USE_USART = yes
|
PS2_USE_USART = yes
|
||||||
API_SYSEX_ENABLE = no
|
API_SYSEX_ENABLE = no
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ AUDIO_ENABLE = no # Audio output on port C6
|
|||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
UNICODEMAP_ENABLE = yes
|
UNICODEMAP_ENABLE = yes
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
PS2_USE_USART = yes
|
PS2_USE_USART = yes
|
||||||
API_SYSEX_ENABLE = no
|
API_SYSEX_ENABLE = no
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ AUDIO_ENABLE = no # Audio output on port C6
|
|||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
UNICODEMAP_ENABLE = yes
|
UNICODEMAP_ENABLE = yes
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
PS2_USE_USART = yes
|
PS2_USE_USART = yes
|
||||||
API_SYSEX_ENABLE = n
|
API_SYSEX_ENABLE = n
|
||||||
CUSTOM_MATRIX = yes
|
CUSTOM_MATRIX = yes
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ AUDIO_ENABLE = no # Audio output on port C6
|
|||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
UNICODEMAP_ENABLE = yes
|
UNICODEMAP_ENABLE = yes
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
CUSTOM_MATRIX = yes
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
XT to USB keyboard converter
|
||||||
|
==============================
|
||||||
|
This is a port of TMK's converter/xt_usb to QMK.
|
||||||
|
|
||||||
|
This firmware converts XT keyboard protocol to USB.(It supports Scan Code Set 1.)
|
||||||
|
|
||||||
|
|
||||||
|
Connect Wires
|
||||||
|
-------------
|
||||||
|
1. Connect **Vcc** and **GND**.
|
||||||
|
2. Connect **Clock** and **Data** line. **Clock** is on `PD1`, **Data** on `PD0` by default. And optionally you can use `PB7` for **Reset**.(Compatible to Soarer's converter) To change pin configuration edit `config.h`.
|
||||||
|
3. You need pull-up resistor. **1K-10K Ohm** will be OK.
|
||||||
|
|
||||||
|
|
||||||
|
XT keyboard protocol resource
|
||||||
|
------------------------------
|
||||||
|
https://github.com/tmk/tmk_keyboard/wiki/IBM-PC-XT-Keyboard-Protocol
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6512
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER QMK
|
||||||
|
#define PRODUCT XT keyboard converter
|
||||||
|
#define DESCRIPTION convert XT keyboard to USB
|
||||||
|
|
||||||
|
|
||||||
|
/* matrix size */
|
||||||
|
#define MATRIX_ROWS 16 // keycode bit: 3-0
|
||||||
|
#define MATRIX_COLS 8 // keycode bit: 6-4
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
//#define NO_SUSPEND_POWER_DOWN
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XT Pin interrupt
|
||||||
|
*/
|
||||||
|
#define XT_CLOCK_PORT PORTD
|
||||||
|
#define XT_CLOCK_PIN PIND
|
||||||
|
#define XT_CLOCK_DDR DDRD
|
||||||
|
#define XT_CLOCK_BIT 1
|
||||||
|
#define XT_DATA_PORT PORTD
|
||||||
|
#define XT_DATA_PIN PIND
|
||||||
|
#define XT_DATA_DDR DDRD
|
||||||
|
#define XT_DATA_BIT 0
|
||||||
|
#define XT_RST_PORT PORTB
|
||||||
|
#define XT_RST_PIN PINB
|
||||||
|
#define XT_RST_DDR DDRB
|
||||||
|
#define XT_RST_BIT 7
|
||||||
|
|
||||||
|
/* hard reset: low pulse for 500ms and after that HiZ for safety */
|
||||||
|
#define XT_RESET() do { \
|
||||||
|
XT_RST_PORT &= ~(1<<XT_RST_BIT); \
|
||||||
|
XT_RST_DDR |= (1<<XT_RST_BIT); \
|
||||||
|
_delay_ms(500); \
|
||||||
|
XT_RST_DDR &= ~(1<<XT_RST_BIT); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/* INT1 for falling edge of clock line */
|
||||||
|
#define XT_INT_INIT() do { \
|
||||||
|
EICRA |= ((1<<ISC11) | \
|
||||||
|
(0<<ISC10)); \
|
||||||
|
} while (0)
|
||||||
|
/* clears flag and enables interrupt */
|
||||||
|
#define XT_INT_ON() do { \
|
||||||
|
EIFR |= (1<<INTF1); \
|
||||||
|
EIMSK |= (1<<INT1); \
|
||||||
|
} while (0)
|
||||||
|
#define XT_INT_OFF() do { \
|
||||||
|
EIMSK &= ~(1<<INT1); \
|
||||||
|
} while (0)
|
||||||
|
#define XT_INT_VECT INT1_vect
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#pragma once
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/* IBM XT keyboard layout
|
||||||
|
* ,-------. ,--------------------------------------------------------------------------.
|
||||||
|
* | F1| F2| |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS |NumLck |ScrLck |
|
||||||
|
* |-------| |--------------------------------------------------------------------------|
|
||||||
|
* | F3| F4| | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ] | | 7| 8| 9| -|
|
||||||
|
* |-------| |------------------------------------------------------|Ent|---------------|
|
||||||
|
* | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| |
|
||||||
|
* |-------| |----------------------------------------------------------------------| |
|
||||||
|
* | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +|
|
||||||
|
* |-------| |----------------------------------------------------------------------| |
|
||||||
|
* | F9|F10| | Alt | Space |CapsLck| 0 | . | |
|
||||||
|
* `-------' `--------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
LAYOUT_xt( \
|
||||||
|
KC_F1, KC_F2, 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_NLCK, KC_SLCK,
|
||||||
|
KC_F3, KC_F4, 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_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
|
KC_F5, KC_F6, 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_GRV, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||||
|
KC_F7, KC_F8, KC_LSFT,KC_BSLS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PSCR,KC_P1, KC_P2, KC_P3, KC_PPLS,
|
||||||
|
KC_F9, KC_F10, KC_LALT, KC_SPC, KC_CAPS, KC_P0, KC_PDOT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Extended keyboard layout
|
||||||
|
* ,-----------------------------------------------.
|
||||||
|
* |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|
|
||||||
|
* ,---. |-----------------------------------------------| ,-----------. ,-----------.
|
||||||
|
* |Esc| |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|
|
||||||
|
* `---' `-----------------------------------------------' `-----------' `-----------'
|
||||||
|
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||||
|
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -|
|
||||||
|
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +|
|
||||||
|
* |-----------------------------------------------------------| `-----------' |---------------|
|
||||||
|
* |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #|Entr| | 4| 5| 6|KP,|
|
||||||
|
* |-----------------------------------------------------------| ,---. |---------------|
|
||||||
|
* |Shft| <| Z| X| C| V| B| N| M| ,| .| /| RO|Shift | |Up | | 1| 2| 3|KP=|
|
||||||
|
* |-----------------------------------------------------------| ,-----------. |---------------|
|
||||||
|
* |Ctl|Gui|Alt|MHEN| Space |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|Ent|
|
||||||
|
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||||
|
*/
|
||||||
|
/* Try this if your keyboad has exotic keys.
|
||||||
|
LAYOUT(
|
||||||
|
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24,
|
||||||
|
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_VOLD,KC_VOLU,KC_MUTE,
|
||||||
|
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_JYEN,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS,KC_ENT, KC_P4, KC_P5, KC_P6, KC_PCMM,
|
||||||
|
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_RO, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
|
KC_LCTL,KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_HENK,KC_KANA,KC_RALT,KC_RGUI,KC_APP, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT,KC_PEQL
|
||||||
|
),
|
||||||
|
*/
|
||||||
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016 Ethan Apodaca <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "led.h"
|
||||||
|
|
||||||
|
void led_set(uint8_t usb_led) {
|
||||||
|
//XT Keyboards do not have LEDs, nothing to do.
|
||||||
|
}
|
||||||
@@ -0,0 +1,309 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011 Jun Wako <[email protected]>
|
||||||
|
Copyright 2016 Ethan Apodaca <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "action.h"
|
||||||
|
#include "print.h"
|
||||||
|
#include "util.h"
|
||||||
|
#include "debug.h"
|
||||||
|
#include "xt.h"
|
||||||
|
#include "matrix.h"
|
||||||
|
|
||||||
|
|
||||||
|
static void matrix_make(uint8_t code);
|
||||||
|
static void matrix_break(uint8_t code);
|
||||||
|
|
||||||
|
static uint8_t matrix[MATRIX_ROWS];
|
||||||
|
#define ROW(code) (code>>3)
|
||||||
|
#define COL(code) (code&0x07)
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
debug_enable = true;
|
||||||
|
xt_host_init();
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
}
|
||||||
|
|
||||||
|
// convert E0-escaped codes into unused area
|
||||||
|
static uint8_t move_e0code(uint8_t code) {
|
||||||
|
switch(code) {
|
||||||
|
// Original IBM XT keyboard has these keys
|
||||||
|
case 0x37: return 0x54; // Print Screen
|
||||||
|
case 0x46: return 0x55; // Ctrl + Pause
|
||||||
|
case 0x1C: return 0x6F; // Keypad Enter
|
||||||
|
case 0x35: return 0x7F; // Keypad /
|
||||||
|
|
||||||
|
// Any XT keyobard with these keys?
|
||||||
|
// http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf
|
||||||
|
// https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
|
||||||
|
case 0x5B: return 0x5A; // Left GUI
|
||||||
|
case 0x5C: return 0x5B; // Right GUI
|
||||||
|
case 0x5D: return 0x5C; // Application
|
||||||
|
case 0x5E: return 0x5D; // Power(not used)
|
||||||
|
case 0x5F: return 0x5E; // Sleep(not used)
|
||||||
|
case 0x63: return 0x5F; // Wake (not used)
|
||||||
|
case 0x48: return 0x60; // Up
|
||||||
|
case 0x4B: return 0x61; // Left
|
||||||
|
case 0x50: return 0x62; // Down
|
||||||
|
case 0x4D: return 0x63; // Right
|
||||||
|
case 0x52: return 0x71; // Insert
|
||||||
|
case 0x53: return 0x72; // Delete
|
||||||
|
case 0x47: return 0x74; // Home
|
||||||
|
case 0x4F: return 0x75; // End
|
||||||
|
case 0x49: return 0x77; // Home
|
||||||
|
case 0x51: return 0x78; // End
|
||||||
|
case 0x1D: return 0x7A; // Right Ctrl
|
||||||
|
case 0x38: return 0x7C; // Right Alt
|
||||||
|
}
|
||||||
|
return 0x00;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
static enum {
|
||||||
|
INIT,
|
||||||
|
E0,
|
||||||
|
// Pause: E1 1D 45, E1 9D C5
|
||||||
|
E1,
|
||||||
|
E1_1D,
|
||||||
|
E1_9D,
|
||||||
|
} state = INIT;
|
||||||
|
|
||||||
|
uint8_t code = xt_host_recv();
|
||||||
|
if (!code) return 0;
|
||||||
|
xprintf("%02X ", code);
|
||||||
|
switch (state) {
|
||||||
|
case INIT:
|
||||||
|
switch (code) {
|
||||||
|
case 0xE0:
|
||||||
|
state = E0;
|
||||||
|
break;
|
||||||
|
case 0xE1:
|
||||||
|
state = E1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (code < 0x80)
|
||||||
|
matrix_make(code);
|
||||||
|
else
|
||||||
|
matrix_break(code & 0x7F);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case E0:
|
||||||
|
switch (code) {
|
||||||
|
case 0x2A:
|
||||||
|
case 0xAA:
|
||||||
|
case 0x36:
|
||||||
|
case 0xB6:
|
||||||
|
//ignore fake shift
|
||||||
|
state = INIT;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (code < 0x80)
|
||||||
|
matrix_make(move_e0code(code));
|
||||||
|
else
|
||||||
|
matrix_break(move_e0code(code & 0x7F));
|
||||||
|
state = INIT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case E1:
|
||||||
|
switch (code) {
|
||||||
|
case 0x1D:
|
||||||
|
state = E1_1D;
|
||||||
|
break;
|
||||||
|
case 0x9D:
|
||||||
|
state = E1_9D;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state = INIT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case E1_1D:
|
||||||
|
switch (code) {
|
||||||
|
case 0x45:
|
||||||
|
matrix_make(0x55);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state = INIT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case E1_9D:
|
||||||
|
switch (code) {
|
||||||
|
case 0x45:
|
||||||
|
matrix_break(0x55);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state = INIT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
state = INIT;
|
||||||
|
}
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
static void matrix_make(uint8_t code)
|
||||||
|
{
|
||||||
|
if (!matrix_is_on(ROW(code), COL(code))) {
|
||||||
|
matrix[ROW(code)] |= 1<<COL(code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
static void matrix_break(uint8_t code)
|
||||||
|
{
|
||||||
|
if (matrix_is_on(ROW(code), COL(code))) {
|
||||||
|
matrix[ROW(code)] &= ~(1<<COL(code));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_clear(void)
|
||||||
|
{
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||||
|
{
|
||||||
|
return (matrix_get_row(row) & (1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
#if (MATRIX_COLS <= 8)
|
||||||
|
# define print_matrix_header() print("\nr/c 01234567\n")
|
||||||
|
# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
|
||||||
|
#elif (MATRIX_COLS <= 16)
|
||||||
|
# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
|
||||||
|
# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
|
||||||
|
#elif (MATRIX_COLS <= 32)
|
||||||
|
# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
|
||||||
|
# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
print_matrix_header();
|
||||||
|
|
||||||
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
|
phex(row); print(": ");
|
||||||
|
print_matrix_row(row);
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
XT Scancodes
|
||||||
|
============
|
||||||
|
- http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/translate.pdf
|
||||||
|
- https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
|
||||||
|
|
||||||
|
01-53: Normal codes used in original XT keyboard
|
||||||
|
54-7F: Not used in original XT keyboard
|
||||||
|
|
||||||
|
0 1 2 3 4 5 6 7 8 9 A B C D E F
|
||||||
|
50 - - - - * * x x x x * * * o o o
|
||||||
|
60 * * * * x x x x x x x x x x x *
|
||||||
|
70 x * * x * * x * * x * x * x x *
|
||||||
|
|
||||||
|
-: codes existed in original XT keyboard
|
||||||
|
*: E0-escaped codes converted into unused code area(internal use in TMK)
|
||||||
|
x: Non-espcaped codes(not used in real keyboards probably, for CodeSet2-CodeSet1 translation purpose)
|
||||||
|
o: reserved
|
||||||
|
|
||||||
|
Usage in TMK:
|
||||||
|
|
||||||
|
00 (reserved) DO NOT USE
|
||||||
|
54 PrintScr*
|
||||||
|
55 Pause*
|
||||||
|
56 Euro2
|
||||||
|
57 F11
|
||||||
|
58 F12
|
||||||
|
59 Keypad =
|
||||||
|
5A LGUI*
|
||||||
|
5B RGUI*
|
||||||
|
5C APP*
|
||||||
|
5D (reserved)
|
||||||
|
5E (reserved)
|
||||||
|
5F (reserved)
|
||||||
|
60 cursor*
|
||||||
|
61 cursor*
|
||||||
|
62 cursor*
|
||||||
|
63 cursor*
|
||||||
|
64 F13
|
||||||
|
65 F14
|
||||||
|
66 F15
|
||||||
|
67 F16
|
||||||
|
68 F17
|
||||||
|
69 F18
|
||||||
|
6A F19
|
||||||
|
6B F20
|
||||||
|
6C F21
|
||||||
|
6D F22
|
||||||
|
6E F23
|
||||||
|
6F Keypad Enter*
|
||||||
|
70 KANA
|
||||||
|
71 nav*
|
||||||
|
72 nav*
|
||||||
|
73 RO
|
||||||
|
74 nav*
|
||||||
|
75 nav*
|
||||||
|
76 F24
|
||||||
|
77 nav*
|
||||||
|
78 nav*
|
||||||
|
79 HENKAN
|
||||||
|
7A RCTL*
|
||||||
|
7B MUHENKAN
|
||||||
|
7C RALT*
|
||||||
|
7D JPY
|
||||||
|
7E Keypad ,
|
||||||
|
7F Keypad / *
|
||||||
|
|
||||||
|
*/
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
# Bootloader
|
||||||
|
# This indicates which bootloader is present on the board.
|
||||||
|
# BOOTLOADER = caterina # Pro Micro
|
||||||
|
BOOTLOADER = halfkay # Teensy
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# comment out to disable the options.
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
XT_ENABLE = yes
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
|
|
||||||
|
# Optimize size but this may cause error "relocation truncated to fit"
|
||||||
|
#EXTRALDFLAGS = -Wl,--relax
|
||||||
|
|
||||||
|
SRC = matrix.c led.c
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
#include "xt_usb.h"
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2011,2012,2013 Jun Wako <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
/* IBM XT keyboard layout
|
||||||
|
* ,-------. ,--------------------------------------------------------------------------.
|
||||||
|
* | F1| F2| |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS |NumLck |ScrLck |
|
||||||
|
* |-------| |--------------------------------------------------------------------------|
|
||||||
|
* | F3| F4| | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ] | | 7| 8| 9| -|
|
||||||
|
* |-------| |------------------------------------------------------|Ent|---------------|
|
||||||
|
* | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| |
|
||||||
|
* |-------| |----------------------------------------------------------------------| |
|
||||||
|
* | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +|
|
||||||
|
* |-------| |----------------------------------------------------------------------| |
|
||||||
|
* | F9|F10| | Alt | Space |CapsLck| 0 | . | |
|
||||||
|
* `-------' `--------------------------------------------------------------------------'
|
||||||
|
* Scan code set 1
|
||||||
|
* ,-------. ,--------------------------------------------------------------------------.
|
||||||
|
* | 3B| 3C| | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E | 45 | 46 |
|
||||||
|
* |-------| |--------------------------------------------------------------------------|
|
||||||
|
* | 3D| 3E| | 0F | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B | | 47| 48| 49| 4A|
|
||||||
|
* |-------| |------------------------------------------------------| 1C|---------------|
|
||||||
|
* | 3F| 40| | 1D | 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| | 4B| 4C| 4D| |
|
||||||
|
* |-------| |----------------------------------------------------------------------| |
|
||||||
|
* | 41| 42| | 2A | 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 36 |*37| 4F| 50| 51| 4E|
|
||||||
|
* |-------| |----------------------------------------------------------------------| |
|
||||||
|
* | 43| 44| | 38 | 39 | 3A | 52 | 53 | |
|
||||||
|
* `-------' `--------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
#define LAYOUT_xt( \
|
||||||
|
K3B,K3C, K01,K02,K03,K04,K05,K06,K07,K08,K09,K0A,K0B,K0C,K0D,K0E, K45, K46, \
|
||||||
|
K3D,K3E, K0F,K10,K11,K12,K13,K14,K15,K16,K17,K18,K19,K1A,K1B, K47,K48,K49,K4A, \
|
||||||
|
K3F,K40, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K1C,K4B,K4C,K4D, \
|
||||||
|
K41,K42, K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,K35,K36,K54,K4F,K50,K51,K4E, \
|
||||||
|
K43,K44, K38, K39, K3A, K52, K53 \
|
||||||
|
) { \
|
||||||
|
{ KC_NO, 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, K1D, 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, KC_NO }, \
|
||||||
|
{ K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47 }, \
|
||||||
|
{ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \
|
||||||
|
{ K50, K51, K52, K53, K54, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Extended keyboard layout
|
||||||
|
* ,-----------------------------------------------.
|
||||||
|
* |F13|F14|F15|F16|F17|F18|F19|F20|F21|F22|F23|F24|
|
||||||
|
* ,---. |-----------------------------------------------| ,-----------. ,-----------.
|
||||||
|
* |Esc| |F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|
|
||||||
|
* `---' `-----------------------------------------------' `-----------' `-----------'
|
||||||
|
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||||
|
* | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -|
|
||||||
|
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||||
|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +|
|
||||||
|
* |-----------------------------------------------------------| `-----------' |---------------|
|
||||||
|
* |CapsL | A| S| D| F| G| H| J| K| L| ;| '| #|Entr| | 4| 5| 6|KP,|
|
||||||
|
* |-----------------------------------------------------------| ,---. |---------------|
|
||||||
|
* |Shft| <| Z| X| C| V| B| N| M| ,| .| /| RO|Shift | |Up | | 1| 2| 3|Ent|
|
||||||
|
* |-----------------------------------------------------------| ,-----------. |---------------|
|
||||||
|
* |Ctl|Gui|Alt|MHEN| Space |HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0| .|KP=|
|
||||||
|
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||||
|
* ,-----------------------------------------------.
|
||||||
|
* | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 6E| 76|
|
||||||
|
* ,---. |-----------------------------------------------| ,-----------. ,-----------.
|
||||||
|
* | 01| | 3B| 3C| 3D| 3E| 3F| 40| 41| 42| 43| 44| 57| 58| |*37| 46|*45| |e5E|e5F|e63|
|
||||||
|
* `---' `-----------------------------------------------' `-----------' `-----------'
|
||||||
|
* ,-----------------------------------------------------------. ,-----------. ,---------------.
|
||||||
|
* | 29| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 7D| 0E| |e52|e47|e49| | 45|e35| 37| 4A|
|
||||||
|
* |-----------------------------------------------------------| |-----------| |---------------|
|
||||||
|
* | 0F | 10| 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 2B | |e53|e4F|e51| | 47| 48| 49| 4E|
|
||||||
|
* |-----------------------------------------------------------| `-----------' |---------------|
|
||||||
|
* | 3A | 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 00| 1C | | 4B| 4C| 4D| 7E|
|
||||||
|
* |-----------------------------------------------------------| ,---. |---------------|
|
||||||
|
* | 2A | 56| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 73| 36 | |e48| | 4F| 50| 51|e1C|
|
||||||
|
* |-----------------------------------------------------------| ,-----------. |---------------|
|
||||||
|
* | 1D|e5B| 38| 7B | 39 | 79 | 70 |e38|e5C|e5D|e1D| |e4B|e50|e4D| | 52| 53| 59|
|
||||||
|
* `-----------------------------------------------------------' `-----------' `---------------'
|
||||||
|
* e: E0-escaped codes
|
||||||
|
* *: special handling codes
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D,K6E,K76, \
|
||||||
|
K01, K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K57,K58, K54,K46,K55, K5D,K5E,K5F, \
|
||||||
|
K29,K02,K03,K04,K05,K06,K07,K08,K09,K0A,K0B,K0C,K0D,K7D,K0E, K71,K74,K77, K45,K7F,K37,K4A, \
|
||||||
|
K0F,K10,K11,K12,K13,K14,K15,K16,K17,K18,K19,K1A,K1B, K2B, K72,K75,K78, K47,K48,K49,K4E, \
|
||||||
|
K3A,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28, K00,K1C, K4B,K4C,K4D,K7E, \
|
||||||
|
K2A,K56,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,K35, K73,K36, K60, K4F,K50,K51,K6F, \
|
||||||
|
K1D,K5A,K38,K7B, K39, K79,K70,K7C,K5B,K5C,K7A, K61,K62,K63, K52,K53,K59 \
|
||||||
|
) { \
|
||||||
|
{ 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, K1D, 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, K3C, K3D, K3E, K3F }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47 }, \
|
||||||
|
{ K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \
|
||||||
|
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
|
||||||
|
{ K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \
|
||||||
|
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
|
||||||
|
{ K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \
|
||||||
|
{ K70, K71, K72, K73, K74, K75, K76, K77 }, \
|
||||||
|
{ K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ enum crkbd_keycodes {
|
|||||||
LAYOUT_wrapper( \
|
LAYOUT_wrapper( \
|
||||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||||
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \
|
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
LT(_LOWER,KC_GRV), KC_SPC, LALT_T(KC_BSPC), KC_DEL, KC_ENT, RAISE \
|
||||||
)
|
)
|
||||||
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
||||||
|
|
||||||
@@ -113,12 +113,47 @@ const char *read_logo(void);
|
|||||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
||||||
const char *read_keylog(void);
|
const char *read_keylog(void);
|
||||||
const char *read_keylogs(void);
|
const char *read_keylogs(void);
|
||||||
|
char layer_state_str[24];
|
||||||
// const char *read_mode_icon(bool swap);
|
// const char *read_mode_icon(bool swap);
|
||||||
// const char *read_host_led_state(void);
|
const char *read_host_led_state(void);
|
||||||
// void set_timelog(void);
|
// void set_timelog(void);
|
||||||
// const char *read_timelog(void);
|
// const char *read_timelog(void);
|
||||||
|
|
||||||
|
|
||||||
|
const char* read_layer_state(void) {
|
||||||
|
switch (layer_state) {
|
||||||
|
case _QWERTY:
|
||||||
|
switch (default_layer_state) {
|
||||||
|
case _QWERTY:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: QWERTY");
|
||||||
|
break;
|
||||||
|
case _COLEMAK:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Colemak");
|
||||||
|
break;
|
||||||
|
case _DVORAK:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak");
|
||||||
|
break;
|
||||||
|
case _WORKMAN:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Workman");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise");
|
||||||
|
break;
|
||||||
|
case _LOWER:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower");
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state);
|
||||||
|
}
|
||||||
|
|
||||||
|
return layer_state_str;
|
||||||
|
}
|
||||||
|
|
||||||
void matrix_scan_keymap(void) {
|
void matrix_scan_keymap(void) {
|
||||||
iota_gfx_task();
|
iota_gfx_task();
|
||||||
}
|
}
|
||||||
@@ -130,7 +165,7 @@ void matrix_render_user(struct CharacterMatrix *matrix) {
|
|||||||
matrix_write_ln(matrix, read_keylog());
|
matrix_write_ln(matrix, read_keylog());
|
||||||
matrix_write_ln(matrix, read_keylogs());
|
matrix_write_ln(matrix, read_keylogs());
|
||||||
//matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
//matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
||||||
//matrix_write_ln(matrix, read_host_led_state());
|
matrix_write_ln(matrix, read_host_led_state());
|
||||||
//matrix_write_ln(matrix, read_timelog());
|
//matrix_write_ln(matrix, read_timelog());
|
||||||
} else {
|
} else {
|
||||||
matrix_write(matrix, read_logo());
|
matrix_write(matrix, read_logo());
|
||||||
@@ -156,28 +191,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|||||||
set_keylog(keycode, record);
|
set_keylog(keycode, record);
|
||||||
// set_timelog();
|
// set_timelog();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (keycode) {
|
|
||||||
case RGB_MOD:
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
if (record->event.pressed) {
|
|
||||||
rgblight_mode_noeeprom(RGB_current_mode);
|
|
||||||
rgblight_step();
|
|
||||||
RGB_current_mode = rgblight_config.mode;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
case RGBRST:
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
if (record->event.pressed) {
|
|
||||||
eeconfig_update_rgblight_default();
|
|
||||||
rgblight_enable();
|
|
||||||
RGB_current_mode = rgblight_config.mode;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
@@ -23,9 +23,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
# If you want to change the display of OLED, you need to change here
|
# If you want to change the display of OLED, you need to change here
|
||||||
SRC += ./lib/glcdfont.c \
|
SRC += ./lib/glcdfont.c \
|
||||||
./lib/rgb_state_reader.c \
|
./lib/rgb_state_reader.c \
|
||||||
./lib/layer_state_reader.c \
|
|
||||||
./lib/logo_reader.c \
|
./lib/logo_reader.c \
|
||||||
./lib/keylogger.c \
|
./lib/keylogger.c \
|
||||||
|
./lib/host_led_state_reader.c \
|
||||||
|
# ./lib/layer_state_reader.c \
|
||||||
# ./lib/mode_icon_reader.c \
|
# ./lib/mode_icon_reader.c \
|
||||||
# ./lib/host_led_state_reader.c \
|
|
||||||
# ./lib/timelogger.c \
|
# ./lib/timelogger.c \
|
||||||
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
|||||||
@@ -57,10 +57,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_TIMER
|
|
||||||
#define RGBLED_NUM 12 // Number of LEDs
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SUBPROJECT_rev1 = no
|
SUBPROJECT_rev1 = no
|
||||||
USE_I2C = yes
|
USE_I2C = yes
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
|||||||
@@ -62,5 +62,5 @@ MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
AUDIO_ENABLE = no # Audio disabled while using RGB underlight.
|
AUDIO_ENABLE = no # Audio disabled while using RGB underlight.
|
||||||
EXTRAKEY_ENABLE = yes
|
EXTRAKEY_ENABLE = yes
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ F_USB = $(F_CPU)
|
|||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||||
# different sizes, comment this out, and the correct address will be loaded
|
# different sizes, comment this out, and the correct address will be loaded
|
||||||
# automatically (+60). See bootloader.mk for all options.
|
# automatically (+60). See bootloader.mk for all options.
|
||||||
BOOTLOADER = caterina
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SUBPROJECT_rev1 = yes
|
SUBPROJECT_rev1 = yes
|
||||||
USE_I2C = yes
|
USE_I2C = yes
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
@@ -71,4 +71,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
|
|
||||||
CUSTOM_MATRIX = yes
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
DEFAULT_FOLDER = deltasplit75/v2
|
DEFAULT_FOLDER = deltasplit75/v2
|
||||||
@@ -61,10 +61,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_TIMER
|
|
||||||
#define RGBLED_NUM 12 // Number of LEDs
|
#define RGBLED_NUM 12 // Number of LEDs
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
@@ -85,4 +83,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
//#define NO_ACTION_FUNCTION
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -50,9 +50,7 @@
|
|||||||
#define RGBLIGHT_VAL_STEP 8
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
#endif
|
#endif
|
||||||
#define RGB_DI_PIN D3
|
#define RGB_DI_PIN D3
|
||||||
#define RGBLIGHT_TIMER
|
|
||||||
#define RGBLED_NUM 10
|
#define RGBLED_NUM 10
|
||||||
#define ws2812_PORTREG PORTD
|
|
||||||
#define ws2812_DDRREG DDRD
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.vscode
|
||||||
@@ -31,7 +31,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 10
|
#define MATRIX_ROWS 10
|
||||||
#define MATRIX_COLS 8
|
#define MATRIX_COLS 8
|
||||||
// SERIAL is the only supported
|
// Only SERIAL is currently supported
|
||||||
|
// By converting this to use I2C, backlight
|
||||||
|
// would/should be fully functional as well
|
||||||
#define USE_SERIAL
|
#define USE_SERIAL
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -51,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
#define DIODE_DIRECTION ROW2COL
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
// #define BACKLIGHT_PIN B7
|
// #define BACKLIGHT_PIN C6
|
||||||
// #define BACKLIGHT_BREATHING
|
// #define BACKLIGHT_BREATHING
|
||||||
// #define BACKLIGHT_LEVELS 3
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
@@ -61,8 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
//#define MATRIX_HAS_GHOST
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
/* number of backlight levels */
|
|
||||||
|
|
||||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
#define LOCKING_SUPPORT_ENABLE
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
#define PERMISSIVE_HOLD
|
||||||
|
#define TAPPING_TERM 150
|
||||||
@@ -0,0 +1,212 @@
|
|||||||
|
/* Copyright 2017 IslandMan93
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// KEYMAP
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _WORKMAN_P 0
|
||||||
|
#define _GAME 1
|
||||||
|
#define _RAISE 2
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
|
||||||
|
#define SHIFT_MOD MOD_BIT(KC_LSFT)
|
||||||
|
#define SPACE_RAISE LT(_RAISE, KC_SPC)
|
||||||
|
#define ENT_RAISE LT(_RAISE, KC_ENT)
|
||||||
|
#define PAGE_PREV S(LCTL(KC_TAB))
|
||||||
|
#define PAGE_NEXT LCTL(KC_TAB)
|
||||||
|
|
||||||
|
enum custom_keycodes
|
||||||
|
{
|
||||||
|
LO_BSPC = SAFE_RANGE,
|
||||||
|
LO_1,
|
||||||
|
LO_2,
|
||||||
|
LO_3,
|
||||||
|
LO_4,
|
||||||
|
LO_5,
|
||||||
|
LO_6,
|
||||||
|
LO_7,
|
||||||
|
LO_8,
|
||||||
|
LO_9,
|
||||||
|
LO_0,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t* record)
|
||||||
|
{
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch (keycode) {
|
||||||
|
case LO_BSPC:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (get_mods() & SHIFT_MOD) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING(SS_TAP(X_DELETE));
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING(SS_TAP(X_BSPACE));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_1:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("1");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_2:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("2");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("@");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("3");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("#");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_4:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("4");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("$");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_5:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("5");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("%");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_6:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("6");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("^");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_7:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("7");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("&");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_8:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("8");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("*");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_9:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("9");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING("(");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case LO_0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t current_mods = get_mods();
|
||||||
|
if (current_mods & SHIFT_MOD) {
|
||||||
|
clear_mods();
|
||||||
|
SEND_STRING("0");
|
||||||
|
set_mods(current_mods);
|
||||||
|
} else {
|
||||||
|
SEND_STRING(")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
[_WORKMAN_P] = LAYOUT(
|
||||||
|
KC_ESC, LO_1, LO_2, LO_3, LO_4, LO_5, LO_6, LO_6, LO_7, LO_8, LO_9, LO_0, KC_MINS, KC_ESC,
|
||||||
|
KC_GRV, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LPRN, KC_RPRN, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_EQL,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_LCBR, KC_RCBR, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_BSLS,
|
||||||
|
KC_LCTL, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_LBRC, KC_RBRC, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
|
||||||
|
KC_LSFT, RESET, PAGE_PREV, PAGE_NEXT, KC_END, KC_LGUI, KC_LALT, TG(_GAME), LO_BSPC, ENT_RAISE, SPACE_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL),
|
||||||
|
|
||||||
|
[_GAME] = LAYOUT(
|
||||||
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_ESC,
|
||||||
|
KC_GRV, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LPRN, KC_RPRN, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_EQL,
|
||||||
|
KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_LCBR, KC_RCBR, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_BSLS,
|
||||||
|
KC_LCTL, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_LBRC, KC_RBRC, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
|
||||||
|
KC_LSFT, KC_F1, KC_F2, KC_3, KC_F5, KC_SPC, KC_LALT, TG(_GAME), LO_BSPC, ENT_RAISE, SPACE_RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, RESET,
|
||||||
|
_______, _______, _______, _______, _______, _______, BL_INC, KC_VOLU, _______, _______, _______, _______, _______, KC_F12,
|
||||||
|
_______, _______, _______, _______, _______, _______, BL_DEC, KC_VOLD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, BL_BRTG, KC_MUTE, _______, _______, KC_MPRV, KC_MNXT, KC_MPLY, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# The Workman keymap for diverge3
|
||||||
|
|
||||||
|
Basic example of the [Workman Programming Layout](https://github.com/ojbucao/workman) which uses the `SHIFT`ed variants of the number row, by default.
|
||||||
|
|
||||||
|
## Layer 1 - Default Layer
|
||||||
|
|
||||||
|
Workman programming layout.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Layer 2 - Gaming Layer
|
||||||
|
|
||||||
|
Reverts the number row to the normal 1, 2, 3, etc... for better gaming compatibility.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Layer 3 - Raise Layer
|
||||||
|
|
||||||
|
Volume and backlight controls (although backlight is not fully functional using `USE_SERIAL` in `../config.h`).
|
||||||
|
|
||||||
|

|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -10,7 +10,11 @@ Make example for this keyboard (after setting up your build environment):
|
|||||||
|
|
||||||
make diverge3:default
|
make diverge3:default
|
||||||
|
|
||||||
|
Or for the [Workman](https://github.com/ojbucao/workman) layout:
|
||||||
|
|
||||||
|
make diverge3:workman
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||||
|
|
||||||
# Reflashing Animus
|
# Reflashing Animus
|
||||||
Reflashing the stock firmware is pretty easy. Just follow the same steps in the [original guide](https://imgur.com/a/8UapN). You will have to manually reset the Pro Micro (by shorting the GND and RST) during the upload step. Then reapply your keymap through Arbites.
|
Reflashing the stock firmware is pretty easy. Just follow the same steps in the [original guide](https://imgur.com/a/8UapN). You will have to manually reset the Pro Micro (by shorting the GND and RST pins) during the upload step. Then reapply your keymap through Arbites.
|
||||||
Loaded 100 of 686 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user