Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bac7cf414 | ||
|
|
b7c76fda31 | ||
|
|
d5a76e899d | ||
|
|
dd05bf0d96 | ||
|
|
95e68c4ae8 | ||
|
|
d299d0e72d | ||
|
|
6fddb31c4c | ||
|
|
53b043d4ef | ||
|
|
7b51f050d7 | ||
|
|
7730dc3e5c | ||
|
|
0740e84d63 | ||
|
|
c917888262 | ||
|
|
0b54e7f5ae | ||
|
|
8cac6088c6 | ||
|
|
1548f4c24f | ||
|
|
b9f426ae1e | ||
|
|
52b0ad649c | ||
|
|
c9d0f210bc | ||
|
|
7aaef16266 |
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
* [Getting started](README.md)
|
* [Getting started](README.md)
|
||||||
* [QMK Introduction](getting_started_introduction.md)
|
* [QMK Introduction](getting_started_introduction.md)
|
||||||
* [Install Build Tools](getting_started_build_tools.md)
|
* [Install Build Tools](getting_started_build_tools.md)
|
||||||
* Alternative: [Vagrant Guide](getting_started_vagrant_guide.md)
|
* Alternative: [Vagrant Guide](getting_started_vagrant.md)
|
||||||
* [Build/Compile instructions](getting_started_make_guide.md)
|
* [Build/Compile instructions](getting_started_make_guide.md)
|
||||||
* [Flashing instructions](flashing.md)
|
* [Flashing instructions](flashing.md)
|
||||||
* [Contributing to QMK](contributing.md)
|
* [Contributing to QMK](contributing.md)
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
* [Backlight](feature_backlight.md)
|
* [Backlight](feature_backlight.md)
|
||||||
* [Bootmagic](feature_bootmagic.md)
|
* [Bootmagic](feature_bootmagic.md)
|
||||||
* [Dynamic Macros](feature_dynamic_macros.md)
|
* [Dynamic Macros](feature_dynamic_macros.md)
|
||||||
|
* [Grave Escape](feature_grave_escape.md)
|
||||||
* [Key Lock](feature_key_lock.md)
|
* [Key Lock](feature_key_lock.md)
|
||||||
* [Layouts](feature_layouts.md)
|
* [Layouts](feature_layouts.md)
|
||||||
* [Leader Key](feature_leader_key.md)
|
* [Leader Key](feature_leader_key.md)
|
||||||
@@ -70,7 +71,6 @@
|
|||||||
* For Makers and Modders
|
* For Makers and Modders
|
||||||
* [Hand Wiring Guide](hand_wire.md)
|
* [Hand Wiring Guide](hand_wire.md)
|
||||||
* [ISP flashing guide](isp_flashing_guide.md)
|
* [ISP flashing guide](isp_flashing_guide.md)
|
||||||
* [Modding your keyboard](modding_your_keyboard.md)
|
|
||||||
|
|
||||||
* For a Deeper Understanding
|
* For a Deeper Understanding
|
||||||
* [How Keyboards Work](how_keyboards_work.md)
|
* [How Keyboards Work](how_keyboards_work.md)
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ We also ask that you follow these guidelines:
|
|||||||
|
|
||||||
## Quantum/TMK Core
|
## Quantum/TMK Core
|
||||||
|
|
||||||
Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understaning QMK](understanding_qmk.html), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:
|
Before you put a lot of work into building your new feature you should make sure you are implementing it in the best way. You can get a basic understanding of QMK by reading [Understaning QMK](understanding_qmk.md), which will take you on a tour of the QMK program flow. From here you should talk to us to get a sense of the best way to implement your idea. There are two main ways to do this:
|
||||||
|
|
||||||
* [Chat on Gitter](https://gitter.im/qmk/qmk_firmware)
|
* [Chat on Gitter](https://gitter.im/qmk/qmk_firmware)
|
||||||
* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
* [Open an Issue](https://github.com/qmk/qmk_firmware/issues/new)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.
|
For a lot of people a custom keyboard is about more than sending button presses to your computer. You want to be able to do things that are more complex than simple button presses and macros. QMK has hooks that allow you to inject code, override functionality, and otherwise customize how your keyboard behaves in different situations.
|
||||||
|
|
||||||
This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.html) will help you understand what is going on at a more fundamental level.
|
This page does not assume any special knowledge about QMK, but reading [Understanding QMK](understanding_qmk.md) will help you understand what is going on at a more fundamental level.
|
||||||
|
|
||||||
## A Word on Core vs Keyboards vs Keymap
|
## A Word on Core vs Keyboards vs Keymap
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
# Frequently Asked Build Questions
|
# Frequently Asked Build Questions
|
||||||
|
|
||||||
This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](make_instructions.md) guides.
|
This page covers questions about building QMK. If you have not yet you should read the [Build Environment Setup](getting_started_build_tools.md) and [Make Instructions](getting_started_make_guide.md) guides.
|
||||||
|
|
||||||
## Can't program on Linux
|
## Can't program on Linux
|
||||||
You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.
|
You will need proper permission to operate a device. For Linux users see udev rules below. Easy way is to use `sudo` command, if you are not familiar with this command check its manual with `man sudo` or this page on line.
|
||||||
|
|||||||
+2
-4
@@ -125,11 +125,9 @@ https://github.com/tmk/tmk_keyboard/issues/213
|
|||||||
https://github.com/tekezo/Karabiner/issues/403
|
https://github.com/tekezo/Karabiner/issues/403
|
||||||
|
|
||||||
|
|
||||||
## Esc and `~ on a key
|
## Esc and `~ on a single key
|
||||||
|
|
||||||
Use `GRAVE_ESC` or `KC_GESC` in your keymap. `GUI`+`GRAVE_ESC` results in `` ` `` and `SHIFT`+`GRAVE_ESC` results in `~`.
|
See the [Grave Escape](feature_grave_escape.md) feature.
|
||||||
|
|
||||||
Note that this will break the CTRL+SHIFT+ESC shortcut to the Windows task manager. Use `#define GRAVE_ESC_CTRL_OVERRIDE` in your `config.h` to get the shortcut back. With this option, `ESC_GRAVE` results in `ESC` if `CTRL` is held, even if `SHIFT` or `GUI` are also held.
|
|
||||||
|
|
||||||
## Arrow on Right Modifier keys with Dual-Role
|
## Arrow on Right Modifier keys with Dual-Role
|
||||||
This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
This turns right modifer keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping i
|
|||||||
|
|
||||||
### Limits of these aliases
|
### Limits of these aliases
|
||||||
|
|
||||||
Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.html), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.html).
|
Currently, the keycodes able to used with these functions are limited to the [Basic Keycodes](keycodes_basic.md), meaning you can't use keycodes like `KC_TILD`, or anything greater than 0xFF. For a full list of the keycodes able to be used see [Basic Keycodes](keycodes_basic.md).
|
||||||
|
|
||||||
# Switching and toggling layers
|
# Switching and toggling layers
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
|
|||||||
|
|
||||||
# One Shot Keys
|
# One Shot Keys
|
||||||
|
|
||||||
One shot keys are keys that remain active until the next key is pressed, and then are releasd. This allows you to type keyboard combinations without pressing more than one key at a time.
|
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".
|
||||||
|
|
||||||
For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released.
|
For example, if you define a key as `OSM(MOD_LSFT)`, you can type a capital A character by first pressing and releasing shift, and then pressing and releasing A. Your computer will see the shift key being held the moment shift is pressed, and it will see the shift key being released immediately after A is released.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Grave Escape
|
||||||
|
|
||||||
|
Grave Escape is a feature that allows you to share the grave key (`\`` and `~`) on the same key as Escape. When `KC_GESC` is used it will act as `KC_ESC`, unless Shift or GUI is pressed, in which case it will act as `KC_GRAVE`.
|
||||||
|
|
||||||
|
|
||||||
|
| Key | Alias | Description |
|
||||||
|
|-----|-------|-------------|
|
||||||
|
| `GRAVE_ESC` | `KC_GESC` | Act as `KC_ESC` normally, or `KC_GRAVE` when GUI or Shift are held. |
|
||||||
|
|
||||||
|
There are several possible key combinations this will break, among them Ctrl+Shift+Esc on Windows and Cmd+Opt+Esc on macOS. You can use these options in your `config.h` to work around this:
|
||||||
|
|
||||||
|
| Option | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `GRAVE_ESC_ALT_OVERRIDE` | Always send Escape if Alt is pressed. |
|
||||||
|
| `GRAVE_ESC_CTRL_OVERRIDE` | Always send Escape if Ctrl is pressed. |
|
||||||
|
| `GRAVE_ESC_GUI_OVERRIDE` | Always send Escape if GUI is pressed. |
|
||||||
|
| `GRAVE_ESC_SHIFT_OVERRIDE` | Always send Escape if SHIFT is pressed. |
|
||||||
@@ -8,4 +8,4 @@ Here's how to use it:
|
|||||||
2. Enable key lock by including `KEY_LOCK_ENABLE = yes` in your Makefile.
|
2. Enable key lock by including `KEY_LOCK_ENABLE = yes` in your Makefile.
|
||||||
3. That's it!
|
3. That's it!
|
||||||
|
|
||||||
Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys and One Shot modifier keys (for example, if you have your shift defined as `OSM(KC_LSFT)`; see [One Shot Keys](quantum_keycodes.md#one-shot-keys)). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as KC_LPRN. If it's in the [basic_keycodes](basic_keycodes.md) list, it can be held. If it's not, then it can't be.
|
Important: switching layers does not cancel the key lock. Additionally, key lock is only able to hold standard action keys and One Shot modifier keys (for example, if you have your shift defined as `OSM(KC_LSFT)`; see [One Shot Keys](quantum_keycodes.md#one-shot-keys)). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as KC_LPRN. If it's in the [Basic Keycodes](keycodes_basic.md) list, it can be held. If it's not, then it can't be.
|
||||||
@@ -87,8 +87,8 @@ These control the RGB Lighting functionality.
|
|||||||
| Long Name | Short Name | Description |
|
| Long Name | Short Name | Description |
|
||||||
|-----------|------------|-------------|
|
|-----------|------------|-------------|
|
||||||
||`RGB_TOG`|toggle on/off|
|
||`RGB_TOG`|toggle on/off|
|
||||||
||`RGB_MOD`|cycle through modes|
|
|`RGB_MODE_FORWARD`|`RGB_MOD`|cycle through modes, use reverse direction when shift is held|
|
||||||
||`RGB_SMOD`|cycle through modes, use reverse direction when shift is hold|
|
|`RGB_MODE_REVERSE`|`RGB_RMOD`|cycle through modes in reverse (also suppost shift to go forward)|
|
||||||
||`RGB_HUI`|hue increase|
|
||`RGB_HUI`|hue increase|
|
||||||
||`RGB_HUD`|hue decrease|
|
||`RGB_HUD`|hue decrease|
|
||||||
||`RGB_SAI`|saturation increase|
|
||`RGB_SAI`|saturation increase|
|
||||||
@@ -104,6 +104,8 @@ These control the RGB Lighting functionality.
|
|||||||
|`RGB_MODE_XMAS`|`RGB_M_X`| Switch to the Christmas animation |
|
|`RGB_MODE_XMAS`|`RGB_M_X`| Switch to the Christmas animation |
|
||||||
|`RGB_MODE_GRADIENT`|`RGB_M_G`| Switch to the static gradient mode |
|
|`RGB_MODE_GRADIENT`|`RGB_M_G`| Switch to the static gradient mode |
|
||||||
|
|
||||||
|
note: for backwards compatibility, `RGB_SMOD` is an alias for `RGB_MOD`.
|
||||||
|
|
||||||
## Hardware Modification
|
## Hardware Modification
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
|||||||
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
|
* [Pointing Device](feature_pointing_device.md) - Framework for connecting your custom pointing device to your keyboard.
|
||||||
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard.
|
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a ps2 mouse directly to your keyboard.
|
||||||
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
|
||||||
* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
|
* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets.
|
||||||
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
|
||||||
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
|
||||||
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard.
|
* [Terminal](feature_terminal.md) - CLI interface to the internals of your keyboard.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ The full syntax of the `make` command is `<keyboard_folder>:<keymap>:<target>`,
|
|||||||
|
|
||||||
The `<target>` means the following
|
The `<target>` means the following
|
||||||
* If no target is given, then it's the same as `all` below
|
* If no target is given, then it's the same as `all` below
|
||||||
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default:all` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
|
* `all` compiles as many keyboard/revision/keymap combinations as specified. For example, `make planck/rev4:default` will generate a single .hex, while `make planck/rev4:all` will generate a hex for every keymap available to the planck.
|
||||||
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
* `dfu`, `teensy` or `dfu-util`, compile and upload the firmware to the keyboard. If the compilation fails, then nothing will be uploaded. The programmer to use depends on the keyboard. For most keyboards it's `dfu`, but for ChibiOS keyboards you should use `dfu-util`, and `teensy` for standard Teensys. To find out which command you should use for your keyboard, check the keyboard specific readme.
|
||||||
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
|
* **Note**: some operating systems need root access for these commands to work, so in that case you need to run for example `sudo make planck/rev4:default:dfu`.
|
||||||
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
|
* `clean`, cleans the build output folders to make sure that everything is built from scratch. Run this before normal compilation if you have some unexplainable problems.
|
||||||
|
|||||||
+6
-6
@@ -41,7 +41,7 @@ A macro which has been recorded on the keyboard and which will be lost when the
|
|||||||
## Eclipse
|
## Eclipse
|
||||||
An IDE that is popular with many C developers.
|
An IDE that is popular with many C developers.
|
||||||
|
|
||||||
* [Eclipse Setup Instructions](eclipse.html)
|
* [Eclipse Setup Instructions](eclipse.md)
|
||||||
|
|
||||||
## Firmware
|
## Firmware
|
||||||
The software that controls your MCU.
|
The software that controls your MCU.
|
||||||
@@ -62,7 +62,7 @@ In-system programming, a method of programming an AVR chip using external hardwa
|
|||||||
An interface for receiving debugging messages from your keyboard. You can view these messages using [QMK Flasher](https://github.com/qmk/qmk_flasher) or [PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html)
|
An interface for receiving debugging messages from your keyboard. You can view these messages using [QMK Flasher](https://github.com/qmk/qmk_flasher) or [PJRC's hid_listen](https://www.pjrc.com/teensy/hid_listen.html)
|
||||||
|
|
||||||
## Keycode
|
## Keycode
|
||||||
A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes_basic.html) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.html).
|
A 2-byte number that represents a particular key. `0x00`-`0xFF` are used for [Basic Keycodes](keycodes_basic.md) while `0x100`-`0xFFFF` are used for [Quantum Keycodes](quantum_keycodes.md).
|
||||||
|
|
||||||
## Key Down
|
## Key Down
|
||||||
An event that happens when a key is pressed down, but is completed before a key is released.
|
An event that happens when a key is pressed down, but is completed before a key is released.
|
||||||
@@ -79,7 +79,7 @@ An abstraction used to allow a key to serve multiple purposes. The highest activ
|
|||||||
## Leader Key
|
## Leader Key
|
||||||
A feature that allows you to tap the leader key followed by a sequence of 1, 2, or 3 keys to activate key presses or other quantum features.
|
A feature that allows you to tap the leader key followed by a sequence of 1, 2, or 3 keys to activate key presses or other quantum features.
|
||||||
|
|
||||||
* [Leader Key Documentation](feature_leader_key.html)
|
* [Leader Key Documentation](feature_leader_key.md)
|
||||||
|
|
||||||
## LED
|
## LED
|
||||||
Light Emitting Diode, the most common device used for indicators on a keyboard.
|
Light Emitting Diode, the most common device used for indicators on a keyboard.
|
||||||
@@ -104,13 +104,13 @@ A key that is held down while typing another key to modify the action of that ke
|
|||||||
## Mousekeys
|
## Mousekeys
|
||||||
A feature that lets you control your mouse cursor and click from your keyboard.
|
A feature that lets you control your mouse cursor and click from your keyboard.
|
||||||
|
|
||||||
* [Mousekeys Documentation](feature_mouse_keys.html)
|
* [Mousekeys Documentation](feature_mouse_keys.md)
|
||||||
|
|
||||||
## N-Key Rollover (NKRO)
|
## N-Key Rollover (NKRO)
|
||||||
A term that applies to keyboards that are capable of reporting any number of key-presses at once.
|
A term that applies to keyboards that are capable of reporting any number of key-presses at once.
|
||||||
|
|
||||||
## Oneshot Modifier
|
## Oneshot Modifier
|
||||||
A modifier that acts as if it is held down until another key is released, so you can press the mod and then press the key, rather than holding the mod while pressing the key.
|
A modifier that acts as if it is held down until another key is released, so you can press the mod and then press the key, rather than holding the mod while pressing the key. Also known as a Sticky key or a Dead key.
|
||||||
|
|
||||||
## ProMicro
|
## ProMicro
|
||||||
A low cost AVR development board. Clones of this device are often found on ebay very inexpensively (under $5) but people often struggle with flashing their pro micros.
|
A low cost AVR development board. Clones of this device are often found on ebay very inexpensively (under $5) but people often struggle with flashing their pro micros.
|
||||||
@@ -133,7 +133,7 @@ A 1 byte number that is sent as part of a HID report over USB that represents a
|
|||||||
## Space Cadet Shift
|
## Space Cadet Shift
|
||||||
A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times.
|
A special set of shift keys which allow you to type various types of braces by tapping the left or right shift one or more times.
|
||||||
|
|
||||||
* [Space Cadet Shift Documentation](feature_space_cadet.html)
|
* [Space Cadet Shift Documentation](feature_space_cadet.md)
|
||||||
|
|
||||||
## Tap
|
## Tap
|
||||||
Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once.
|
Pressing and releasing a key. In some situations you will need to distinguish between a key down and a key up event, and Tap always refers to both at once.
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ Key with `KC_TRANS` (`KC_TRNS` and `_______` are the alias) doesn't has its own
|
|||||||
|
|
||||||
## Anatomy Of A `keymap.c`
|
## Anatomy Of A `keymap.c`
|
||||||
|
|
||||||
For this example we will walk through the [default Clueboard 66% keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard_66/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context.
|
For this example we will walk through an [older version of the default Clueboard 66% keymap](https://github.com/qmk/qmk_firmware/blob/ca01d94005f67ec4fa9528353481faa622d949ae/keyboards/clueboard/keymaps/default/keymap.c). You'll find it helpful to open that file in another browser window so you can look at everything in context.
|
||||||
|
|
||||||
There are 3 main sections of a `keymap.c` file you'll want to concern yourself with:
|
There are 3 main sections of a `keymap.c` file you'll want to concern yourself with:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This document attempts to explain how the QMK firmware works from a very high level. It assumes you understand basic programming concepts but does not (except where needed to demonstrate) assume familiarity with C. It assumes that you have a basic understanding of the following documents:
|
This document attempts to explain how the QMK firmware works from a very high level. It assumes you understand basic programming concepts but does not (except where needed to demonstrate) assume familiarity with C. It assumes that you have a basic understanding of the following documents:
|
||||||
|
|
||||||
* [QMK Overview](qmk_overview.md)
|
* [Introduction](getting_started_introduction.md)
|
||||||
* [How Keyboards Work](how_keyboards_work.md)
|
* [How Keyboards Work](how_keyboards_work.md)
|
||||||
* [FAQ](faq.md)
|
* [FAQ](faq.md)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
// Personal keymap of khitsule
|
||||||
|
|
||||||
|
#include "atreus.h"
|
||||||
|
|
||||||
|
#define ALPH 0
|
||||||
|
#define LOWR 1
|
||||||
|
#define RAIS 2
|
||||||
|
|
||||||
|
// enum layers {
|
||||||
|
// ALPH, //alpha qwerty
|
||||||
|
// LOWR, //layer 1: nav and functions
|
||||||
|
// RAIS //layer 2: numpad and symbols
|
||||||
|
// };
|
||||||
|
|
||||||
|
// define any macros here to keep keymap clean and readable
|
||||||
|
|
||||||
|
#define KM_DLEFT LGUI(LCTL(KC_LEFT))
|
||||||
|
#define KM_DRIGHT LGUI(LCTL(KC_RIGHT))
|
||||||
|
|
||||||
|
#define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \
|
||||||
|
( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \
|
||||||
|
( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : MACRO(U(mod), END) ) )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[ALPH] = {
|
||||||
|
{KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P},
|
||||||
|
{KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN},
|
||||||
|
{KC_Z, KC_X, KC_C, KC_V, KC_B, CTL_T(KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH},
|
||||||
|
{KC_ESC, KC_TRNS, KC_TRNS, ALT_T(KC_ENT), LT(LOWR, KC_TAB), SFT_T(KC_BSPC), LT(RAIS, KC_DEL), KC_LGUI, KC_TRNS, KC_QUOT, KC_MINUS}
|
||||||
|
},
|
||||||
|
[LOWR] = {
|
||||||
|
{KC_PSCR, KC_HOME, KC_UP, KC_END, KC_TRNS, KC_TRNS, KC_LPRN, KC_F7, KC_F8, KC_F9, KC_RPRN},
|
||||||
|
{KC_VOLU, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGUP, KC_TRNS, KC_LBRC, KC_F4, KC_F5, KC_F6, KC_RBRC},
|
||||||
|
{KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGDN, KC_TRNS, LSFT(KC_LBRC), KC_F1, KC_F2, KC_F3, LSFT(KC_RBRC)},
|
||||||
|
{KM_DLEFT, KM_DRIGHT, LALT(KC_TAB), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
|
||||||
|
},
|
||||||
|
[RAIS] = {
|
||||||
|
{KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_TRNS},
|
||||||
|
{KC_CIRC, KC_AMPR, KC_GRV, KC_TILD, KC_PIPE, KC_TRNS, KC_PLUS, KC_4, KC_5, KC_6, KC_ASTR},
|
||||||
|
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_MINUS, KC_1, KC_2, KC_3, KC_SLASH},
|
||||||
|
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[1] = ACTION_MACRO_TAP(1),
|
||||||
|
[2] = ACTION_MACRO_TAP(2)
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
switch(id) {
|
||||||
|
case 1:
|
||||||
|
return tap_mod_macro(record, LGUI, MACRO( D(LSFT), T(9), U(LSFT), END));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
return tap_mod_macro(record, LALT, MACRO( D(LSFT), T(0), U(LSFT), END));
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Atreus Layout by Khitsule
|
||||||
|

|
||||||
|
|
||||||
|
[KLE link](http://www.keyboard-layout-editor.com/#/gists/35ed66c55456699fd8f5d06750984a07)
|
||||||
|
|
||||||
|
## Layers
|
||||||
|
| Layer | Legend |
|
||||||
|
| ----- | ------ |
|
||||||
|
| Base | Top left (black) |
|
||||||
|
| Lower | Top right (purple) |
|
||||||
|
| Raise | Bottom right (pink) |
|
||||||
|
|
||||||
|
## Features
|
||||||
|
* Raise/lower layers focus first on one-handed use
|
||||||
|
* Numpad on right hand with raise layer
|
||||||
|
* Navigation on left hand with lower layer (ESDF)
|
||||||
|
* D refers to desktop left/right on Win 10 (win+ctrl+left/right)
|
||||||
|
* Heavy use of hold/tap dual function keys
|
||||||
|
* Ctrl/Space
|
||||||
|
* Shift/Backspace
|
||||||
|
* Alt/Enter
|
||||||
|
* Lower/Tab
|
||||||
|
* Raise/Delete
|
||||||
Executable
+52
@@ -0,0 +1,52 @@
|
|||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6070
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER WoodKeys.click
|
||||||
|
#define PRODUCT CrawlPad
|
||||||
|
#define DESCRIPTION ATX Keycrawl 2017
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 4
|
||||||
|
#define MATRIX_COLS 4
|
||||||
|
|
||||||
|
/* key matrix pins */
|
||||||
|
#define MATRIX_ROW_PINS { F0, F1, F4, F5 }
|
||||||
|
#define MATRIX_COL_PINS { D4, D5, D6, D7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* Pins for custom per-row LEDs. Should be changed to use named pins. */
|
||||||
|
#define LED_ROW_PINS { 8, 9, 10, 11 }
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
false \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* prevent stuck modifiers */
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 3
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
Executable
+1
@@ -0,0 +1 @@
|
|||||||
|
#include "crawlpad.h"
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef KB_H
|
||||||
|
#define KB_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
K00, K01, K02, K03, \
|
||||||
|
K10, K11, K12, K13, \
|
||||||
|
K20, K21, K22, K23, \
|
||||||
|
K30, K31, K32, K33 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03 }, \
|
||||||
|
{ K10, K11, K12, K13 }, \
|
||||||
|
{ K20, K21, K22, K23 }, \
|
||||||
|
{ K30, K31, K32, K33 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"keyboard":{"keys":[{"id":0,"legend":"7\nHome\n\n\n\n\n\nNLCK","state":{"x":0,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n\n\n\n\n#0015d4","fa":[0,1,0,0,0,0,0,1]},"row":0,"col":0,"keycodes":[{"id":"KC_P7","fields":[]},{"id":"KC_NLCK","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"8\n↑\n\n\n\n\n\nBL1","state":{"x":1,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n\n\n\n\n#0015d4","fa":[0,0,0,0,0,0,0,1]},"row":0,"col":1,"keycodes":[{"id":"KC_P8","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":2,"legend":"9\nPgUp","state":{"x":2,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1]},"row":0,"col":2,"keycodes":[{"id":"KC_P9","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":3,"legend":"+\n\n\n\n\n\n\n/","state":{"x":3,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n#020ad1\n\n\n\n#0015d4","fa":[0,0,0,0,0,0,0,1],"f":3},"row":0,"col":3,"keycodes":[{"id":"KC_PPLS","fields":[]},{"id":"KC_PSLS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":4,"legend":"4\n←","state":{"x":0,"y":2,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":1,"col":0,"keycodes":[{"id":"KC_P4","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":5,"legend":"5\n\n\n\n\n\n\nBL2","state":{"x":1,"y":2,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n\n\n\n\n#0015d4","fa":[0,0,0,0,0,0,0,1],"f":3},"row":1,"col":1,"keycodes":[{"id":"KC_P5","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":6,"legend":"6\n→","state":{"x":2,"y":2,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":1,"col":2,"keycodes":[{"id":"KC_P6","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":7,"legend":"-","state":{"x":3,"y":2,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":1,"col":3,"keycodes":[{"id":"KC_PMNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNLine truncated
|
||||||
Executable
+117
@@ -0,0 +1,117 @@
|
|||||||
|
#include "../../crawlpad.h"
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
BL1 = SAFE_RANGE,
|
||||||
|
BL2,
|
||||||
|
BL3,
|
||||||
|
BL4
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint8_t LED_PINS[] = LED_ROW_PINS;
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
KEYMAP(
|
||||||
|
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||||
|
KC_P4, KC_P5, KC_P6, KC_PMNS,
|
||||||
|
KC_P1, KC_P2, KC_P3, KC_PAST,
|
||||||
|
MO(1), KC_P0, KC_PDOT, KC_ENT),
|
||||||
|
|
||||||
|
KEYMAP(
|
||||||
|
KC_NLCK, BL1, KC_TRNS, KC_PSLS,
|
||||||
|
RESET, BL2, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, BL3, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, BL4, KC_TRNS, KC_TRNS),
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void set_led(int idx, bool enable) {
|
||||||
|
uint8_t pin = LED_PINS[idx];
|
||||||
|
if (enable) {
|
||||||
|
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF);
|
||||||
|
} else {
|
||||||
|
/* PORTx &= ~n */
|
||||||
|
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||||
|
return MACRO_NONE ;
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
/* set LED row pins to output and low */
|
||||||
|
DDRB |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7);
|
||||||
|
PORTB &= ~(1 << 4) & ~(1 << 5) & ~(1 << 6) & ~(1 << 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case BL1:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
PORTB |= (1 << 4);
|
||||||
|
} else {
|
||||||
|
PORTB &= ~(1 << 4);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case BL2:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
PORTB |= (1 << 5);
|
||||||
|
} else {
|
||||||
|
PORTB &= ~(1 << 5);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case BL3:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
PORTB |= (1 << 6);
|
||||||
|
} else {
|
||||||
|
PORTB &= ~(1 << 6);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
case BL4:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
PORTB |= (1 << 7);
|
||||||
|
} else {
|
||||||
|
PORTB &= ~(1 << 7);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (usb_led & (1 << USB_LED_KANA)) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Crawlpad
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 4x4 macropad/numpad, exclusively availabe at Keycrawl events.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham)
|
||||||
|
Hardware Supported: Crawlpad
|
||||||
|
Hardware Availability: Exclusive to Keycrawl events, contact [awwwwwwyeaahhhhhh](https://www.reddit.com/user/awwwwwwyeaahhhhhh) for more details.
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make crawlpad: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.
|
||||||
|
|
||||||
|
For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com].
|
||||||
Executable
+56
@@ -0,0 +1,56 @@
|
|||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
|
||||||
|
# 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 ?= 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 ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE ?= no # [Crawlpad] Custom backlighting code is used, so this should not be enabled
|
||||||
|
AUDIO_ENABLE ?= no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below
|
||||||
|
RGBLIGHT_ENABLE ?= no # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port.
|
||||||
@@ -244,9 +244,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||||
KC_RESET, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
KC_RESET, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
||||||
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
KC_TRNS, KC_AMPR, KC_ASTR, KC_COLN, KC_SCOLON,
|
||||||
KC_TRNS, KC_TRNS,
|
RGB_SMOD, KC_RGB_T,
|
||||||
KC_TRNS,
|
RGB_HUI,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS,
|
RGB_M_R, RGB_M_SW, RGB_HUD,
|
||||||
|
|
||||||
KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
KC_QWERTY, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||||
KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
KC_DVORAK, KC_KP_PLUS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_ASTERISK, KC_F12,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "woodpad.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "drashna.h"
|
#include "drashna.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.
|
||||||
@@ -97,12 +97,6 @@ void matrix_init_keymap(void) {
|
|||||||
// set Numlock LED to output and low
|
// set Numlock LED to output and low
|
||||||
DDRF |= (1 << 7);
|
DDRF |= (1 << 7);
|
||||||
PORTF &= ~(1 << 7);
|
PORTF &= ~(1 << 7);
|
||||||
|
|
||||||
|
|
||||||
if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) {
|
|
||||||
register_code(KC_NUMLOCK);
|
|
||||||
unregister_code(KC_NUMLOCK);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_keymap(void) {
|
void matrix_scan_keymap(void) {
|
||||||
@@ -114,3 +108,9 @@ void matrix_scan_keymap(void) {
|
|||||||
// Run Diablo 3 macro checking code.
|
// Run Diablo 3 macro checking code.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void led_set_keymap(uint8_t usb_led) {
|
||||||
|
if (!(usb_led & (1<<USB_LED_NUM_LOCK))) {
|
||||||
|
register_code(KC_NUMLOCK);
|
||||||
|
unregister_code(KC_NUMLOCK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
#include "rev1.h"
|
#include "rev1.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_SONG(tone_startup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -29,11 +20,3 @@ void matrix_init_kb(void) {
|
|||||||
|
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
#include "rev2.h"
|
#include "rev2.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
@@ -14,11 +9,6 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_SONG(tone_startup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -30,10 +20,3 @@ void matrix_init_kb(void) {
|
|||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Baris Tosun
|
||||||
|
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x6060
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER RominRonin CandyKeys
|
||||||
|
#define PRODUCT Katana60
|
||||||
|
#define DESCRIPTION QMK keyboard firmware for Katana60
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { F5, F6, F4, F1, D0 }
|
||||||
|
#define MATRIX_COL_PINS { B7, B3, B2, B1, B0, C7, D1, D2, C6, B6, B5, B4, D4, D6, D7 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||||
|
#define DIODE_DIRECTION ROW2COL
|
||||||
|
|
||||||
|
// #define BACKLIGHT_PIN B7
|
||||||
|
// #define BACKLIGHT_BREATHING
|
||||||
|
// #define BACKLIGHT_LEVELS 3
|
||||||
|
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||||
|
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||||
|
*/
|
||||||
|
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
#define TAPPING_TERM 200
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
/*
|
||||||
|
* MIDI options
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Prevent use of disabled MIDI features in the keymap */
|
||||||
|
//#define MIDI_ENABLE_STRICT 1
|
||||||
|
|
||||||
|
/* enable basic MIDI features:
|
||||||
|
- MIDI notes can be sent when in Music mode is on
|
||||||
|
*/
|
||||||
|
//#define MIDI_BASIC
|
||||||
|
|
||||||
|
/* enable advanced MIDI features:
|
||||||
|
- MIDI notes can be added to the keymap
|
||||||
|
- Octave shift and transpose
|
||||||
|
- Virtual sustain, portamento, and modulation wheel
|
||||||
|
- etc.
|
||||||
|
*/
|
||||||
|
//#define MIDI_ADVANCED
|
||||||
|
|
||||||
|
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||||
|
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* Copyright 2017 Baris Tosun
|
||||||
|
*
|
||||||
|
* 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 "katana60.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
// put your looping keyboard code here
|
||||||
|
// runs every cycle (a lot)
|
||||||
|
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// put your per-action keyboard code here
|
||||||
|
// runs for every action, just before processing by the firmware
|
||||||
|
|
||||||
|
return process_record_user(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_kb(uint8_t usb_led) {
|
||||||
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
|
|
||||||
|
led_set_user(usb_led);
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
/* Copyright 2017 Baris Tosun
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
#ifndef KATANA60_H
|
||||||
|
#define KATANA60_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
// This a shortcut to help you visually see your layout.
|
||||||
|
// The following is an example using the Planck MIT layout
|
||||||
|
// The first section contains all of the arguments
|
||||||
|
// The second converts the arguments into a two-dimensional array
|
||||||
|
#define KEYMAP( \
|
||||||
|
k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k09, k0a, k0b, k0c, k0d \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ k00, k01, k02, k03, k04, k05, k06, KC_NO, KC_NO, k09, k0a, k0b, k0c, k0d, KC_NO }, \
|
||||||
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
||||||
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
||||||
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, KC_NO }, \
|
||||||
|
{ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e }, \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/* Copyright 2017 Baris Tosun
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/* Copyright 2017 Baris Tosun
|
||||||
|
*
|
||||||
|
* 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 "katana60.h"
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
// Windows based definitions.
|
||||||
|
#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer
|
||||||
|
#define K_PRVWD LCTL(KC_LEFT) // Previous word
|
||||||
|
#define K_NXTWD LCTL(KC_RIGHT) // Next word
|
||||||
|
#define K_LSTRT KC_HOME // Start of line
|
||||||
|
#define K_LEND KC_END // End of line
|
||||||
|
#define UNDO LCTL(KC_Z) // UNDO
|
||||||
|
#define CUT LCTL(KC_X) // CUT
|
||||||
|
#define COPY LCTL(KC_C) // COPY
|
||||||
|
#define PASTE LCTL(KC_V) // PASTE
|
||||||
|
|
||||||
|
|
||||||
|
#define BASE 0 // Default
|
||||||
|
#define NUMB 1 // Numbers
|
||||||
|
#define SYMB 2 // Symbols
|
||||||
|
#define CURS 3 // Text Editing
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[BASE] = KEYMAP( /* Base */
|
||||||
|
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||||
|
MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_HOME, KC_PGUP, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2)
|
||||||
|
),
|
||||||
|
[NUMB] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______,
|
||||||
|
_______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______,
|
||||||
|
_______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______
|
||||||
|
),
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
_______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
|
||||||
|
_______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[CURS] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______,
|
||||||
|
_______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______,
|
||||||
|
_______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC),
|
||||||
|
[1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# The colemak keymap for katana60
|
||||||
|
|
||||||
|
Same as the default layout, but with default Colemal layout.
|
||||||
|
|
||||||
|
# TODO: references to extend layer and symbol layers
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/* Copyright 2017 Baris Tosun
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/* Copyright 2017 Baris Tosun
|
||||||
|
*
|
||||||
|
* 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 "katana60.h"
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
// Windows based definitions.
|
||||||
|
#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer
|
||||||
|
#define K_PRVWD LCTL(KC_LEFT) // Previous word
|
||||||
|
#define K_NXTWD LCTL(KC_RIGHT) // Next word
|
||||||
|
#define K_LSTRT KC_HOME // Start of line
|
||||||
|
#define K_LEND KC_END // End of line
|
||||||
|
#define UNDO LCTL(KC_Z) // UNDO
|
||||||
|
#define CUT LCTL(KC_X) // CUT
|
||||||
|
#define COPY LCTL(KC_C) // COPY
|
||||||
|
#define PASTE LCTL(KC_V) // PASTE
|
||||||
|
|
||||||
|
|
||||||
|
#define BASE 0 // Default
|
||||||
|
#define NUMB 1 // Numbers
|
||||||
|
#define SYMB 2 // Symbols
|
||||||
|
#define CURS 3 // Text Editing
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[BASE] = KEYMAP( /* Base */
|
||||||
|
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_DEL, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2)
|
||||||
|
),
|
||||||
|
[NUMB] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______,
|
||||||
|
_______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______,
|
||||||
|
_______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______
|
||||||
|
),
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
_______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
|
||||||
|
_______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[CURS] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______,
|
||||||
|
_______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______,
|
||||||
|
_______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC),
|
||||||
|
[1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# The default keymap for katana60
|
||||||
|
|
||||||
|
This layout takes my own personal layout (in development at the Colemak forum) and remaps the keys and shortcuts for Windows (I'm a MacOS user).
|
||||||
|
The testing was comducted on my Windows gaming PC, though it was not exhaustive, all the many layers and useful navigation shortcuts worked fine.
|
||||||
|
|
||||||
|
# TODO: references to extend layer and symbol layers
|
||||||
|
# TODO: more information
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/* Copyright 2017 Baris Tosun
|
||||||
|
*
|
||||||
|
* 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "../../config.h"
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/* Copyright 2017 Baris Tosun
|
||||||
|
*
|
||||||
|
* 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 "katana60.h"
|
||||||
|
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
// MacOS based definitions.
|
||||||
|
#define K_SPCFN LT(SYMB, KC_SPACE) // Tap for space, hold for symbols layer
|
||||||
|
#define K_PRVWD LALT(KC_LEFT) // Previous word
|
||||||
|
#define K_NXTWD LALT(KC_RIGHT) // Next word
|
||||||
|
#define K_LSTRT LGUI(KC_LEFT) // Start of line
|
||||||
|
#define K_LEND LGUI(KC_RIGHT) // End of line
|
||||||
|
#define UNDO LGUI(KC_Z) // UNDO
|
||||||
|
#define CUT LGUI(KC_X) // CUT
|
||||||
|
#define COPY LGUI(KC_C) // COPY
|
||||||
|
#define PASTE LGUI(KC_V) // PASTE
|
||||||
|
|
||||||
|
|
||||||
|
#define BASE 0 // Default
|
||||||
|
#define NUMB 1 // Numbers
|
||||||
|
#define SYMB 2 // Symbols
|
||||||
|
#define CURS 3 // Text Editing
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[BASE] = KEYMAP( /* Base */
|
||||||
|
KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, DF(1), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_PLUS,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, KC_BSPC,
|
||||||
|
MO(3), KC_A, KC_R, KC_S, KC_T, KC_G, KC_HOME, KC_PGUP, KC_M, KC_N, KC_E, KC_I, KC_O, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_END, KC_DEL, KC_PGDN, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
|
MO(2), KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, KC_ENT, K_SPCFN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,MO(2)
|
||||||
|
),
|
||||||
|
[NUMB] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, DF(0), KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, KC_MS_U, _______, _______, _______, KC_7, KC_8, KC_9, KC_PPLS, _______, _______, _______,
|
||||||
|
_______, KC_BTN2, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, _______, _______,
|
||||||
|
_______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, KC_1, KC_2, KC_3, KC_PENT, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_BTN1, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______
|
||||||
|
),
|
||||||
|
[SYMB] = KEYMAP(
|
||||||
|
RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
|
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_VOLD, KC_VOLU, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||||
|
_______, KC_PLUS, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_MPRV, KC_MPLY, KC_MNXT, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______,
|
||||||
|
_______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[CURS] = KEYMAP(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, K_PRVWD, KC_UP, K_NXTWD, _______, _______,
|
||||||
|
_______, KC_LCTL, KC_WH_D, KC_LSFT, _______, _______, _______, _______, KC_BSPC, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, _______,
|
||||||
|
_______, UNDO, CUT, COPY, PASTE, _______, _______, _______, _______, _______, K_LSTRT, _______, K_LEND, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM fn_actions[] = {
|
||||||
|
[0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC),
|
||||||
|
[1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE),
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# RominRonin's keymap for katana60
|
||||||
|
|
||||||
|
My own personal daily layout. OS keys are oriented for MacOS and the keys are in COLEMAK Mod-DH layout.
|
||||||
|
|
||||||
|
# TODO: references to extend layer and symbol layers
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Katana60
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
A 60% keyboard with a symmetrical staggered layout, sold by CandyKeys.com.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [Baris Tosun](https://github.com/rominronin)
|
||||||
|
Hardware Supported: Katana60 PCB v1, Teensy 2.0
|
||||||
|
Hardware Availability: [CandyKeys.com](https://CandyKeys.com)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make katana60: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.
|
||||||
|
|
||||||
|
There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/)
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# MCU name
|
||||||
|
#MCU = at90usb1286
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Processor frequency.
|
||||||
|
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||||
|
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||||
|
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||||
|
# automatically to create a 32-bit value in your source code.
|
||||||
|
#
|
||||||
|
# This will be an integer division of F_USB below, as it is sourced by
|
||||||
|
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||||
|
# does not *change* the processor frequency - it should merely be updated to
|
||||||
|
# reflect the processor speed set externally so that the code can use accurate
|
||||||
|
# software delays.
|
||||||
|
F_CPU = 16000000
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# LUFA specific
|
||||||
|
#
|
||||||
|
# Target architecture (see library "Board Types" documentation).
|
||||||
|
ARCH = AVR8
|
||||||
|
|
||||||
|
# Input clock frequency.
|
||||||
|
# This will define a symbol, F_USB, in all source code files equal to the
|
||||||
|
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||||
|
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||||
|
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||||
|
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||||
|
# at the end, this will be done automatically to create a 32-bit value in your
|
||||||
|
# source code.
|
||||||
|
#
|
||||||
|
# If no clock division is performed on the input clock inside the AVR (via the
|
||||||
|
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task(+60)
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||||
|
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
||||||
@@ -1,17 +1,7 @@
|
|||||||
#include "lets_split.h"
|
#include "lets_split.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_SONG(tone_startup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -23,10 +13,3 @@ void matrix_init_kb(void) {
|
|||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
#include "lets_split.h"
|
#include "lets_split.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_SONG(tone_startup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -30,10 +21,3 @@ void matrix_init_kb(void) {
|
|||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
#include "lets_split.h"
|
#include "lets_split.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_SONG(tone_startup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -29,11 +20,3 @@ void matrix_init_kb(void) {
|
|||||||
|
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
#include "levinson.h"
|
#include "levinson.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_SONG(tone_startup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -30,10 +21,3 @@ void matrix_init_kb(void) {
|
|||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,5 @@
|
|||||||
#include "levinson.h"
|
#include "levinson.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||||
@@ -14,11 +9,6 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_SONG(tone_startup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -30,10 +20,3 @@ void matrix_init_kb(void) {
|
|||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
MF68
|
||||||
|
====
|
||||||
|
|
||||||
|
Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib).
|
||||||
|
|
||||||
|
Keyboard Maintainer: [di0ib](http://www.40percent.club)
|
||||||
|
Hardware Supported: [Feather 32u4 Bluefruit](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/)
|
||||||
|
Please note: This is 32u4 and not M0
|
||||||
|
Hardware Availability: [PCB files](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68/pcb)
|
||||||
|
[MF68 thicc case files](https://github.com/harshitgoel96/mf68-case-thicc)
|
||||||
|
Story
|
||||||
|
-----
|
||||||
|
|
||||||
|
The story and the idea behind this mod is available on [my reddit post](https://www.reddit.com/r/MechanicalKeyboards/comments/7eiiht/guide_i_built_a_bluetooth_enabled_magicforce68_no/)
|
||||||
|
|
||||||
|
Wiring
|
||||||
|
------
|
||||||
|
|
||||||
|
Below is how you wire the Feather to PCB
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make mf68_ble: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.
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
/*
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CONFIG_H
|
||||||
|
#define CONFIG_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xCEEB
|
||||||
|
#define PRODUCT_ID 0x0510
|
||||||
|
#define DEVICE_VER 0x0101
|
||||||
|
#define MANUFACTURER di0ib
|
||||||
|
#define PRODUCT MF68
|
||||||
|
#define DESCRIPTION Magicforce 68 BLE
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 8
|
||||||
|
#define MATRIX_COLS 9
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 }
|
||||||
|
#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 }
|
||||||
|
#define UNUSED_PINS {B5}
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
/*
|
||||||
|
#define BACKLIGHT_PIN B5
|
||||||
|
#define BACKLIGHT_BREATHING
|
||||||
|
#define BACKLIGHT_LEVELS 3
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|
||||||
|
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* number of backlight levels */
|
||||||
|
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Force NKRO
|
||||||
|
*
|
||||||
|
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||||
|
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||||
|
* makefile for this to work.)
|
||||||
|
*
|
||||||
|
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||||
|
* until the next keyboard reset.
|
||||||
|
*
|
||||||
|
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||||
|
* fully operational during normal computer usage.
|
||||||
|
*
|
||||||
|
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||||
|
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||||
|
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||||
|
* power-up.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
//#define FORCE_NKRO
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Magic Key Options
|
||||||
|
*
|
||||||
|
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||||
|
* the keyboard. They are best used in combination with the HID Listen program,
|
||||||
|
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||||
|
*
|
||||||
|
* The options below allow the magic key functionality to be changed. This is
|
||||||
|
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* key combination for magic key command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
/* control how magic key switches layers */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||||
|
|
||||||
|
/* override magic key keymap */
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||||
|
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||||
|
//#define MAGIC_KEY_HELP1 H
|
||||||
|
//#define MAGIC_KEY_HELP2 SLASH
|
||||||
|
//#define MAGIC_KEY_DEBUG D
|
||||||
|
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||||
|
//#define MAGIC_KEY_DEBUG_KBD K
|
||||||
|
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||||
|
//#define MAGIC_KEY_VERSION V
|
||||||
|
//#define MAGIC_KEY_STATUS S
|
||||||
|
//#define MAGIC_KEY_CONSOLE C
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||||
|
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||||
|
//#define MAGIC_KEY_LAYER0 0
|
||||||
|
//#define MAGIC_KEY_LAYER1 1
|
||||||
|
//#define MAGIC_KEY_LAYER2 2
|
||||||
|
//#define MAGIC_KEY_LAYER3 3
|
||||||
|
//#define MAGIC_KEY_LAYER4 4
|
||||||
|
//#define MAGIC_KEY_LAYER5 5
|
||||||
|
//#define MAGIC_KEY_LAYER6 6
|
||||||
|
//#define MAGIC_KEY_LAYER7 7
|
||||||
|
//#define MAGIC_KEY_LAYER8 8
|
||||||
|
//#define MAGIC_KEY_LAYER9 9
|
||||||
|
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||||
|
//#define MAGIC_KEY_LOCK CAPS
|
||||||
|
//#define MAGIC_KEY_EEPROM E
|
||||||
|
//#define MAGIC_KEY_NKRO N
|
||||||
|
//#define MAGIC_KEY_SLEEP_LED Z
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Feature disable options
|
||||||
|
* These options are also useful to firmware size reduction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* disable debug print */
|
||||||
|
//#define NO_DEBUG
|
||||||
|
|
||||||
|
/* disable print */
|
||||||
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
/* disable action features */
|
||||||
|
//#define NO_ACTION_LAYER
|
||||||
|
//#define NO_ACTION_TAPPING
|
||||||
|
//#define NO_ACTION_ONESHOT
|
||||||
|
//#define NO_ACTION_MACRO
|
||||||
|
//#define NO_ACTION_FUNCTION
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#include "mf68.h"
|
||||||
|
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _FN1 1
|
||||||
|
#define _FN2 2
|
||||||
|
#define KC_ KC_TRNS
|
||||||
|
#define KC_X0 LT(_FN2, KC_GRV)
|
||||||
|
#define KC_X1 MO(_FN1)
|
||||||
|
#define KC_X2 BL_STEP
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = KC_KEYMAP(
|
||||||
|
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||||
|
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP,
|
||||||
|
/*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */
|
||||||
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN,
|
||||||
|
/*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */
|
||||||
|
X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
|
||||||
|
/*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */
|
||||||
|
LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP ,
|
||||||
|
/*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */
|
||||||
|
LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT
|
||||||
|
/*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN1] = KC_KEYMAP(
|
||||||
|
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||||
|
GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
|
||||||
|
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
|
||||||
|
, , , UP , , , , , , , , , X2 , , VOLD,END,
|
||||||
|
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
|
||||||
|
, ,LEFT,DOWN,RGHT, , , , , , , , ,
|
||||||
|
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
|
||||||
|
, , , , , , ,MUTE, , , , , MUTE,
|
||||||
|
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
|
||||||
|
, , , , , , , MPRV,MPLY,MNXT
|
||||||
|
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN2] = KC_KEYMAP(
|
||||||
|
/*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
|
||||||
|
GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
|
||||||
|
/*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
|
||||||
|
, , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END,
|
||||||
|
/*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
|
||||||
|
, ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , ,
|
||||||
|
/*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
|
||||||
|
, , , , , , 0 , 1 , 2 , 3 , , , MUTE,
|
||||||
|
/*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
|
||||||
|
, , , , , , , MPRV,MPLY,MNXT
|
||||||
|
/*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||||
|
{
|
||||||
|
// MACRODOWN only works in this function
|
||||||
|
switch(id) {
|
||||||
|
case 0:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return MACRO_NONE;
|
||||||
|
};
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#include "mf68.h"
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
// put your keyboard start-up code here
|
||||||
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
#ifndef MF68_H
|
||||||
|
#define MF68_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define KEYMAP( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \
|
||||||
|
K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \
|
||||||
|
K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
||||||
|
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
|
||||||
|
K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
|
||||||
|
) { \
|
||||||
|
{ K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
|
||||||
|
{ K10, K11, K12, K13, K14, K15, K16, K17, K18 }, \
|
||||||
|
{ K20, K21, K22, K23, K24, K25, K26, K27, K28 }, \
|
||||||
|
{ K30, K31, K32, K33, K34, K35, K36, K37, K38 }, \
|
||||||
|
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
||||||
|
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
||||||
|
{ K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
|
||||||
|
{ K70, K71, K72, K73, K74 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KC_KEYMAP( \
|
||||||
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K10, K11, K12, K13, K14, K15, K16, \
|
||||||
|
K17, K18, K20, K21, K22, K23, K24, K25, K26, K27, K28, K30, K31, K32, K33, K34, \
|
||||||
|
K35, K36, K37, K38, K40, K41, K42, K43, K44, K45, K46, K47, K48, \
|
||||||
|
K50, K51, K52, K53, K54, K55, K56, K57, K58, K60, K61, K62, K63, \
|
||||||
|
K64, K65, K66, K67, K68, K70, K71, K72, K73, K74 \
|
||||||
|
) KEYMAP( \
|
||||||
|
KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \
|
||||||
|
KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \
|
||||||
|
KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \
|
||||||
|
KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \
|
||||||
|
KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \
|
||||||
|
KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \
|
||||||
|
KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \
|
||||||
|
KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \
|
||||||
|
)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
|
||||||
|
# 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 = 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
|
||||||
|
|
||||||
|
|
||||||
|
# Boot Section Size in *bytes*
|
||||||
|
# Teensy halfKay 512
|
||||||
|
# Teensy++ halfKay 1024
|
||||||
|
# Atmel DFU loader 4096
|
||||||
|
# LUFA bootloader 4096
|
||||||
|
# USBaspLoader 2048
|
||||||
|
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default
|
||||||
|
MIDI_ENABLE ?= no # MIDI controls
|
||||||
|
UNICODE_ENABLE ?= no # Unicode
|
||||||
|
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||||
|
BLUETOOTH = AdafruitBLE
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
|
|
||||||
|
#define IGNORE_MOD_TAP_INTERRUPT
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
#include "minidox.h"
|
||||||
|
#include "action_layer.h"
|
||||||
|
#include "eeconfig.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
|
// entirely and just use numbers.
|
||||||
|
#define _QWERTY 0
|
||||||
|
#define _LOWER 1
|
||||||
|
#define _RAISE 2
|
||||||
|
#define _ADJUST 16
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
QWERTY = SAFE_RANGE,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Fillers to make layering more clear
|
||||||
|
#define _______ KC_TRNS
|
||||||
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
// Defines for task manager and such
|
||||||
|
#define CALTDEL LCTL(LALT(KC_DEL))
|
||||||
|
#define TSKMGR LCTL(LSFT(KC_ESC))
|
||||||
|
#define DSK_LFT LGUI(LCTL(KC_LEFT))
|
||||||
|
#define DSK_RT LGUI(LCTL(KC_RIGHT))
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
|
||||||
|
[_QWERTY] = KEYMAP( \
|
||||||
|
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
|
||||||
|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \
|
||||||
|
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \
|
||||||
|
ALT_T(KC_ENT), LT(_LOWER, KC_TAB), CTL_T(KC_SPC), SFT_T(KC_BSPC), LT(_RAISE, KC_DEL), KC_LGUI \
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = KEYMAP( \
|
||||||
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_7, KC_8, KC_9, KC_0, \
|
||||||
|
KC_CIRC, KC_AMPR, KC_TILD, KC_PIPE, KC_BSLS, KC_MINUS, KC_4, KC_5, KC_6, KC_EQL, \
|
||||||
|
KC_DQT, KC_QUOT, KC_UNDS, KC_GRV, _______, KC_ASTR, KC_1, KC_2, KC_3, _______, \
|
||||||
|
_______, MO(_ADJUST), _______, _______, _______, _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
[_LOWER] = KEYMAP( \
|
||||||
|
KC_ESC, KC_HOME, KC_UP, KC_END, _______, KC_LPRN, KC_RPRN, _______, _______, _______,
|
||||||
|
KC_VOLU, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGUP, KC_LBRC, KC_RBRC, _______, _______, _______, \
|
||||||
|
KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGDN, KC_LCBR, KC_RCBR, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, MO(_ADJUST), _______ \
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
[_ADJUST] = KEYMAP( \
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \
|
||||||
|
_______, DSK_LFT, _______, DSK_RT, _______, TSKMGR, CALTDEL, _______, KC_F11, KC_F12, \
|
||||||
|
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______ \
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
void persistant_default_layer_set(uint16_t default_layer) {
|
||||||
|
eeconfig_update_default_layer(default_layer);
|
||||||
|
default_layer_set(default_layer);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# Minidox Layout by Khitsule
|
||||||
|

|
||||||
|
|
||||||
|
[KLE link](http://www.keyboard-layout-editor.com/#/gists/203ed1a6db1997863394e87af8c43bbc)
|
||||||
|
|
||||||
|
## Layers
|
||||||
|
| Layer | Legend |
|
||||||
|
| ----- | ------ |
|
||||||
|
| Base | Top left (black) |
|
||||||
|
| Lower | Top right (red) |
|
||||||
|
| Raise | Bottom right (orange) |
|
||||||
|
| Adjust | Front print |
|
||||||
|
|
||||||
|
## Features
|
||||||
|
* Raise/lower layers focus first on one-handed use
|
||||||
|
* Numpad on right hand with raise layer
|
||||||
|
* Navigation on left hand with lower layer (ESDF)
|
||||||
|
* D refers to desktop left/right on Win 10 (win+ctrl+left/right)
|
||||||
|
* Heavy use of hold/tap dual function keys
|
||||||
|
* Ctrl/Space
|
||||||
|
* Shift/Backspace
|
||||||
|
* Alt/Enter
|
||||||
|
* Lower/Tab
|
||||||
|
* Raise/Delete
|
||||||
@@ -63,6 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#define C6_AUDIO
|
#define C6_AUDIO
|
||||||
|
#define STARTUP_SONG SONG(ZELDA_PUZZLE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "orthodox.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "drashna.h"
|
#include "drashna.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -32,6 +32,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
#define XXXXXXX KC_NO
|
#define XXXXXXX KC_NO
|
||||||
|
|
||||||
|
#ifdef FAUXCLICKY_ENABLE
|
||||||
|
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25);
|
||||||
|
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125);
|
||||||
|
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 2); // (_C4, 0.25);
|
||||||
|
#define AUD_ON FC_ON
|
||||||
|
#define AUD_OFF FC_OFF
|
||||||
|
#else
|
||||||
|
#define AUD_ON AU_ON
|
||||||
|
#define AUD_OFF AU_OFF
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
@@ -48,20 +60,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
|
|
||||||
[_DVORAK] = KEYMAP(\
|
[_DVORAK] = KEYMAP(\
|
||||||
KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||||
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||||
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
||||||
),
|
),
|
||||||
[_WORKMAN] = KEYMAP(\
|
[_WORKMAN] = KEYMAP(\
|
||||||
KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
|
||||||
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_UP, XXXXXXX, KC_DOWN, KC_LEFT, XXXXXXX, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \
|
||||||
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
KC_LSFT, CTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, LOWER, KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, RAISE, KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_LGUI \
|
||||||
),
|
),
|
||||||
|
|
||||||
[_LOWER] = KEYMAP(\
|
[_LOWER] = KEYMAP(\
|
||||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, XXXXXXX, KC_F12, _______, XXXXXXX, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, XXXXXXX, KC_F12, _______, XXXXXXX, KC_RCTL, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \
|
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \
|
||||||
),
|
),
|
||||||
|
|
||||||
[_RAISE] = KEYMAP(\
|
[_RAISE] = KEYMAP(\
|
||||||
@@ -72,15 +84,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_ADJUST] = KEYMAP(\
|
[_ADJUST] = KEYMAP(\
|
||||||
KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
KC_MAKE,KC_RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
RGB_SMOD,RGB_HUI, _______, AU_ON, AU_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
|
RGB_SMOD,RGB_HUI, _______, AUD_ON, AUD_OFF, AG_NORM, _______, XXXXXXX, _______, _______, XXXXXXX, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, \
|
||||||
KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
|
KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MAGIC_TOGGLE_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef FAUXCLICKY_ENABLE
|
|
||||||
float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_A6, 2); // (_D4, 0.25);
|
|
||||||
float fauxclicky_released_note[2] = MUSICAL_NOTE(_A6, 2); // (_C4, 0.125);
|
|
||||||
float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C6, 2); // (_C4, 0.25);
|
|
||||||
#endif
|
|
||||||
@@ -21,33 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "orthodox.h"
|
#include "orthodox.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
//// // green led on
|
||||||
_delay_ms(20); // gets rid of tick
|
//// DDRD |= (1<<5);
|
||||||
PLAY_SONG(tone_startup);
|
//// PORTD &= ~(1<<5);
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
//// // orange led on
|
||||||
// DDRD |= (1<<5);
|
//// DDRB |= (1<<0);
|
||||||
// PORTD &= ~(1<<5);
|
//// PORTB &= ~(1<<0);
|
||||||
|
|
||||||
// // orange led on
|
matrix_init_user();
|
||||||
// DDRB |= (1<<0);
|
|
||||||
// PORTB &= ~(1<<0);
|
|
||||||
|
|
||||||
matrix_init_user();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_SONG(tone_goodbye);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -19,10 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = KEYMAP(
|
[0] = KEYMAP(
|
||||||
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC,
|
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, 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_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_RSFT,
|
MT(MOD_LSFT, KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RCTL, KC_RALT
|
KC_LCTL, KC_LALT, KC_LGUI, KC_LSFT, KC_SPC, KC_SPC, KC_APP, MO(1)
|
||||||
|
),
|
||||||
|
[1] = KEYMAP(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_SLEP,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_QUOT, KC_BSLS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS,
|
||||||
|
RGB_MOD, BL_TOGG, KC_LGUI, KC_LSFT, KC_SPC, KC_SPC, KC_APP, KC_TRNS
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "viterbi.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
#include "drashna.h"
|
#include "drashna.h"
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
#include "viterbi.h"
|
#include "viterbi.h"
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
|
||||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
void led_set_kb(uint8_t usb_led) {
|
void led_set_kb(uint8_t usb_led) {
|
||||||
@@ -14,11 +10,6 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
_delay_ms(20); // gets rid of tick
|
|
||||||
PLAY_NOTE_ARRAY(tone_startup, false, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// // green led on
|
// // green led on
|
||||||
// DDRD |= (1<<5);
|
// DDRD |= (1<<5);
|
||||||
// PORTD &= ~(1<<5);
|
// PORTD &= ~(1<<5);
|
||||||
@@ -29,11 +20,3 @@ void matrix_init_kb(void) {
|
|||||||
|
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
};
|
};
|
||||||
|
|
||||||
void shutdown_user(void) {
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
|
|
||||||
_delay_ms(150);
|
|
||||||
stop_all_notes();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -50,7 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define DIODE_DIRECTION COL2ROW
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
#define BACKLIGHT_PIN F5
|
#define BACKLIGHT_PIN F5
|
||||||
#define BACKLIGHT_BREATHING
|
|
||||||
#define BACKLIGHT_LEVELS 6
|
#define BACKLIGHT_LEVELS 6
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,46 @@ firmware likely requires a command line like:
|
|||||||
$ sudo make xd75:default:dfu
|
$ sudo make xd75:default:dfu
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### LED control
|
||||||
|
|
||||||
|
There are 3 individual LEDs that can be turned on and off, plus the keycap LEDs (which are all wired into the same pin). The functions are named according to how they're labeled on the PCB.
|
||||||
|
|
||||||
|
TODO: it would be nice to have PWM support on these LEDs for fade-in/fade-out effects.
|
||||||
|
|
||||||
|
```c
|
||||||
|
capslock_led_on();
|
||||||
|
gp100_led_on();
|
||||||
|
gp103_led_on();
|
||||||
|
keycaps_led_on();
|
||||||
|
|
||||||
|
|
||||||
|
// led_set_user example - you could also turn these on/off in response
|
||||||
|
// to events in process_record_user or matrix_scan_user
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
capslock_led_on();
|
||||||
|
} else {
|
||||||
|
capslock_led_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (some_custom_state) {
|
||||||
|
gp100_led_on();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
gp100_led_off();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For the curious:
|
||||||
|
|
||||||
|
```
|
||||||
|
CAPSLOCK_LED B2
|
||||||
|
GP103_LED F4
|
||||||
|
KEYCAPS_LED F5
|
||||||
|
GP100_LED F7
|
||||||
|
```
|
||||||
|
|
||||||
### Other Keymaps
|
### Other Keymaps
|
||||||
|
|
||||||
The "default" keymap included is basically the OLKB Atomic keymap with
|
The "default" keymap included is basically the OLKB Atomic keymap with
|
||||||
|
|||||||
@@ -15,10 +15,20 @@
|
|||||||
*/
|
*/
|
||||||
#include "xd75.h"
|
#include "xd75.h"
|
||||||
|
|
||||||
|
#define XD75_CAPSLOCK_LED 2 // B2
|
||||||
|
#define XD75_GP103_LED 4 // F4
|
||||||
|
#define XD75_KEYCAPS_LED 5 // F5
|
||||||
|
#define XD75_GP100_LED 7 // F7
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
// put your keyboard start-up code here
|
// put your keyboard start-up code here
|
||||||
// runs once when the firmware starts up
|
// runs once when the firmware starts up
|
||||||
|
|
||||||
|
capslock_led_init();
|
||||||
|
gp100_led_init();
|
||||||
|
gp103_led_init();
|
||||||
|
keycaps_led_init();
|
||||||
|
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,3 +51,55 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
|
|
||||||
led_set_user(usb_led);
|
led_set_user(usb_led);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void capslock_led_init(void) {
|
||||||
|
DDRB |= (1 << XD75_CAPSLOCK_LED);
|
||||||
|
capslock_led_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
void capslock_led_off(void) {
|
||||||
|
PORTB |= (1 << XD75_CAPSLOCK_LED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void capslock_led_on(void) {
|
||||||
|
PORTB &= ~(1 << XD75_CAPSLOCK_LED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void gp100_led_init(void) {
|
||||||
|
DDRF |= (1 << XD75_GP100_LED);
|
||||||
|
gp100_led_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
void gp100_led_off(void) {
|
||||||
|
PORTF |= (1 << XD75_GP100_LED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void gp100_led_on(void) {
|
||||||
|
PORTF &= ~(1 << XD75_GP100_LED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void gp103_led_init(void) {
|
||||||
|
DDRF |= (1 << XD75_GP103_LED);
|
||||||
|
gp103_led_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
void gp103_led_off(void) {
|
||||||
|
PORTF &= ~(1 << XD75_GP103_LED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void gp103_led_on(void) {
|
||||||
|
PORTF |= (1 << XD75_GP103_LED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void keycaps_led_init(void) {
|
||||||
|
DDRF |= (1 << XD75_KEYCAPS_LED);
|
||||||
|
keycaps_led_off();
|
||||||
|
}
|
||||||
|
|
||||||
|
void keycaps_led_off(void) {
|
||||||
|
PORTF |= (1 << XD75_KEYCAPS_LED);
|
||||||
|
}
|
||||||
|
|
||||||
|
void keycaps_led_on(void) {
|
||||||
|
PORTF &= ~(1 << XD75_KEYCAPS_LED);
|
||||||
|
}
|
||||||
@@ -52,4 +52,20 @@
|
|||||||
|
|
||||||
#define LAYOUT_ortho_5x15 KEYMAP
|
#define LAYOUT_ortho_5x15 KEYMAP
|
||||||
|
|
||||||
|
void capslock_led_init(void);
|
||||||
|
void capslock_led_off(void);
|
||||||
|
void capslock_led_on(void);
|
||||||
|
|
||||||
|
void gp100_led_init(void);
|
||||||
|
void gp100_led_off(void);
|
||||||
|
void gp100_led_on(void);
|
||||||
|
|
||||||
|
void gp103_led_init(void);
|
||||||
|
void gp103_led_off(void);
|
||||||
|
void gp103_led_on(void);
|
||||||
|
|
||||||
|
void keycaps_led_init(void);
|
||||||
|
void keycaps_led_off(void);
|
||||||
|
void keycaps_led_on(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
+1
-1
@@ -9,7 +9,7 @@ ifeq ($(COLOR),true)
|
|||||||
BOLD=\033[1m
|
BOLD=\033[1m
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(shell awk --version 2>/dev/null),)
|
ifneq ($(shell echo "1 2 3" | awk '{ printf "%2s", $$3; }' 2>/dev/null)," 3")
|
||||||
AWK=awk
|
AWK=awk
|
||||||
else
|
else
|
||||||
AWK=cat && test
|
AWK=cat && test
|
||||||
|
|||||||
+45
-11
@@ -286,13 +286,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||||||
rgblight_toggle();
|
rgblight_toggle();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case RGB_MOD:
|
case RGB_MODE_FORWARD:
|
||||||
if (record->event.pressed) {
|
|
||||||
rgblight_step();
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case RGB_SMOD:
|
|
||||||
// same as RBG_MOD, but if shift is pressed, it will use the reverese direction instead.
|
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
||||||
if(shifted) {
|
if(shifted) {
|
||||||
@@ -303,6 +297,17 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
case RGB_MODE_REVERSE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT));
|
||||||
|
if(shifted) {
|
||||||
|
rgblight_step();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
rgblight_step_reverse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
case RGB_HUI:
|
case RGB_HUI:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
rgblight_increase_hue();
|
rgblight_increase_hue();
|
||||||
@@ -548,11 +553,34 @@ bool process_record_quantum(keyrecord_t *record) {
|
|||||||
uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)
|
uint8_t shifted = get_mods() & ((MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)
|
||||||
|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)));
|
|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)));
|
||||||
|
|
||||||
#ifdef GRAVE_ESC_CTRL_OVERRIDE
|
#ifdef GRAVE_ESC_ALT_OVERRIDE
|
||||||
// if CTRL is pressed, ESC is always read as ESC, even if SHIFT or GUI is pressed.
|
// if ALT is pressed, ESC is always sent
|
||||||
// this is handy for the ctrl+shift+esc shortcut on windows, among other things.
|
// this is handy for the cmd+opt+esc shortcut on macOS, among other things.
|
||||||
if (get_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)))
|
if (get_mods() & (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT))) {
|
||||||
shifted = 0;
|
shifted = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GRAVE_ESC_CTRL_OVERRIDE
|
||||||
|
// if CTRL is pressed, ESC is always sent
|
||||||
|
// this is handy for the ctrl+shift+esc shortcut on windows, among other things.
|
||||||
|
if (get_mods() & (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))) {
|
||||||
|
shifted = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GRAVE_ESC_GUI_OVERRIDE
|
||||||
|
// if GUI is pressed, ESC is always sent
|
||||||
|
if (get_mods() & (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))) {
|
||||||
|
shifted = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GRAVE_ESC_SHIFT_OVERRIDE
|
||||||
|
// if SHIFT is pressed, ESC is always sent
|
||||||
|
if (get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
|
shifted = 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
@@ -907,6 +935,11 @@ void backlight_task(void) {
|
|||||||
|
|
||||||
#ifdef BACKLIGHT_BREATHING
|
#ifdef BACKLIGHT_BREATHING
|
||||||
|
|
||||||
|
#ifdef NO_BACKLIGHT_CLOCK
|
||||||
|
void breathing_defaults(void) {}
|
||||||
|
void breathing_intensity_default(void) {}
|
||||||
|
#else
|
||||||
|
|
||||||
#define BREATHING_NO_HALT 0
|
#define BREATHING_NO_HALT 0
|
||||||
#define BREATHING_HALT_OFF 1
|
#define BREATHING_HALT_OFF 1
|
||||||
#define BREATHING_HALT_ON 2
|
#define BREATHING_HALT_ON 2
|
||||||
@@ -1106,6 +1139,7 @@ ISR(TIMER1_COMPA_vect)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // NO_BACKLIGHT_CLOCK
|
||||||
#endif // breathing
|
#endif // breathing
|
||||||
|
|
||||||
#else // backlight
|
#else // backlight
|
||||||
|
|||||||
@@ -399,8 +399,8 @@ enum quantum_keycodes {
|
|||||||
|
|
||||||
// RGB functionality
|
// RGB functionality
|
||||||
RGB_TOG,
|
RGB_TOG,
|
||||||
RGB_MOD,
|
RGB_MODE_FORWARD,
|
||||||
RGB_SMOD,
|
RGB_MODE_REVERSE,
|
||||||
RGB_HUI,
|
RGB_HUI,
|
||||||
RGB_HUD,
|
RGB_HUD,
|
||||||
RGB_SAI,
|
RGB_SAI,
|
||||||
@@ -553,6 +553,10 @@ enum quantum_keycodes {
|
|||||||
|
|
||||||
#define KC_GESC GRAVE_ESC
|
#define KC_GESC GRAVE_ESC
|
||||||
|
|
||||||
|
#define RGB_MOD RGB_MODE_FORWARD
|
||||||
|
#define RGB_SMOD RGB_MODE_FORWARD
|
||||||
|
#define RGB_RMOD RGB_MODE_REVERSE
|
||||||
|
|
||||||
#define RGB_M_P RGB_MODE_PLAIN
|
#define RGB_M_P RGB_MODE_PLAIN
|
||||||
#define RGB_M_B RGB_MODE_BREATHE
|
#define RGB_M_B RGB_MODE_BREATHE
|
||||||
#define RGB_M_R RGB_MODE_RAINBOW
|
#define RGB_M_R RGB_MODE_RAINBOW
|
||||||
|
|||||||
+42
-38
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include "action.h"
|
#include "action.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
#include "sensitive.h"
|
||||||
|
|
||||||
#ifdef TAP_DANCE_ENABLE
|
#ifdef TAP_DANCE_ENABLE
|
||||||
//define diablo macro timer variables
|
//define diablo macro timer variables
|
||||||
@@ -78,6 +79,14 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||||
|
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
||||||
|
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
||||||
|
float tone_workman[][2] = SONG(PLOVER_SOUND);
|
||||||
|
float tone_hackstartup[][2] = SONG(ONE_UP_SOUND);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Add reconfigurable functions here, for keymap customization
|
// Add reconfigurable functions here, for keymap customization
|
||||||
// This allows for a global, userspace functions, and continued
|
// This allows for a global, userspace functions, and continued
|
||||||
@@ -137,6 +146,11 @@ void matrix_init_user(void) {
|
|||||||
rgblight_set_red;
|
rgblight_set_red;
|
||||||
rgblight_mode(5);
|
rgblight_mode(5);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef AUDIO_ENABLE
|
||||||
|
// _delay_ms(21); // gets rid of tick
|
||||||
|
// stop_all_notes();
|
||||||
|
// PLAY_SONG(tone_hackstartup);
|
||||||
#endif
|
#endif
|
||||||
matrix_init_keymap();
|
matrix_init_keymap();
|
||||||
}
|
}
|
||||||
@@ -190,13 +204,6 @@ void led_set_user(uint8_t usb_led) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
|
||||||
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
|
|
||||||
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
|
|
||||||
float tone_workman[][2] = SONG(PLOVER_SOUND);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void persistent_default_layer_set(uint16_t default_layer) {
|
void persistent_default_layer_set(uint16_t default_layer) {
|
||||||
eeconfig_update_default_layer(default_layer);
|
eeconfig_update_default_layer(default_layer);
|
||||||
@@ -427,28 +434,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
#endif
|
#endif
|
||||||
case KC_MAKE:
|
case KC_MAKE:
|
||||||
if (!record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
|
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
|
||||||
#ifndef BOOTLOADER_CATERINA
|
#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
|
||||||
SEND_STRING(":teensy ");
|
":dfu"
|
||||||
#else
|
#elif defined(BOOTLOADER_HALFKAY)
|
||||||
SEND_STRING(" ");
|
":teensy"
|
||||||
|
#elif defined(BOOTLOADER_CATERINA)
|
||||||
|
":avrdude"
|
||||||
#endif
|
#endif
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
SEND_STRING("RGBLIGHT_ENABLE=yes ");
|
" RGBLIGHT_ENABLE=yes"
|
||||||
#else
|
#else
|
||||||
SEND_STRING("RGBLIGHT_ENABLE=no ");
|
" RGBLIGHT_ENABLE=no"
|
||||||
#endif
|
#endif
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
SEND_STRING("AUDIO_ENABLE=yes ");
|
" AUDIO_ENABLE=yes"
|
||||||
#else
|
#else
|
||||||
SEND_STRING("AUDIO_ENABLE=no ");
|
" AUDIO_ENABLE=no"
|
||||||
#endif
|
#endif
|
||||||
#ifdef FAUXCLICKY_ENABLE
|
#ifdef FAUXCLICKY_ENABLE
|
||||||
SEND_STRING("FAUXCLICKY_ENABLE=yes ");
|
" FAUXCLICKY_ENABLE=yes"
|
||||||
#else
|
#else
|
||||||
SEND_STRING("FAUXCLICKY_ENABLE=no ");
|
" FAUXCLICKY_ENABLE=no"
|
||||||
#endif
|
#endif
|
||||||
SEND_STRING(SS_TAP(X_ENTER));
|
SS_TAP(X_ENTER));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
@@ -475,33 +484,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication
|
case KC_SECRET_1 ... KC_SECRET_5:
|
||||||
if (record->event.pressed) {
|
if (!record->event.pressed) {
|
||||||
rgb_layer_change = !rgb_layer_change;
|
send_string(secret[keycode - KC_SECRET_1]);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case RGB_MOD:
|
case KC_RGB_T: // Because I want the option to go back to normal RGB mode rather than always layer indication
|
||||||
case RGB_SMOD:
|
#ifdef RGBLIGHT_ENABLE
|
||||||
case RGB_HUI:
|
|
||||||
case RGB_HUD:
|
|
||||||
case RGB_SAI:
|
|
||||||
case RGB_SAD:
|
|
||||||
case RGB_VAI:
|
|
||||||
case RGB_VAD:
|
|
||||||
case RGB_MODE_PLAIN:
|
|
||||||
case RGB_MODE_BREATHE:
|
|
||||||
case RGB_MODE_RAINBOW:
|
|
||||||
case RGB_MODE_SWIRL:
|
|
||||||
case RGB_MODE_SNAKE:
|
|
||||||
case RGB_MODE_KNIGHT:
|
|
||||||
case RGB_MODE_XMAS:
|
|
||||||
case RGB_MODE_GRADIENT:
|
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
|
rgb_layer_change = !rgb_layer_change;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
|
||||||
|
if (record->event.pressed) { //This disrables layer indication, as it's assumed that if you're changing this ... you want that disabled
|
||||||
rgb_layer_change = false;
|
rgb_layer_change = false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return process_record_keymap(keycode, record);
|
return process_record_keymap(keycode, record);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define USERSPACE
|
#define USERSPACE
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
#include "song_list.h"
|
||||||
|
|
||||||
// Define layer names
|
// Define layer names
|
||||||
#define _QWERTY 0
|
#define _QWERTY 0
|
||||||
@@ -86,6 +87,11 @@ enum userrpace_custom_keycodes {
|
|||||||
KC_MAKE,
|
KC_MAKE,
|
||||||
KC_RESET,
|
KC_RESET,
|
||||||
KC_RGB_T,
|
KC_RGB_T,
|
||||||
|
KC_SECRET_1,
|
||||||
|
KC_SECRET_2,
|
||||||
|
KC_SECRET_3,
|
||||||
|
KC_SECRET_4,
|
||||||
|
KC_SECRET_5,
|
||||||
NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
|
NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -99,6 +105,10 @@ enum {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#define QMK_KEYS_PER_SCAN 4
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
#define RGBLIGHT_SLEEP
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
const char secret[][64] = {
|
||||||
|
"test1",
|
||||||
|
"test2",
|
||||||
|
"test3",
|
||||||
|
"test4",
|
||||||
|
"test5"
|
||||||
|
};
|
||||||
|
|
||||||
@@ -21,6 +21,8 @@ __attribute__ ((weak))
|
|||||||
uint32_t layer_state_set_keymap (uint32_t state) {
|
uint32_t layer_state_set_keymap (uint32_t state) {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void led_set_keymap(uint8_t usb_led) {}
|
||||||
|
|
||||||
// Call user matrix init, then call the keymap's init function
|
// Call user matrix init, then call the keymap's init function
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
@@ -82,3 +84,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
uint32_t layer_state_set_user (uint32_t state) {
|
uint32_t layer_state_set_user (uint32_t state) {
|
||||||
return layer_state_set_keymap (state);
|
return layer_state_set_keymap (state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
led_set_keymap(usb_led);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user