Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a5e68f4f2 | ||
|
|
e99615b2ac | ||
|
|
090c30212e | ||
|
|
753f57ee00 | ||
|
|
fd3b0787ed | ||
|
|
16302be5ad | ||
|
|
b8db0b26b1 | ||
|
|
614b3a0f7c | ||
|
|
11eaccdbce | ||
|
|
13ad650136 | ||
|
|
2ad2b73d68 | ||
|
|
3e698a54ea | ||
|
|
6d78d45ca1 | ||
|
|
c9159effc0 | ||
|
|
7749f4590f | ||
|
|
5b7260fc53 | ||
|
|
afb4a43677 | ||
|
|
ca9262ca3d | ||
|
|
0f2108c905 | ||
|
|
45dca4bc40 | ||
|
|
3f96ba0113 | ||
|
|
2fb14845d5 |
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
name: Blank issue
|
||||||
|
about: If you're 100% sure that you don't need one of the other issue templates, use this one instead.
|
||||||
|
|
||||||
|
---
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Create a report to help us improve the QMK Firmware
|
||||||
|
---
|
||||||
|
<!-- Provide a general summary of the bug in the Title above -->
|
||||||
|
|
||||||
|
<!-- This template is entirely option and can be removed, but is here to help both you and us. -->
|
||||||
|
<!-- This text and anything on lines wrapped like this one will not show up in the final text. This text is to help us and you. -->
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
|
||||||
|
<!-- A clear and concise description of what the bug is. -->
|
||||||
|
|
||||||
|
**System Information**
|
||||||
|
- Keyboard:
|
||||||
|
- Revision (if applicable):
|
||||||
|
- Operating System:
|
||||||
|
- avr-gcc version:
|
||||||
|
<!-- Run `avr-gcc --version` to find out -->
|
||||||
|
- arm gcc version:
|
||||||
|
<!-- Run `arm-none-eabi-gcc --version` to find out -->
|
||||||
|
- QMK Firmware version:
|
||||||
|
<!-- You can run `git describe --abbrev=0 --tags` to find this out -->
|
||||||
|
- Any keyboard related software installed?
|
||||||
|
- [ ] Auto Hot Key
|
||||||
|
- [ ] Karabiner
|
||||||
|
- [ ] Other
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
|
||||||
|
<!-- Add any other context about the problem here. -->
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest a new feature or changes to existing features
|
||||||
|
---
|
||||||
|
<!--- Provide a general summary of the changes you want in the Title above -->
|
||||||
|
|
||||||
|
<!-- This template is entirely option and can be removed, but is here to help both you and us. -->
|
||||||
|
<!-- This text and anything on lines wrapped like this one will not show up in the final text. This text is to help us and you. -->
|
||||||
|
|
||||||
|
## Feature Request Type
|
||||||
|
|
||||||
|
- [ ] Core Functionality
|
||||||
|
- [ ] Add-on hardware support (e.g. audio, RGB, OLED screen, etc.)
|
||||||
|
- [ ] Alteration (enhancement/optimization) of existing Feature(s)
|
||||||
|
- [ ] New behavior
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
<!-- A few sentences describing what it is that you'd like to see. Additional information (such as links to spec sheets, licensing info, other related issues or PR's, etc) would be helpful. -->
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
name: Other issues
|
||||||
|
about: Anything else that doesn't fall into the above categories.
|
||||||
|
---
|
||||||
|
<!--- Provide a general summary of the changes you want in the Title above -->
|
||||||
|
|
||||||
|
<!-- This text and anything on lines wrapped like this one will not show up in the final text. This text is to help us and you. -->
|
||||||
|
|
||||||
|
<!-- Please check https://docs.qmk.fm/#/support for additional resources first. If that doesn't answer your question, check the bug report option, as that may be more appropriate. -->
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<!--- Provide a general summary of your changes in the Title above -->
|
||||||
|
|
||||||
|
<!--- This template is entirely option and can be removed, but is here to help both you and us. -->
|
||||||
|
<!--- This text and anything on lines wrapped like this one will not show up in the final text. This text is to help us and you. -->
|
||||||
|
|
||||||
|
## Description
|
||||||
|
<!--- Describe your changes in detail -->
|
||||||
|
|
||||||
|
## Types of changes
|
||||||
|
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
||||||
|
- [ ] Core
|
||||||
|
- [ ] Bugfix
|
||||||
|
- [ ] New Feature
|
||||||
|
- [ ] Enhancement/Optimization
|
||||||
|
- [ ] Keyboard (addition or update)
|
||||||
|
- [ ] Keymap/Layout/Userspace (addition or update)
|
||||||
|
- [ ] Documentation
|
||||||
|
|
||||||
|
|
||||||
|
## Issues Fixed or Closed by this PR
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
## Checklist:
|
||||||
|
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
||||||
|
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
||||||
|
- [ ] My code follows the code style of this project.
|
||||||
|
- [ ] My change requires a change to the documentation.
|
||||||
|
- [ ] I have updated the documentation accordingly.
|
||||||
|
- [ ] I have read the **CONTRIBUTING** document. (https://docs.qmk.fm/#/contributing)
|
||||||
|
- [ ] I have added tests to cover my changes.
|
||||||
|
- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
|
||||||
+21
-20
@@ -1,28 +1,29 @@
|
|||||||
FROM debian:jessie
|
FROM debian
|
||||||
MAINTAINER Erik Dasque <[email protected]>
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install --no-install-recommends -y build-essential \
|
RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
|
avr-libc \
|
||||||
|
avrdude \
|
||||||
|
binutils-arm-none-eabi \
|
||||||
|
binutils-avr \
|
||||||
|
build-essential \
|
||||||
|
dfu-programmer \
|
||||||
|
dfu-util \
|
||||||
gcc \
|
gcc \
|
||||||
|
gcc-arm-none-eabi \
|
||||||
|
gcc-avr \
|
||||||
|
git \
|
||||||
|
libnewlib-arm-none-eabi \
|
||||||
|
software-properties-common \
|
||||||
unzip \
|
unzip \
|
||||||
wget \
|
wget \
|
||||||
zip \
|
zip \
|
||||||
gcc-avr \
|
|
||||||
binutils-avr \
|
|
||||||
avr-libc \
|
|
||||||
dfu-programmer \
|
|
||||||
dfu-util \
|
|
||||||
gcc-arm-none-eabi \
|
|
||||||
binutils-arm-none-eabi \
|
|
||||||
libnewlib-arm-none-eabi \
|
|
||||||
git \
|
|
||||||
software-properties-common \
|
|
||||||
avrdude \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV keyboard=ergodox
|
ENV KEYBOARD=ergodox_ez
|
||||||
ENV subproject=ez
|
ENV KEYMAP=default
|
||||||
ENV keymap=default
|
|
||||||
|
|
||||||
VOLUME /qmk
|
VOLUME /qmk_firmware
|
||||||
WORKDIR /qmk
|
WORKDIR /qmk_firmware
|
||||||
CMD make clean ; make keyboard=${keyboard} subproject=${subproject} keymap=${keymap}
|
COPY . .
|
||||||
|
|
||||||
|
CMD make $KEYBOARD:$KEYMAP
|
||||||
@@ -88,6 +88,7 @@
|
|||||||
|
|
||||||
* Other Topics
|
* Other Topics
|
||||||
* [Using Eclipse with QMK](eclipse.md)
|
* [Using Eclipse with QMK](eclipse.md)
|
||||||
|
* [Support](support.md)
|
||||||
|
|
||||||
* QMK Internals (In Progress)
|
* QMK Internals (In Progress)
|
||||||
* [Defines](internals_defines.md)
|
* [Defines](internals_defines.md)
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
|
|
||||||
* Other Topics
|
* Other Topics
|
||||||
* [Using Eclipse with QMK](eclipse.md)
|
* [Using Eclipse with QMK](eclipse.md)
|
||||||
|
* [Support](support.md)
|
||||||
|
|
||||||
* QMK Internals (In Progress)
|
* QMK Internals (In Progress)
|
||||||
* [Defines](internals_defines.md)
|
* [Defines](internals_defines.md)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ and this to your `config.h`:
|
|||||||
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.:
|
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.:
|
||||||
|
|
||||||
#define ENCODERS_PAD_A { encoder1a, encoder2a }
|
#define ENCODERS_PAD_A { encoder1a, encoder2a }
|
||||||
#define ENCODERS_PAD_B { encoder1a, encoder2b }
|
#define ENCODERS_PAD_B { encoder1b, encoder2b }
|
||||||
|
|
||||||
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions.
|
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions.
|
||||||
|
|
||||||
|
|||||||
@@ -123,24 +123,27 @@ If you have trouble and want to ask for help, it is useful to generate a *Win_Ch
|
|||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker](https://www.docker.com/products/docker), run the following command at the root of the QMK folder to build a keyboard/keymap:
|
If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# You'll run this every time you want to build a keymap
|
util/docker_build.sh keyboard:keymap
|
||||||
# modify the keymap and keyboard assignment to compile what you want
|
# For example: util/docker_build.sh ergodox_ez:steno
|
||||||
# defaults are ergodox/default
|
```
|
||||||
|
This will compile the targeted keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`.
|
||||||
|
|
||||||
docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
|
You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:
|
||||||
|
```bash
|
||||||
|
util/docker_build.sh
|
||||||
|
# Reads parameters as input (leave blank for defaults)
|
||||||
```
|
```
|
||||||
|
|
||||||
On Windows Docker seems to have issues with the VOLUME tag in Dockerfile, and `$('pwd')` won't print a Windows compliant path; use full path instead, like this:
|
There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -e keymap=default -e keyboard=ergodox_ez --rm -v D:/Users/Sacapuces/Documents/Repositories/qmk:/qmk:rw edasque/qmk_firmware
|
util/docker_build.sh keyboard:keymap:target
|
||||||
|
# For example: util/docker_build.sh planck/rev6:default:dfu-util
|
||||||
```
|
```
|
||||||
|
If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use QMK Toolbox instead.
|
||||||
|
|
||||||
This will compile the targeted keyboard/keymap and leave it in your QMK directory for you to flash.
|
!> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**.
|
||||||
|
|
||||||
## Vagrant
|
## Vagrant
|
||||||
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](getting_started_vagrant.md).
|
If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [vagrant guide](getting_started_vagrant.md).
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# Support
|
||||||
|
|
||||||
|
If you need help with something, the best place to get quick support is going to be on our [Discord Server](https://discord.gg/Uq7gcHh). There is usually somebody online, and there are a bunch of very helpful people there.
|
||||||
|
|
||||||
|
Don't forget to read our [Code of Conduct](https://qmk.fm/coc/).
|
||||||
|
|
||||||
|
## Help! I don't know where to start!
|
||||||
|
|
||||||
|
If this is the case, then you should start with our [Newbs Guide](https://docs.qmk.fm/#/newbs). There is a lot of great info there, and that should cover everything you need to get started.
|
||||||
|
|
||||||
|
If that's an issue, hop onto the [QMK Configurator](https://config.qmk.fm), as that will handle a majority of what you need there.
|
||||||
|
|
||||||
|
## Help! I'm having issues flashing!
|
||||||
|
|
||||||
|
First, head to the [Compiling/Flashing FAQ Page](https://docs.qmk.fm/#/faq_build). There is a good deal of info there, and you'll find a bunch of solutions to common issues there.
|
||||||
|
|
||||||
|
## Help, I have an issue that isn't covered by the links above
|
||||||
|
|
||||||
|
Okay, that's fine. Then please check the [open issues in our GitHub](https://github.com/qmk/qmk_firmware/issues) to see if somebody is experiencing the same thing (make sure it's not just similar, but actually the same).
|
||||||
|
|
||||||
|
If you can't find anything, then please open a [new issue](https://github.com/qmk/qmk_firmware/issues/new)!
|
||||||
|
|
||||||
|
## What if I found a bug?
|
||||||
|
|
||||||
|
Then please open an [issue](https://github.com/qmk/qmk_firmware/issues/new), and if you know how to fix it, open up a Pull Request on GitHub with the fix.
|
||||||
|
|
||||||
|
## But `git` and `GitHub` are intimidating!
|
||||||
|
|
||||||
|
Don't worry, we have some pretty nice [Guidelines](https://docs.qmk.fm/#/newbs_best_practices) on how to start using `git` and GitHub to make things easier to develop.
|
||||||
|
|
||||||
|
Additionally, you can find additional `git` and GitHub related links [here](https://docs.qmk.fm/#/newbs_learn_more_resources).
|
||||||
|
|
||||||
|
## I have a Keyboard that I want to add support for
|
||||||
|
|
||||||
|
Awesome! Open up a Pull Request for it. We'll review the code, and merge it!
|
||||||
|
|
||||||
|
### What if I want to do brand it with `QMK`?
|
||||||
|
|
||||||
|
That's amazing! We would love to assist you with that!
|
||||||
|
|
||||||
|
In fact, we have a [whole page](https://qmk.fm/powered/) dedicated to adding QMK Branding to your page and keyboard. This covers pretty much everything you need (knowledge and images) to officially support QMK.
|
||||||
|
|
||||||
|
If you have any questions about this, open an issue or head to [Discord](https://discord.gg/Uq7gcHh).
|
||||||
@@ -18,34 +18,26 @@
|
|||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_60_ansi(
|
[0] = LAYOUT_60_ansi(
|
||||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H,
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
|
||||||
KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC,
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_LCTL
|
||||||
KC_RALT, KC_RGUI, MO(1), KC_LCTL
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[1] = LAYOUT_60_ansi(
|
[1] = LAYOUT_60_ansi(
|
||||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
KC_F11, KC_F12, KC_DEL, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN,
|
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
|
||||||
KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_HOME, KC_PGUP, KC_TRNS,
|
KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_TRNS,
|
||||||
KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS
|
||||||
KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), KC_TRNS, KC_TRNS
|
|
||||||
),
|
),
|
||||||
|
|
||||||
[2] = LAYOUT_60_ansi(
|
[2] = LAYOUT_60_ansi(
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, RESET, BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS,
|
BL_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI,
|
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
RGB_SAI, RGB_VAI, RGB_SPI, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -94,16 +94,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
|
K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \
|
||||||
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
|
K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \
|
||||||
K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
|
K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \
|
||||||
K30, K40, K50, K60, K70, K00, K20 \
|
K30, K40, K50, K60, K00, K10, K20 \
|
||||||
) { \
|
) { \
|
||||||
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
|
{ K00, K01, K02, K03, K04, K05, K06, K07 }, \
|
||||||
{ KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \
|
{ K10, K11, K12, K13, K14, K15, K16, K17 }, \
|
||||||
{ K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
|
{ K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \
|
||||||
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
|
{ K30, K31, K32, K33, K34, K35, K36, K37 }, \
|
||||||
{ K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
|
{ K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \
|
||||||
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
|
{ K50, K51, K52, K53, K54, K55, K56, K57 }, \
|
||||||
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
|
{ K60, K61, K62, K63, K64, K65, K66, K67 }, \
|
||||||
{ K70, K71, K72, K73, K74, K75, K76, K77 } \
|
{ KC_NO, K71, K72, K73, K74, K75, K76, K77 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_kc( \
|
#define LAYOUT_kc( \
|
||||||
|
|||||||
@@ -1,31 +1,32 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum keyboard_layers {
|
||||||
|
_BL = 0, // Base Layer
|
||||||
|
_FL // Function Layer
|
||||||
|
};
|
||||||
|
|
||||||
|
// Custom #defined keycodes (shorter macros for readability)
|
||||||
|
#define KC_CTES CTL_T(KC_ESC)
|
||||||
|
#define KC_RSUP RSFT_T(KC_UP)
|
||||||
|
#define KC_FNDN LT(_FL, KC_DOWN)
|
||||||
|
#define KC_RGLT RCMD_T(KC_LEFT)
|
||||||
|
#define KC_RCRT RCTL_T(KC_RIGHT)
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/* 0: qwerty */
|
[_BL] = LAYOUT_aek_103(
|
||||||
LAYOUT_all(
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, KC_BSPC,
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
KC_CTES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP,
|
||||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_UP), _______,
|
MO(_FL), KC_LALT, KC_LGUI, KC_SPC, KC_RGLT, KC_FNDN, KC_RCRT
|
||||||
MO(1), KC_LALT, KC_LGUI, KC_SPC, _______, RGUI_T(KC_LEFT), RALT_T(KC_DOWN), LT(2, KC_RIGHT)
|
|
||||||
),
|
),
|
||||||
/* 1: fn1 */
|
[_FL] = LAYOUT_aek_103(
|
||||||
LAYOUT_all(
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL,
|
_______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, RESET,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, _______,
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_END, KC_PGDOWN, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______
|
)
|
||||||
),
|
};
|
||||||
/* 2: fn2 */
|
|
||||||
LAYOUT_all(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
|
||||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______,
|
|
||||||
_______, _______, _______, DEBUG, _______, _______, _______, _______, _______, _______, KC_SCROLLLOCK, KC_PAUSE, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______
|
|
||||||
),
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {};
|
const uint16_t PROGMEM fn_actions[] = {};
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
/*
|
||||||
|
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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This code makes use of cy384's Arduino USB HID adapter for the Palm Portable
|
||||||
|
Keyboard, released under the BSD licence */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define CUSTOM_MATRIX 2
|
||||||
|
|
||||||
|
#define VENDOR_ID 0xFEED
|
||||||
|
#define PRODUCT_ID 0x0001
|
||||||
|
#define DEVICE_VER 0x0100
|
||||||
|
#define MANUFACTURER QMK
|
||||||
|
#define PRODUCT Stowaway converter
|
||||||
|
#define DESCRIPTION USB converter for Stowaway keyboard
|
||||||
|
|
||||||
|
// IO pins to serial
|
||||||
|
// https://deskthority.net/wiki/Arduino_Pro_Micro for pin lookup
|
||||||
|
#define VCC_PIN D1 // pro micro 2
|
||||||
|
#define RX_PIN D0 //pro micro 3 , was 8 on cy384
|
||||||
|
#define RTS_PIN C6 // 5 //[ was D4 // 4 on the cy384
|
||||||
|
#define DCD_PIN E6 //7
|
||||||
|
|
||||||
|
// if using the particular arduino pinout of CY384
|
||||||
|
#ifdef CY384
|
||||||
|
#define GND_PIN D7 //6
|
||||||
|
#define PULLDOWN_PIN B1 // 15
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HANDSPRING
|
||||||
|
// Set to 1 for Handspring or to disable RTS/DCD based handshake.
|
||||||
|
#define HANDSPRING 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MAXDROP 10 // check if keyboard is connected every X polling cycles
|
||||||
|
#define SLEEP_TIMEOUT 500000 // check keyboard/reset this many millis
|
||||||
|
|
||||||
|
|
||||||
|
#define MATRIX_ROWS 12
|
||||||
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
|
/* key combination for command */
|
||||||
|
#define IS_COMMAND() ( \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \
|
||||||
|
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
/* Serial(USART) configuration
|
||||||
|
* asynchronous, negative logic, 9600baud, no flow control
|
||||||
|
* 1-start bit, 8-data bit, non parity, 1-stop bit
|
||||||
|
*/
|
||||||
|
#define SERIAL_SOFT_BAUD 9600
|
||||||
|
#define SERIAL_SOFT_PARITY_NONE
|
||||||
|
#define SERIAL_SOFT_BIT_ORDER_LSB
|
||||||
|
#if (HANDSPRING == 0)
|
||||||
|
#define SERIAL_SOFT_LOGIC_NEGATIVE //RS232 logic
|
||||||
|
#endif
|
||||||
|
/* RXD Port */
|
||||||
|
#define SERIAL_SOFT_RXD_ENABLE
|
||||||
|
|
||||||
|
// we are using Pro micro pin 3 / D0 as serial
|
||||||
|
#define SERIAL_SOFT_RXD_DDR DDRD
|
||||||
|
#define SERIAL_SOFT_RXD_PORT PORTD
|
||||||
|
#define SERIAL_SOFT_RXD_PIN PIND
|
||||||
|
#define SERIAL_SOFT_RXD_BIT 0
|
||||||
|
#define SERIAL_SOFT_RXD_VECT INT0_vect
|
||||||
|
|
||||||
|
/* RXD Interupt */
|
||||||
|
#define SERIAL_SOFT_RXD_INIT() do { \
|
||||||
|
/* pin configuration: input with pull-up */ \
|
||||||
|
SERIAL_SOFT_RXD_DDR &= ~(1<<SERIAL_SOFT_RXD_BIT); \
|
||||||
|
SERIAL_SOFT_RXD_PORT |= (1<<SERIAL_SOFT_RXD_BIT); \
|
||||||
|
/* enable interrupt: INT0(rising edge) */ \
|
||||||
|
EICRA |= ((1<<ISC01)|(1<<ISC00)); \
|
||||||
|
EIMSK |= (1<<INT0); \
|
||||||
|
sei(); \
|
||||||
|
} while (0)
|
||||||
|
#define SERIAL_SOFT_RXD_INT_ENTER()
|
||||||
|
#define SERIAL_SOFT_RXD_INT_EXIT() do { \
|
||||||
|
/* clear interrupt flag */ \
|
||||||
|
EIFR = (1<<INTF0); \
|
||||||
|
} while (0)
|
||||||
|
#define SERIAL_SOFT_RXD_READ() (SERIAL_SOFT_RXD_PIN&(1<<SERIAL_SOFT_RXD_BIT))
|
||||||
|
|
||||||
|
/* TXD Port */
|
||||||
|
#define SERIAL_SOFT_TXD_ENABLE
|
||||||
|
#define SERIAL_SOFT_TXD_DDR DDRD
|
||||||
|
#define SERIAL_SOFT_TXD_PORT PORTD
|
||||||
|
#define SERIAL_SOFT_TXD_PIN PIND
|
||||||
|
#define SERIAL_SOFT_TXD_BIT 3
|
||||||
|
#define SERIAL_SOFT_TXD_HI() do { SERIAL_SOFT_TXD_PORT |= (1<<SERIAL_SOFT_TXD_BIT); } while (0)
|
||||||
|
#define SERIAL_SOFT_TXD_LO() do { SERIAL_SOFT_TXD_PORT &= ~(1<<SERIAL_SOFT_TXD_BIT); } while (0)
|
||||||
|
#define SERIAL_SOFT_TXD_INIT() do { \
|
||||||
|
/* pin configuration: output */ \
|
||||||
|
SERIAL_SOFT_TXD_DDR |= (1<<SERIAL_SOFT_TXD_BIT); \
|
||||||
|
/* idle */ \
|
||||||
|
SERIAL_SOFT_TXD_ON(); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,398 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 milestogo
|
||||||
|
with elements Copyright 2014 cy384 under a modified BSD license
|
||||||
|
building on qmk structure 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/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "protocol/serial.h"
|
||||||
|
#include "timer.h"
|
||||||
|
#include "pincontrol.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Matrix Array usage:
|
||||||
|
*
|
||||||
|
* ROW: 12(4bits)
|
||||||
|
* COL: 8(3bits)
|
||||||
|
*
|
||||||
|
* +---------+
|
||||||
|
* 0|00 ... 07|
|
||||||
|
* 1|00 ... 07|
|
||||||
|
* :| ... |
|
||||||
|
* :| ... |
|
||||||
|
* A| |
|
||||||
|
* B| |
|
||||||
|
* +---------+
|
||||||
|
*/
|
||||||
|
static uint8_t matrix[MATRIX_ROWS];
|
||||||
|
|
||||||
|
|
||||||
|
// we're going to need a sleep timer
|
||||||
|
static uint16_t last_activity ;
|
||||||
|
// and a byte to track duplicate up events signalling all keys up.
|
||||||
|
static uint16_t last_upKey ;
|
||||||
|
// serial device can disconnect. Check every MAXDROP characters.
|
||||||
|
static uint16_t disconnect_counter = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// bitmath masks.
|
||||||
|
#define KEY_MASK 0b10000000
|
||||||
|
#define COL_MASK 0b00000111
|
||||||
|
#define ROW_MASK 0b01111000
|
||||||
|
|
||||||
|
|
||||||
|
#define ROW(code) (( code & ROW_MASK ) >>3)
|
||||||
|
#define COL(code) ((code & COL_MASK) )
|
||||||
|
#define KEYUP(code) ((code & KEY_MASK) >>7 )
|
||||||
|
|
||||||
|
static bool is_modified = false;
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
matrix_scan_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__ ((weak))
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_rows(void)
|
||||||
|
{
|
||||||
|
return MATRIX_ROWS;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_cols(void)
|
||||||
|
{
|
||||||
|
return MATRIX_COLS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void pins_init(void) {
|
||||||
|
// set pins for pullups, Rts , power &etc.
|
||||||
|
|
||||||
|
//print ("pins setup\n");
|
||||||
|
pinMode(VCC_PIN, PinDirectionOutput);
|
||||||
|
digitalWrite(VCC_PIN, PinLevelLow);
|
||||||
|
|
||||||
|
#if ( HANDSPRING == 0)
|
||||||
|
|
||||||
|
#ifdef CY835
|
||||||
|
pinMode(GND_PIN, PinDirectionOutput);
|
||||||
|
digitalWrite(GND_PIN, PinLevelLow);
|
||||||
|
|
||||||
|
pinMode(PULLDOWN_PIN, PinDirectionOutput);
|
||||||
|
digitalWrite(PULLDOWN_PIN, PinLevelLow);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
pinMode(DCD_PIN, PinDirectionInput);
|
||||||
|
pinMode(RTS_PIN, PinDirectionInput);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* check that the other side isn't powered up.
|
||||||
|
test=digitalRead(DCD_PIN);
|
||||||
|
xprintf("b%02X:", test);
|
||||||
|
test=digitalRead(RTS_PIN);
|
||||||
|
xprintf("%02X\n", test);
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t rts_reset(void) {
|
||||||
|
static uint8_t firstread ;
|
||||||
|
/* bounce RTS so device knows it is rebooted */
|
||||||
|
|
||||||
|
// On boot, we keep rts as input, then switch roles here
|
||||||
|
// on leaving sleep, we toggle the same way
|
||||||
|
|
||||||
|
firstread=digitalRead(RTS_PIN);
|
||||||
|
// printf("r%02X:", firstread);
|
||||||
|
|
||||||
|
pinMode(RTS_PIN, PinDirectionOutput);
|
||||||
|
|
||||||
|
if (firstread == PinLevelHigh) {
|
||||||
|
digitalWrite(RTS_PIN, PinLevelLow);
|
||||||
|
}
|
||||||
|
_delay_ms(10);
|
||||||
|
digitalWrite(RTS_PIN, PinLevelHigh);
|
||||||
|
|
||||||
|
|
||||||
|
/* the future is Arm
|
||||||
|
if (palReadPad(RTS_PIN_IOPRT) == PinLevelLow)
|
||||||
|
{
|
||||||
|
_delay_ms(10);
|
||||||
|
palSetPadMode(RTS_PINn_IOPORT, PinDirectionOutput_PUSHPULL);
|
||||||
|
palSetPad(RTS_PORT, RTS_PIN);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
palSetPadMode(RTS_PIN_RTS_PORT, PinDirectionOutput_PUSHPULL);
|
||||||
|
palSetPad(RTS_PORT, RTS_PIN);
|
||||||
|
palClearPad(RTS_PORT, RTS_PIN);
|
||||||
|
_delay_ms(10);
|
||||||
|
palSetPad(RTS_PORT, RTS_PIN);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
_delay_ms(5);
|
||||||
|
//print("rts\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t get_serial_byte(void) {
|
||||||
|
static uint8_t code;
|
||||||
|
while(1) {
|
||||||
|
code = serial_recv();
|
||||||
|
if (code) {
|
||||||
|
debug_hex(code); debug(" ");
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t palm_handshake(void) {
|
||||||
|
// assumes something has seen DCD go high, we've toggled RTS
|
||||||
|
// and we now need to verify handshake.
|
||||||
|
// listen for up to 4 packets before giving up.
|
||||||
|
// usually I get the sequence FF FA FD
|
||||||
|
static uint8_t codeA=0;
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < 5; i++) {
|
||||||
|
codeA=get_serial_byte();
|
||||||
|
if ( 0xFA == codeA) {
|
||||||
|
if( 0xFD == get_serial_byte()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t palm_reset(void) {
|
||||||
|
print("@");
|
||||||
|
rts_reset(); // shouldn't need to power cycle.
|
||||||
|
|
||||||
|
if ( palm_handshake() ) {
|
||||||
|
last_activity = timer_read();
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
print("failed reset");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t handspring_handshake(void) {
|
||||||
|
// should be sent 15 ms after power up.
|
||||||
|
// listen for up to 4 packets before giving up.
|
||||||
|
static uint8_t codeA=0;
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < 5; i++) {
|
||||||
|
codeA=get_serial_byte();
|
||||||
|
if ( 0xF9 == codeA) {
|
||||||
|
if( 0xFB == get_serial_byte()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t handspring_reset(void) {
|
||||||
|
digitalWrite(VCC_PIN, PinLevelLow);
|
||||||
|
_delay_ms(5);
|
||||||
|
digitalWrite(VCC_PIN, PinLevelHigh);
|
||||||
|
|
||||||
|
if ( handspring_handshake() ) {
|
||||||
|
last_activity = timer_read();
|
||||||
|
disconnect_counter=0;
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
print("-HSreset");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init(void)
|
||||||
|
{
|
||||||
|
debug_enable = true;
|
||||||
|
//debug_matrix =true;
|
||||||
|
|
||||||
|
serial_init(); // arguments all #defined
|
||||||
|
|
||||||
|
#if (HANDSPRING == 0)
|
||||||
|
pins_init(); // set all inputs and outputs.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
print("power up\n");
|
||||||
|
digitalWrite(VCC_PIN, PinLevelHigh);
|
||||||
|
|
||||||
|
// wait for DCD strobe from keyboard - it will do this
|
||||||
|
// up to 3 times, then the board needs the RTS toggled to try again
|
||||||
|
|
||||||
|
#if ( HANDSPRING == 1)
|
||||||
|
if ( handspring_handshake() ) {
|
||||||
|
last_activity = timer_read();
|
||||||
|
} else {
|
||||||
|
print("failed handshake");
|
||||||
|
_delay_ms(1000);
|
||||||
|
//BUG /should/ power cycle or toggle RTS & reset, but this usually works.
|
||||||
|
}
|
||||||
|
|
||||||
|
#else /// Palm / HP device with DCD
|
||||||
|
while( digitalRead(DCD_PIN) != PinLevelHigh ) {;}
|
||||||
|
print("dcd\n");
|
||||||
|
|
||||||
|
rts_reset(); // at this point the keyboard should think all is well.
|
||||||
|
|
||||||
|
if ( palm_handshake() ) {
|
||||||
|
last_activity = timer_read();
|
||||||
|
} else {
|
||||||
|
print("failed handshake");
|
||||||
|
_delay_ms(1000);
|
||||||
|
//BUG /should/ power cycle or toggle RTS & reset, but this usually works.
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// initialize matrix state: all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||||
|
|
||||||
|
matrix_init_quantum();
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint8_t matrix_scan(void)
|
||||||
|
{
|
||||||
|
uint8_t code;
|
||||||
|
code = serial_recv();
|
||||||
|
if (!code) {
|
||||||
|
/*
|
||||||
|
disconnect_counter ++;
|
||||||
|
if (disconnect_counter > MAXDROP) {
|
||||||
|
// set all keys off
|
||||||
|
for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
// check if the keyboard is asleep.
|
||||||
|
if (timer_elapsed(last_activity) > SLEEP_TIMEOUT) {
|
||||||
|
#if(HANDSPRING ==0 )
|
||||||
|
palm_reset();
|
||||||
|
#else
|
||||||
|
handspring_reset();
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
last_activity = timer_read();
|
||||||
|
disconnect_counter=0; // if we are getting serial data, we're connected.
|
||||||
|
|
||||||
|
debug_hex(code); debug(" ");
|
||||||
|
|
||||||
|
|
||||||
|
switch (code) {
|
||||||
|
case 0xFD: // unexpected reset byte 2
|
||||||
|
print("rstD ");
|
||||||
|
return 0;
|
||||||
|
case 0xFA: // unexpected reset
|
||||||
|
print("rstA ");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (KEYUP(code)) {
|
||||||
|
if (code == last_upKey) {
|
||||||
|
// all keys are not pressed.
|
||||||
|
// Manual says to disable all modifiers left open now.
|
||||||
|
// but that could defeat sticky keys.
|
||||||
|
// BUG? dropping this byte.
|
||||||
|
last_upKey=0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// release
|
||||||
|
if (matrix_is_on(ROW(code), COL(code))) {
|
||||||
|
matrix[ROW(code)] &= ~(1<<COL(code));
|
||||||
|
last_upKey=code;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// press
|
||||||
|
if (!matrix_is_on(ROW(code), COL(code))) {
|
||||||
|
matrix[ROW(code)] |= (1<<COL(code));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
matrix_scan_quantum();
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool matrix_is_modified(void)
|
||||||
|
{
|
||||||
|
return is_modified;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool matrix_has_ghost(void)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||||
|
{
|
||||||
|
return (matrix[row] & (1<<col));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline
|
||||||
|
uint8_t matrix_get_row(uint8_t row)
|
||||||
|
{
|
||||||
|
return matrix[row];
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_print(void)
|
||||||
|
{
|
||||||
|
print("\nr/c 01234567\n");
|
||||||
|
for (uint8_t row = 0; row < matrix_rows(); row++) {
|
||||||
|
phex(row); print(": ");
|
||||||
|
pbin_reverse(matrix_get_row(row));
|
||||||
|
print("\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t matrix_key_count(void)
|
||||||
|
{
|
||||||
|
uint8_t count = 0;
|
||||||
|
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||||
|
count += bitpop(matrix[i]);
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
# Stowaway Serial keyboard to USB protocol converter
|
||||||
|
|
||||||
|
A converter for Palm Pilot era Stowaway serial keyboards.
|
||||||
|
|
||||||
|
Makes extensive use of the code from [cy384](https://github.com/cy384/ppk_usb). Ported to QMK by [milestogo](https://github.com/milestogo).
|
||||||
|
|
||||||
|
Hardware Supported: See hardware section below
|
||||||
|
Hardware Availability: self-built
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make converter/palm_usb/stowaway:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
|
|
||||||
|
## Hardware
|
||||||
|
|
||||||
|
Target MCU is ATMega32u4 but other USB capable AVRs should also work.
|
||||||
|
|
||||||
|
cy843 has a very specific way of wiring in order to fit all pins in sequence. It breaks
|
||||||
|
qmk because the Arduino softserial library uses different pins from QMK.
|
||||||
|
|
||||||
|
I've wired the pro micro hardware as follows.
|
||||||
|
|
||||||
|
Label| TX0,RX1,GND,GND,2 ,3 ,4 ,5 ,6 ,7
|
||||||
|
Palm | , , * ,GND,VCC,RX ,NC ,RTS,nc ,DCD
|
||||||
|
MCU | ,D1 ,D0 , ,C6 , ,E6
|
||||||
|
|
||||||
|
\* The RX line from the keyboard should be conected to a ~10K ohm pull down resistor to ground.
|
||||||
|
RX --|--3
|
||||||
|
10K
|
||||||
|
|
|
||||||
|
GND
|
||||||
|
|
||||||
|
|
||||||
|
Power management is not implemented yet, this just reboots the keyboard frequently.
|
||||||
|
|
||||||
|
### Keyboards:
|
||||||
|
|
||||||
|
Think Outside Stowaway Keyboards
|
||||||
|
There are at least 5 different versions of these keyboards out there.
|
||||||
|
|
||||||
|
Group 1: Palm 3, Palm 5 & HP Journada 540, and Compaq iPaq keyboards. These share
|
||||||
|
the same RTS protocol, but with different pinouts for each device.
|
||||||
|
|
||||||
|
Group 2: Handspring keyboards. These don't do handshaking protocol, and use TTL signal.
|
||||||
|
Set HANDSPRING to 1 in config.h
|
||||||
|
|
||||||
|
Group 3: IRDA models. Untested but theoretically serial.
|
||||||
|
|
||||||
|
### Connectors
|
||||||
|
|
||||||
|
See https://github.com/cy384/ppk_usb for wiring & sample 3d printable sockets.
|
||||||
|
|
||||||
|
Only Palm3 wiring has been tested.
|
||||||
|
RXD pin is output from keyboard to MCU's RX.
|
||||||
|
|
||||||
|
Viewed from left to right with the keyboard in typing position.
|
||||||
|
|
||||||
|
Palm3: [NC, VCC, RXD, RTS, NC, NC, DCD, NC, NC, GND]
|
||||||
|
Palm5: [NC, VCC, RXD, RTS, NC, NC, DCD, NC, NC, GND] (same order, different connector)
|
||||||
|
Handspring: [VCC/TXD, NC, NC, NC, GND, NC, NC, RXD]
|
||||||
|
Journada: [NC, NC, NC, GND, NC, RTS, NC, DTR/VCC, RXD, DCD, NC] [GND-IN, VCC-IN]
|
||||||
|
Ipaq: [NC, NC, DTR/VCC, NC, NC, RTS, NC, RXD, DCD, GND, NC, NC]
|
||||||
|
|
||||||
|
### Protocol
|
||||||
|
|
||||||
|
Signal: Asynchronous, Negative logic, 9600baud, No Flow control
|
||||||
|
Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit
|
||||||
|
|
||||||
|
AVR USART engine expects positive logic while stowaway keyboard signal is negative.
|
||||||
|
To use AVR UART engine you need external inverter in front of RX and TX pin.
|
||||||
|
Otherwise you can software serial routine to communicate the keyboard.
|
||||||
|
|
||||||
|
This converter uses software method, you doesn't need any inverter part.
|
||||||
|
|
||||||
|
|
||||||
|
Commands From System To Keyboard
|
||||||
|
none
|
||||||
|
|
||||||
|
Commands From Keyboard To System
|
||||||
|
|
||||||
|
0xFA Reset/Ready Response(followed by 0xFD)
|
||||||
|
|
||||||
|
References
|
||||||
|
|
||||||
|
* http://www.splorp.com/pdf/stowawayhwref.pdf
|
||||||
|
|
||||||
|
### Todo
|
||||||
|
- Test on anything but a palm 3 model keyboard.
|
||||||
|
- Change all of the soft serial to match the new Helix based code so that it is easier
|
||||||
|
to switch pins.
|
||||||
|
- The driver should check for a keyboard that pressed the delete key then disconnected.
|
||||||
|
Check every MAXDROP scans that the keyboard is there, and if not, clear the matrix.
|
||||||
|
Not implemented yet, since matrix scan is so much faster than serial.
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
MCU = atmega32u4 # Teensy 2.0
|
||||||
|
F_CPU = 16000000
|
||||||
|
ARCH = AVR8
|
||||||
|
F_USB = $(F_CPU)
|
||||||
|
|
||||||
|
# Interrupt driven control endpoint task
|
||||||
|
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||||
|
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||||
|
EXTRAKEY_ENABLE = no # Audio control and System control(+450)
|
||||||
|
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||||
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
UNICODEMAP_ENABLE = no
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
|
CUSTOM_MATRIX = yes
|
||||||
|
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
#HARDWARE_SERIAL = yes
|
||||||
|
|
||||||
|
SRC += matrix.c
|
||||||
|
|
||||||
|
ifdef HARDWARE_SERIAL
|
||||||
|
# untested with palm_usb
|
||||||
|
SRC += protocol/serial_uart.c
|
||||||
|
OPT_DEFS += -DHARDWARE_SERIAL
|
||||||
|
else
|
||||||
|
SRC += protocol/serial_soft.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
DEFAULT_FOLDER = converter/palm_usb/stowaway
|
||||||
|
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 milestogo
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layers {
|
||||||
|
_QWERTY=0,
|
||||||
|
_CDH,
|
||||||
|
_FN
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BACK, APP0,
|
||||||
|
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, APP1,
|
||||||
|
CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, APP2,
|
||||||
|
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, APP3,
|
||||||
|
LCTL, FN, LALT, CMD, SPACE,SPACE,GRAVE,DONE, DEL, LEFT, DOWN, RIGHT
|
||||||
|
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT( /* Base */
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_ESC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, TG(_CDH),
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, MO(_FN), KC_LALT, KC_LGUI, KC_SPACE,KC_SPACE,KC_GRAVE,KC_RGUI, KC_DEL, KC_LEFT,KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_CDH] = LAYOUT( /* Base */
|
||||||
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_ESC,
|
||||||
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, _______,
|
||||||
|
KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
|
||||||
|
KC_LCTL, MO(_FN), KC_LALT, KC_LGUI, KC_SPACE,KC_SPACE,KC_GRAVE,KC_RGUI, KC_DEL, KC_LEFT,KC_DOWN, KC_RIGHT
|
||||||
|
),
|
||||||
|
|
||||||
|
[_FN] = LAYOUT( // FN Key
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
};
|
||||||
Whitespace-only changes.
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2018 milestogo
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Stowaway Keyboard
|
||||||
|
based on matrix from http://www.splorp.com/pdf/stowawayhwref.pdf
|
||||||
|
|
||||||
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BACK APP0,
|
||||||
|
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, APP1,
|
||||||
|
CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, APP2,
|
||||||
|
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, APP3,
|
||||||
|
LCTL, FN, LALT, CMD, SPACE,SPACE,GRAVE,DONE, DEL, LEFT, DOWN, RIGHT
|
||||||
|
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
K000, K001, K002, K004, K005, K006, K007, K064, K065, K066, K060, K061, K062, K063,\
|
||||||
|
K031, K011, K012, K013, K014, K015, K016, K074, K075, K076, K077, K070, K071, K072, K073,\
|
||||||
|
K030, K021, K022, K023, K024, K025, K026, K084, K085, K086, K087, K080, K081, K082,\
|
||||||
|
K110, K003, K020, K054, K055, K056, K057, K094, K095, K096, K090, K111, K091, K092,\
|
||||||
|
K032, K042, K043, K010, K027, K067, K017, K097, K100, K101, K102, K103 \
|
||||||
|
) { \
|
||||||
|
{ K000, K001, K002 , K003, K004, K005, K006, K007 }, \
|
||||||
|
{ K010, K011, K012 , K013, K014, K015, K016, K017 }, \
|
||||||
|
{ K020, K021, K022 , K023, K024, K025, K026, K027 }, \
|
||||||
|
{ K030, K031, K032 , KC_NO,KC_NO, KC_NO,KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, K042 , K043, KC_NO, KC_NO,KC_NO, KC_NO }, \
|
||||||
|
{ KC_NO, KC_NO, KC_NO, KC_NO,K054, K055, K056, K057 }, \
|
||||||
|
{ K060, K061, K062 , K063, K064, K065, K066, K067 }, \
|
||||||
|
{ K070, K071, K072 , K073, K074, K075, K076, K077 }, \
|
||||||
|
{ K080, K081, K082 , KC_NO,K084, K085, K086, K087 }, \
|
||||||
|
{ K090, K091, K092 , KC_NO,K094, K095, K096, K097 }, \
|
||||||
|
{ K100, K101, K102 , K103, KC_NO, KC_NO,KC_NO, KC_NO }, \
|
||||||
|
{ K110, K111, KC_NO, KC_NO,KC_NO, KC_NO,KC_NO, KC_NO } \
|
||||||
|
}
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#define PREVENT_STUCK_MODIFIERS
|
#define PREVENT_STUCK_MODIFIERS
|
||||||
#define TAPPING_FORCE_HOLD
|
#define TAPPING_FORCE_HOLD
|
||||||
#define TAPPING_TERM 150
|
#define TAPPING_TERM 250
|
||||||
|
|
||||||
#undef RGBLED_NUM
|
#undef RGBLED_NUM
|
||||||
#define RGBLIGHT_ANIMATIONS
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
#include "ssd1306.h"
|
#include "ssd1306.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "oled_helper.h"
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
@@ -21,27 +22,35 @@ extern uint8_t is_master;
|
|||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
// entirely and just use numbers.
|
// entirely and just use numbers.
|
||||||
#define _QWERTY 0
|
enum layer_number {
|
||||||
#define _LOWER 3
|
_BASE = 0,
|
||||||
#define _RAISE 4
|
_LOWER,
|
||||||
#define _ADJUST 16
|
_RAISE,
|
||||||
|
_ADJUST,
|
||||||
|
};
|
||||||
|
|
||||||
enum custom_keycodes {
|
enum custom_keycodes {
|
||||||
LOWER = SAFE_RANGE,
|
LOWER = SAFE_RANGE,
|
||||||
RAISE,
|
RAISE,
|
||||||
ADJUST,
|
ADJUST,
|
||||||
|
KANJI,
|
||||||
RGBRST
|
RGBRST
|
||||||
};
|
};
|
||||||
|
|
||||||
#define KC______ KC_TRNS
|
enum tapdances{
|
||||||
#define KC_XXXXX KC_NO
|
TD_CODO = 0,
|
||||||
#define KC_KANJI KC_GRV
|
// TD_MNUB,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Layer Mode aliases
|
||||||
#define KC_LOWER LOWER
|
#define KC_LOWER LOWER
|
||||||
#define KC_RAISE RAISE
|
#define KC_RAISE RAISE
|
||||||
|
|
||||||
#define KC_RST RESET
|
#define KC______ KC_TRNS
|
||||||
|
#define KC_XXXXX KC_NO
|
||||||
|
#define KC_KANJI KANJI
|
||||||
|
|
||||||
|
#define KC_RST RESET
|
||||||
#define KC_LRST RGBRST
|
#define KC_LRST RGBRST
|
||||||
#define KC_LTOG RGB_TOG
|
#define KC_LTOG RGB_TOG
|
||||||
#define KC_LHUI RGB_HUI
|
#define KC_LHUI RGB_HUI
|
||||||
@@ -51,31 +60,41 @@ enum custom_keycodes {
|
|||||||
#define KC_LVAI RGB_VAI
|
#define KC_LVAI RGB_VAI
|
||||||
#define KC_LVAD RGB_VAD
|
#define KC_LVAD RGB_VAD
|
||||||
#define KC_LMOD RGB_MOD
|
#define KC_LMOD RGB_MOD
|
||||||
|
|
||||||
#define KC_KNRM AG_NORM
|
#define KC_KNRM AG_NORM
|
||||||
#define KC_KSWP AG_SWAP
|
#define KC_KSWP AG_SWAP
|
||||||
#define KC_GUAP LALT_T(KC_APP)
|
|
||||||
|
#define KC_TBSF LSFT_T(KC_TAB)
|
||||||
|
// #define KC_SPSF LSFT_T(KC_SPC)
|
||||||
|
#define KC_ALAP LALT_T(KC_APP)
|
||||||
|
|
||||||
|
#define KC_CODO TD(TD_CODO)
|
||||||
|
// #define KC_MNUB TD(TD_MNUB)
|
||||||
|
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_CODO] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_DOT),
|
||||||
|
// [TD_MNUB] = ACTION_TAP_DANCE_DOUBLE(KC_MINS, LSFT(KC_RO)),
|
||||||
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[_QWERTY] = LAYOUT_kc( \
|
[_BASE] = LAYOUT_kc( \
|
||||||
//,-----------------------------------------. ,-----------------------------------------.
|
//,-----------------------------------------. ,-----------------------------------------.
|
||||||
ESC, Q, W, E, R, T, Y, U, I, O, P, MINS,\
|
ESC, Q, W, E, R, T, Y, U, I, O, P, MINS,\
|
||||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
LSFT, A, S, D, F, G, H, J, K, L, UP, ENT,\
|
TBSF, A, S, D, F, G, H, J, K, L, UP, ENT,\
|
||||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
LCTRL, Z, X, C, V, B, N, M, COMM, LEFT, DOWN, RGHT,\
|
LCTRL, Z, X, C, V, B, N, M, CODO, LEFT, DOWN, RGHT,\
|
||||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
LGUI, LOWER, BSPC, SPC, RAISE, GUAP \
|
LGUI, LOWER, BSPC, SPC, RAISE, ALAP \
|
||||||
//`--------------------' `--------------------'
|
//`--------------------' `--------------------'
|
||||||
),
|
),
|
||||||
|
|
||||||
[_LOWER] = LAYOUT_kc( \
|
[_LOWER] = LAYOUT_kc( \
|
||||||
//,-----------------------------------------. ,-----------------------------------------.
|
//,-----------------------------------------. ,-----------------------------------------.
|
||||||
TAB, F1, F2, F3, F4, F5, XXXXX, MINS, EQL, JYEN, LBRC, RBRC,\
|
_____, F1, F2, F3, F4, F5, XXXXX, MINS, EQL, JYEN, LBRC, RBRC,\
|
||||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
_____, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, SCLN, QUOT, BSLS,\
|
_____, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, SCLN, QUOT, BSLS,\
|
||||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
_____, F11, F12, XXXXX, KANJI, ENT, XXXXX, XXXXX, COMM, DOT, SLSH, RO,\
|
_____, F11, F12, TAB, KANJI, ENT, XXXXX, XXXXX, COMM, DOT, SLSH, RO,\
|
||||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
_____, _____, DEL, _____, _____, APP \
|
_____, _____, DEL, _____, _____, APP \
|
||||||
//`--------------------' `--------------------'
|
//`--------------------' `--------------------'
|
||||||
@@ -83,11 +102,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_RAISE] = LAYOUT_kc( \
|
[_RAISE] = LAYOUT_kc( \
|
||||||
//,-----------------------------------------. ,-----------------------------------------.
|
//,-----------------------------------------. ,-----------------------------------------.
|
||||||
_____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, XXXXX,\
|
_____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, PSLS,\
|
||||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
_____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 4, 5, 6, QUOT, XXXXX,\
|
_____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, QUOT, 4, 5, 6, PPLS, PAST,\
|
||||||
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
//|------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||||
_____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 0, 1, 2, 3, DOT, XXXXX,\
|
_____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 0, 1, 2, 3, DOT, PMNS,\
|
||||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
_____, _____, BSPC, _____, _____, LALT \
|
_____, _____, BSPC, _____, _____, LALT \
|
||||||
//`--------------------' `--------------------'
|
//`--------------------' `--------------------'
|
||||||
@@ -95,152 +114,182 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_ADJUST] = LAYOUT_kc( \
|
[_ADJUST] = LAYOUT_kc( \
|
||||||
//,-----------------------------------------. ,-----------------------------------------.
|
//,-----------------------------------------. ,-----------------------------------------.
|
||||||
_____, RST, LRST, KNRM, KSWP,XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
|
_____, RST, LRST, KNRM, KSWP, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\
|
||||||
//|------+-------+------+------+------+-----| |------+------+------+------+------+------|
|
//|------+-------+------+------+------+-----| |------+------+------+------+------+------|
|
||||||
_____, LTOG, LHUI, LSAI, LVAI,XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, PGUP, XXXXX,\
|
_____, LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, PGUP, XXXXX,\
|
||||||
//|------+-------+------+------+------+-----| |------+------+------+------+------+------|
|
//|------+-------+------+------+------+-----| |------+------+------+------+------+------|
|
||||||
_____, LMOD, LHUD, LSAD, LVAD,XXXXX, XXXXX, XXXXX, XXXXX, HOME, PGDN, END,\
|
_____, LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, HOME, PGDN, END,\
|
||||||
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
//|------+------+------+------+------+------+------| |------+------+------+------+------+------+------|
|
||||||
_____, _____, XXXXX, _____, _____, XXXXX \
|
_____, _____, XXXXX, _____, _____, XXXXX \
|
||||||
//`--------------------' `--------------------'
|
//`--------------------' `--------------------'
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
int RGB_current_mode;
|
#define L_BASE _BASE
|
||||||
|
#define L_LOWER (1<<_LOWER)
|
||||||
|
#define L_RAISE (1<<_RAISE)
|
||||||
|
#define L_ADJUST (1<<_ADJUST)
|
||||||
|
#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER)
|
||||||
|
|
||||||
// Setting ADJUST layer RGB back to default
|
#ifdef SSD1306OLED
|
||||||
static inline void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
typedef struct {
|
||||||
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
|
uint8_t state;
|
||||||
layer_on(layer3);
|
char name[8];
|
||||||
} else {
|
}LAYER_DISPLAY_NAME;
|
||||||
layer_off(layer3);
|
|
||||||
|
#define LAYER_DISPLAY_MAX 5
|
||||||
|
const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
|
||||||
|
{L_BASE, "Base"},
|
||||||
|
{L_BASE + 1, "Base"},
|
||||||
|
{L_LOWER, "Lower"},
|
||||||
|
{L_RAISE, "Raise"},
|
||||||
|
{L_ADJUST_TRI, "Adjust"}
|
||||||
|
};
|
||||||
|
|
||||||
|
static inline const char* get_leyer_status(void) {
|
||||||
|
|
||||||
|
for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) {
|
||||||
|
if (layer_state == 0 && layer_display_name[i].state == default_layer_state) {
|
||||||
|
|
||||||
|
return layer_display_name[i].name;
|
||||||
|
} else if (layer_state != 0 && layer_display_name[i].state == layer_state) {
|
||||||
|
|
||||||
|
return layer_display_name[i].name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return "?";
|
||||||
|
}
|
||||||
|
|
||||||
|
static char layer_status_buf[24] = "Layer state ready.\n";
|
||||||
|
static inline void update_keymap_status(void) {
|
||||||
|
|
||||||
|
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n",
|
||||||
|
keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status());
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void render_keymap_status(struct CharacterMatrix *matrix) {
|
||||||
|
|
||||||
|
matrix_write(matrix, layer_status_buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define UPDATE_KEYMAP_STATUS() update_keymap_status()
|
||||||
|
#define RENDER_KEYMAP_STATUS(a) render_keymap_status(a)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define UPDATE_KEYMAP_STATUS()
|
||||||
|
#define RENDER_KEYMAP_STATUS(a)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline void update_change_layer(bool pressed, uint8_t layer1, uint8_t layer2, uint8_t layer3) {
|
||||||
|
|
||||||
|
pressed ? layer_on(layer1) : layer_off(layer1);
|
||||||
|
IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2) ? layer_on(layer3) : layer_off(layer3);
|
||||||
|
}
|
||||||
|
|
||||||
|
int RGB_current_mode;
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
UPDATE_KEY_STATUS(keycode, record);
|
||||||
|
|
||||||
|
bool result = false;
|
||||||
|
switch (keycode) {
|
||||||
|
case LOWER:
|
||||||
|
update_change_layer(record->event.pressed, _LOWER, _RAISE, _ADJUST);
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
update_change_layer(record->event.pressed, _RAISE, _LOWER, _ADJUST);
|
||||||
|
break;
|
||||||
|
case KANJI:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
if (keymap_config.swap_lalt_lgui == false) {
|
||||||
|
register_code(KC_LANG2);
|
||||||
|
} else {
|
||||||
|
SEND_STRING(SS_LALT("`"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_LANG2);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
case RGB_MOD:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
rgblight_mode(RGB_current_mode);
|
||||||
|
rgblight_step();
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case RGBRST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
eeconfig_update_rgblight_default();
|
||||||
|
rgblight_enable();
|
||||||
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
UPDATE_KEYMAP_STATUS();
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
RGB_current_mode = rgblight_config.mode;
|
RGB_current_mode = rgblight_config.mode;
|
||||||
#endif
|
#endif
|
||||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
iota_gfx_init(!has_usb()); // turns on the display
|
iota_gfx_init(!has_usb()); // turns on the display
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
|
|
||||||
|
|
||||||
// When add source files to SRC in rules.mk, you can use functions.
|
|
||||||
const char *read_layer_state(void);
|
|
||||||
const char *read_logo(void);
|
|
||||||
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
|
||||||
const char *read_keylog(void);
|
|
||||||
const char *read_keylogs(void);
|
|
||||||
|
|
||||||
// const char *read_mode_icon(bool swap);
|
|
||||||
// const char *read_host_led_state(void);
|
|
||||||
// void set_timelog(void);
|
|
||||||
// const char *read_timelog(void);
|
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
const char *read_rgb_info(void);
|
|
||||||
#define RENDER_RGB_INFO(m) matrix_write_ln(m, (const char*)read_rgb_info())
|
|
||||||
#else
|
|
||||||
#define RENDER_RGB_INFO(m)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
iota_gfx_task();
|
iota_gfx_task(); // this is what updates the display continuously
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void matrix_render_user(struct CharacterMatrix *matrix) {
|
static inline void matrix_update(struct CharacterMatrix *dest,
|
||||||
if (is_master) {
|
const struct CharacterMatrix *source) {
|
||||||
// If you want to change the display of OLED, you need to change here
|
|
||||||
matrix_write_ln(matrix, read_layer_state());
|
|
||||||
matrix_write_ln(matrix, read_keylog());
|
|
||||||
RENDER_RGB_INFO(matrix);
|
|
||||||
// matrix_write_ln(matrix, read_keylogs());
|
|
||||||
// matrix_write_ln(matrix, read_host_led_state());
|
|
||||||
|
|
||||||
// matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
|
||||||
// matrix_write_ln(matrix, read_timelog());
|
|
||||||
} else {
|
|
||||||
matrix_write(matrix, read_logo());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
|
||||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||||
dest->dirty = true;
|
dest->dirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void render_status(struct CharacterMatrix *matrix) {
|
||||||
|
|
||||||
|
UPDATE_LED_STATUS();
|
||||||
|
RENDER_LED_STATUS(matrix);
|
||||||
|
RENDER_KEYMAP_STATUS(matrix);
|
||||||
|
UPDATE_LOCK_STATUS();
|
||||||
|
RENDER_LOCK_STATUS(matrix);
|
||||||
|
RENDER_KEY_STATUS(matrix);
|
||||||
|
}
|
||||||
|
|
||||||
void iota_gfx_task_user(void) {
|
void iota_gfx_task_user(void) {
|
||||||
struct CharacterMatrix matrix;
|
struct CharacterMatrix matrix;
|
||||||
|
|
||||||
|
#if DEBUG_TO_SCREEN
|
||||||
|
if (debug_enable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
matrix_clear(&matrix);
|
matrix_clear(&matrix);
|
||||||
matrix_render_user(&matrix);
|
if (is_master) {
|
||||||
|
render_status(&matrix);
|
||||||
|
} else {
|
||||||
|
RENDER_LOGO(&matrix);
|
||||||
|
}
|
||||||
|
|
||||||
matrix_update(&display, &matrix);
|
matrix_update(&display, &matrix);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
#ifdef SSD1306OLED
|
|
||||||
if (record->event.pressed) {
|
|
||||||
set_keylog(keycode, record);
|
|
||||||
// set_timelog();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (keycode) {
|
|
||||||
case LOWER:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_on(_LOWER);
|
|
||||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
|
||||||
} else {
|
|
||||||
layer_off(_LOWER);
|
|
||||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case RAISE:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_on(_RAISE);
|
|
||||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
|
||||||
} else {
|
|
||||||
layer_off(_RAISE);
|
|
||||||
update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case ADJUST:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
layer_on(_ADJUST);
|
|
||||||
} else {
|
|
||||||
layer_off(_ADJUST);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
case RGB_MOD:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
rgblight_mode(RGB_current_mode);
|
|
||||||
rgblight_step();
|
|
||||||
RGB_current_mode = rgblight_config.mode;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case RGBRST:
|
|
||||||
if (record->event.pressed) {
|
|
||||||
eeconfig_update_rgblight_default();
|
|
||||||
rgblight_enable();
|
|
||||||
RGB_current_mode = rgblight_config.mode;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
#ifdef SSD1306OLED
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "ssd1306.h"
|
||||||
|
|
||||||
|
void render_logo(struct CharacterMatrix *matrix) {
|
||||||
|
|
||||||
|
const char logo_buf[]={
|
||||||
|
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
|
||||||
|
0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||||
|
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
|
||||||
|
0};
|
||||||
|
|
||||||
|
matrix_write(matrix, logo_buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
static char keylog_buf[24] = "Key state ready.";
|
||||||
|
const char code_to_name[60] = {
|
||||||
|
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||||
|
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||||
|
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||||
|
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||||
|
'R', 'E', 'B', 'T', ' ', '-', ' ', '@', ' ', ' ',
|
||||||
|
' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '};
|
||||||
|
|
||||||
|
void update_key_status(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
|
if (!record->event.pressed) return;
|
||||||
|
|
||||||
|
char name = (keycode < 60) ? code_to_name[keycode] : ' ';
|
||||||
|
snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c",
|
||||||
|
record->event.key.row, record->event.key.col,
|
||||||
|
(uint16_t)keycode, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void render_key_status(struct CharacterMatrix *matrix) {
|
||||||
|
|
||||||
|
matrix_write(matrix, keylog_buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
static char lock_buf[24] = "Lock state ready.\n";
|
||||||
|
void update_lock_status(void) {
|
||||||
|
|
||||||
|
uint8_t leds = host_keyboard_leds();
|
||||||
|
char *num_lock = (leds & (1<<USB_LED_NUM_LOCK)) ? "Num" : "";
|
||||||
|
char *caps_lock = (leds & (1<<USB_LED_CAPS_LOCK)) ? "Caps" : "";
|
||||||
|
char *scrl_lock = (leds & (1<<USB_LED_SCROLL_LOCK)) ? "Scrn" : "";
|
||||||
|
snprintf(lock_buf, sizeof(lock_buf) - 1, "Lock:%s %s %s\n",
|
||||||
|
num_lock, caps_lock, scrl_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
void render_lock_status(struct CharacterMatrix *matrix) {
|
||||||
|
|
||||||
|
matrix_write(matrix, lock_buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
|
||||||
|
static char led_buf[24] = "LED state ready.\n";
|
||||||
|
rgblight_config_t rgblight_config_bak;
|
||||||
|
void update_led_status(void) {
|
||||||
|
|
||||||
|
if (rgblight_config_bak.enable != rgblight_config.enable ||
|
||||||
|
rgblight_config_bak.mode != rgblight_config.mode ||
|
||||||
|
rgblight_config_bak.hue != rgblight_config.hue ||
|
||||||
|
rgblight_config_bak.sat != rgblight_config.sat ||
|
||||||
|
rgblight_config_bak.val != rgblight_config.val
|
||||||
|
) {
|
||||||
|
snprintf(led_buf, sizeof(led_buf) - 1, "LED%c:%2d hsv:%2d %2d %2d\n",
|
||||||
|
rgblight_config.enable ? '*' : '.', (uint8_t)rgblight_config.mode,
|
||||||
|
(uint8_t)(rgblight_config.hue / RGBLIGHT_HUE_STEP),
|
||||||
|
(uint8_t)(rgblight_config.sat / RGBLIGHT_SAT_STEP),
|
||||||
|
(uint8_t)(rgblight_config.val / RGBLIGHT_VAL_STEP));
|
||||||
|
rgblight_config_bak = rgblight_config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void render_led_status(struct CharacterMatrix *matrix) {
|
||||||
|
|
||||||
|
matrix_write(matrix, led_buf);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
#ifdef SSD1306OLED
|
||||||
|
|
||||||
|
void render_logo(struct CharacterMatrix *matrix);
|
||||||
|
void update_key_status(uint16_t keycode, keyrecord_t *record);
|
||||||
|
void render_key_status(struct CharacterMatrix *matrix);
|
||||||
|
void update_lock_status(void);
|
||||||
|
void render_lock_status(struct CharacterMatrix *matrix);
|
||||||
|
|
||||||
|
#define RENDER_LOGO(a) render_logo(a)
|
||||||
|
#define UPDATE_KEY_STATUS(a, b) update_key_status(a, b)
|
||||||
|
#define RENDER_KEY_STATUS(a) render_key_status(a)
|
||||||
|
#define UPDATE_LOCK_STATUS() update_lock_status()
|
||||||
|
#define RENDER_LOCK_STATUS(a) render_lock_status(a)
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
void update_led_status(void);
|
||||||
|
void render_led_status(struct CharacterMatrix *matrix);
|
||||||
|
#define UPDATE_LED_STATUS() update_led_status()
|
||||||
|
#define RENDER_LED_STATUS(a) render_led_status(a)
|
||||||
|
#else
|
||||||
|
#define UPDATE_LED_STATUS()
|
||||||
|
#define RENDER_LED_STATUS(a)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define RENDER_LOGO(a)
|
||||||
|
#define UPDATE_KEY_STATUS(a, b)
|
||||||
|
#define RENDER_KEY_STATUS(a)
|
||||||
|
#define UPDATE_LOCK_STATUS()
|
||||||
|
#define RENDER_LOCK_STATUS(a)
|
||||||
|
#define UPDATE_LED_STATUS()
|
||||||
|
#define RENDER_LED_STATUS(a)
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -14,18 +14,19 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
TAP_DANCE_ENABLE = yes
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
||||||
|
Link_Time_Optimization = yes # if firmware size over limit, try this option
|
||||||
|
|
||||||
|
ifeq ($(strip $(Link_Time_Optimization)),yes)
|
||||||
|
EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization
|
||||||
|
endif
|
||||||
|
|
||||||
# If you want to change the display of OLED, you need to change here
|
# If you want to change the display of OLED, you need to change here
|
||||||
SRC += ./lib/glcdfont.c \
|
SRC += ./lib/glcdfont.c \
|
||||||
./lib/rgb_state_reader.c \
|
oled_helper.c \
|
||||||
./lib/layer_state_reader.c \
|
|
||||||
./lib/logo_reader.c \
|
|
||||||
./lib/keylogger.c \
|
|
||||||
# ./lib/mode_icon_reader.c \
|
|
||||||
# ./lib/host_led_state_reader.c \
|
|
||||||
# ./lib/timelogger.c \
|
|
||||||
@@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP,
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP,
|
||||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_FNLT, KC_RADN, KC_RCRT
|
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_FNLT, KC_RADN, KC_RCRT
|
||||||
),
|
),
|
||||||
[_FL] =LAYOUT_60_ansi(
|
[_FL] = LAYOUT_60_ansi(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
|
||||||
_______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, RESET,
|
_______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, RESET,
|
||||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______,
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______,
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
#pragma once
|
||||||
@@ -0,0 +1,229 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "ishtob.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* Qwerty
|
||||||
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
|
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | DEL |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
|
* | Tab | Q | W | E | R | T | 7 | 8 | 9 | Y | U | I | O | P | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | LCTL | A | S | D | F | G | 4 | 5 | 6 | H | J | K | L | ;/Nav|Ctl/Et|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | 1 | 2 | 3 | N | M | , | . | / | - |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Esc | Ctrl | GUI | Alt |Lower |Space | 0 | . | = |Space |Raise | Alt | NumL | App | Del |
|
||||||
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_QWERTY] = LAYOUT_wrapper(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\
|
||||||
|
KC_TAB, _________________QWERTY_L1_________________, KC_P7, KC_P8, KC_P9, _________________QWERTY_R1_________________, KC_BSPC, \
|
||||||
|
KC_CAPS, _________________QWERTY_L2_________________, KC_P4, KC_P5, KC_P6, _________________QWERTY_R2_________________, CTL_ENT, \
|
||||||
|
KC_LSFT, _________________QWERTY_L3_________________, KC_P1, KC_P2, KC_P3, _________________QWERTY_R3_________________, LT_RAI(KC_MINS), \
|
||||||
|
KC_ESC, KC_LCTRL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Colemak
|
||||||
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
|
* | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | 0 | - |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
|
* | Tab | Q | W | F | P | G | 7 | 8 | 9 | J | L | U | Y | ; | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------|
|
||||||
|
* | CAPS | A | R | S | T | D | 4 | 5 | 6 | H | N | E | I | O |Ctl/Et|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| Z | X | C | V | B | 1 | 2 | 3 | K | M | , | . | / | - |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Esc | Ctrl | GUI | Alt |Lower |Space | 0 | . | = |Space |Raise | Alt | NumL | App | Del |
|
||||||
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_COLEMAK] = LAYOUT_wrapper(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\
|
||||||
|
KC_TAB, _________________COLEMAK_L1________________, KC_P7, KC_P8, KC_P9, _________________COLEMAK_R1________________, KC_BSPC, \
|
||||||
|
KC_LCTRL, _________________COLEMAK_L2________________, KC_P4, KC_P5, KC_P6, _________________COLEMAK_R2________________, CTL_ENT, \
|
||||||
|
KC_LSFT, _________________COLEMAK_L3________________, KC_P1, KC_P2, KC_P3, _________________COLEMAK_R3________________, LT_RAI(KC_MINS), \
|
||||||
|
KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Dvorak
|
||||||
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
|
* | Tab | " | , | . | P | Y | 7 | 8 | 9 | F | G | C | R | L | Bksp |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Esc | A | O | E | U | I | 4 | 5 | 6 | D | H | T | N | S | / |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Shift| ; | Q | J | K | X | 1 | 2 | 3 | B | M | W | V | Z |Ctl/Et|
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Esc | Ctrl | GUI | Alt |Lower |Space | 0 | . | = |Space |Raise | Alt | NumL | App | Del |
|
||||||
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_DVORAK] = LAYOUT_wrapper(
|
||||||
|
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,\
|
||||||
|
KC_TAB, _________________DVORAK_L1_________________, KC_P7, KC_P8, KC_P9, _________________DVORAK_R1_________________, KC_BSPC, \
|
||||||
|
KC_LCTL, _________________DVORAK_L2_________________, KC_P4, KC_P5, KC_P6, _________________DVORAK_R2_________________, CTL_ENT, \
|
||||||
|
KC_LSFT, _________________DVORAK_L3_________________, KC_P1, KC_P2, KC_P3, _________________DVORAK_R3_________________, LT_RAI(KC_MINS), \
|
||||||
|
KC_ESC, KC_CAPS, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P0, KC_DOT, KC_EQL, KC_SPC, RAISE, KC_RALT, TG_NUMLAY, KC_APP, KC_DEL \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Lower
|
||||||
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
|
* | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | _ | + | { | } | | |
|
||||||
|
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_LOWER] = LAYOUT_wrapper(
|
||||||
|
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_DEL, \
|
||||||
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Raise
|
||||||
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
|
* | ` | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
|
* |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------|
|
||||||
|
* | Del | F1 | F2 | F3 | F4 | F5 | | | | F6 | - | = | [ | ] | \ |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||||
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_RAISE] = LAYOUT_wrapper(
|
||||||
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||||
|
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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
|
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_SPC, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Mouse Layer (semi-col)
|
||||||
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
|
* | ACCL0| ACCL1| ACCL2| | | | | | | | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
|
* | | | | | | | | | Home | Wh_Up| WHL_L| M_Up | WHL_R| Macro| |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | End | Wh_Dn| M_Lft| M_Dn | M_Rt | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | BTN2 | BTN3 | BTN4 | BTN5 | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | BTN1 | | | | BTN1 | | | | | |
|
||||||
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_MOUSECURSOR] = LAYOUT_wrapper(
|
||||||
|
KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
|
_______, _______, _______, M_EMAIL,M_EMAIL2, _______, _______, _______, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, P_MPASS, P_META, \
|
||||||
|
_______, _______, _______, _______, O_RTQ6H, _______, _______, _______, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, O_DAYRN, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, \
|
||||||
|
_______, _______, _______, _______, _______, KC_BTN1, _______, _______, _______, KC_BTN1, _______, _______, _______, P_CITRIX, O_AUTODC \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* Adjust (Lower + Raise)
|
||||||
|
* ,------+------+------+------+------+------------------------------------------------.
|
||||||
|
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+--------------------.
|
||||||
|
* | Reset|RGB TG|RGB ST|RGBH -|RGBH +|RGBS -|RGBS +|RGBV -|RGBV +| | | | | | Del |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | |Aud on|Audoff|AGnorm| | | |AGswap|Qwerty|Colemk| | | |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | |Voice-|Voice+|Mus on|Musoff| | | | | | | | BL + |BL ST |BL TG |
|
||||||
|
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
* | | | | | | | | | | | | | | | |
|
||||||
|
* `--------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
[_ADJUST] = LAYOUT_wrapper(
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
|
||||||
|
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
|
||||||
|
_______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
|
||||||
|
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG\
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case QWERTY:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case COLEMAK:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_COLEMAK);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||||
|
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||||
|
layer_on(_LOWER);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
//not sure how to have keyboard check mode and set it to a variable, so my work around
|
||||||
|
//uses another variable that would be set to true after the first time a reactive key is pressed.
|
||||||
|
layer_on(_RAISE);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case BACKLIT:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
register_code(KC_RSFT);
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
|
backlight_step();
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
unregister_code(KC_RSFT);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool music_mask_user(uint16_t keycode) {
|
||||||
|
switch (keycode) {
|
||||||
|
case RAISE:
|
||||||
|
case LOWER:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_keymap(void) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_scan_keymap(void) {
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# The Default Hadron Layout
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
#include "MS_sculpt_mobile.h"
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
#ifndef CONFIG_USER_H
|
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../../MS_sculpt_mobile/config.h"
|
|
||||||
|
|
||||||
// place overrides here
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# The default keymap for microsoft-sculpt-mobile
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
# A more programmer oriented keymap for microsoft-sculpt-mobile
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
|
|
||||||
This is a way to take a Microsoft ergonomic bluetooth keyboard, and make it
|
|
||||||
into a hard-wired keyboard running QMK.
|
|
||||||
|
|
||||||
The keyboard is known under several different names:
|
|
||||||
Mobile Bluetooth 5000, Mobile 6000, Sculpt mobile, and Asus rebranded
|
|
||||||
|
|
||||||
I had a stack of them,since they're cheap on ebay, travel well, and are just ergo enough.
|
|
||||||
|
|
||||||
The ribbon cable is 1mm pitch, which is hard to hand solder. I bought a cheap set of
|
|
||||||
"pitch adapter" boards https://www.amazon.com/Double-Sided-0-4mm-1-0-Adapter-60mmx38mm/dp/B00OK42118
|
|
||||||
|
|
||||||
Cut the original ribbon cable sockets off the bluetooth board using a razor, they're hard to desolder.
|
|
||||||
They're also allow the cable to be inserted on top or bottom.
|
|
||||||
|
|
||||||
If I was going to do it again, I'd make the MCU connection come out the top of the keyboard
|
|
||||||
and avoid the wires dangling out the bottom.
|
|
||||||
|
|
||||||
As I was debugging the matrix, I started to get random failures. In desparation I tried a second MCU,
|
|
||||||
but had the same problems. It turns out that the ribbon cable connections can get worn. Shave a
|
|
||||||
half millimeter off the end of the ribbon cable & the errors go away.
|
|
||||||
|
|
||||||
My method for discovering the matrix was to set up a KEYMAP macro that included all pins.
|
|
||||||
See MATRIX_TESTING_KEYMAP if you need it. Then set up a keymap that has all printable symbols
|
|
||||||
in the first 4 rows. test each key & record output. Then switch the printable symbols to the
|
|
||||||
bottom 4 rows & repeat. This was enough to show the matrix.
|
|
||||||
|
|
||||||
|
|
||||||
The full original keymap for the sculpt is
|
|
||||||
A B C D E F G H --->
|
|
||||||
0 b n m , . /
|
|
||||||
1 g h "
|
|
||||||
2 7 8 9 0 Del PgUp
|
|
||||||
3 p [ ] \
|
|
||||||
4 y u i o
|
|
||||||
5 ~ - += j k l ; 5
|
|
||||||
6 a s d q w e, Up left
|
|
||||||
7 F7 F8 F9 F10 F11 F12 f
|
|
||||||
|
|
||||||
-----> I J K L M N O P Q R
|
|
||||||
0 Caps FN
|
|
||||||
1 Vol+ mute Rctl vol- pgdn LCTL
|
|
||||||
2 Rshift LShift
|
|
||||||
3 Ralt LAlt
|
|
||||||
4 LGUI
|
|
||||||
5 6 bakspc 1 2 3 4 F4 F5 F6
|
|
||||||
6 Down right spc F1 F2 F3 tab
|
|
||||||
7 r t z x c v enter Esc
|
|
||||||
|
|
||||||
This works with 18 cols + 8 rows on a Teensy++, or Arm based Teensy.
|
|
||||||
|
|
||||||
The Astar mini has all pins exposed , so you can do 18x8
|
|
||||||
If you want a speaker, LEDs &etc, you'll need to free up a pin. I recommend joining columns
|
|
||||||
R and L to the same pin.
|
|
||||||
|
|
||||||
Building - add ASTAR=1 to the compile line or leave out for teensy2++
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3,19 +3,19 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#define KEYMAP( \
|
#define LAYOUT( \
|
||||||
k00, k01, k02, k03, \
|
k00, k01, k02, k03, \
|
||||||
k10, k11, k12, k13, \
|
k10, k11, k12, k13, \
|
||||||
k20, k21, k22, \
|
k20, k21, k22, \
|
||||||
k30, k31, k32, \
|
k30, k31, k32, \
|
||||||
k41, k42, k43 \
|
k41, k42, k43 \
|
||||||
) \
|
) \
|
||||||
{ \
|
{ \
|
||||||
{ k00, k01, k02, k03}, \
|
{ k00, k01, k02, k03 }, \
|
||||||
{ k10, k11, k12, k13}, \
|
{ k10, k11, k12, k13 }, \
|
||||||
{ k20, k21, k22, KC_NO}, \
|
{ k20, k21, k22, KC_NO }, \
|
||||||
{ k30, k31, k32, KC_NO}, \
|
{ k30, k31, k32, KC_NO }, \
|
||||||
{ KC_NO, k41, k42, k43} \
|
{ KC_NO, k41, k42, k43 } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "gamenum",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 4,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Fn", "x":0, "y":0},
|
||||||
|
{"label":"/", "x":1, "y":0},
|
||||||
|
{"label":"*", "x":2, "y":0},
|
||||||
|
{"label":"-", "x":3, "y":0},
|
||||||
|
{"label":"7", "x":0, "y":1},
|
||||||
|
{"label":"8", "x":1, "y":1},
|
||||||
|
{"label":"9", "x":2, "y":1},
|
||||||
|
{"label":"+", "x":3, "y":1, "h":2},
|
||||||
|
{"label":"4", "x":0, "y":2},
|
||||||
|
{"label":"5", "x":1, "y":2},
|
||||||
|
{"label":"6", "x":2, "y":2},
|
||||||
|
{"label":"1", "x":0, "y":3},
|
||||||
|
{"label":"2", "x":1, "y":3},
|
||||||
|
{"label":"3", "x":2, "y":3},
|
||||||
|
{"label":"0", "x":0, "y":4, "w":2},
|
||||||
|
{"label":".", "x":2, "y":4},
|
||||||
|
{"label":"Ent", "x":3, "y":3, "h":2}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,36 +1,32 @@
|
|||||||
#include "gamenum.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
|
|
||||||
#define DEF 0
|
#define DEF 0
|
||||||
#define HDN 1
|
#define HDN 1
|
||||||
#define OSY 2
|
#define OSY 2
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[DEF] = KEYMAP(
|
[DEF] = LAYOUT(
|
||||||
KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
|
KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
|
||||||
KC_7, KC_8, KC_9, KC_PLUS, \
|
KC_7, KC_8, KC_9, KC_PLUS, \
|
||||||
KC_4, KC_5, KC_6, \
|
KC_4, KC_5, KC_6, \
|
||||||
KC_1, KC_2, KC_3, \
|
KC_1, KC_2, KC_3, \
|
||||||
KC_0, KC_DOT, KC_ENT \
|
KC_0, KC_DOT, KC_ENT \
|
||||||
),
|
),
|
||||||
[HDN] = KEYMAP(
|
[HDN] = LAYOUT(
|
||||||
KC_FN1, KC_1, KC_2, KC_3, \
|
KC_FN1, KC_1, KC_2, KC_3, \
|
||||||
KC_Q, KC_W, KC_E, KC_R, \
|
KC_Q, KC_W, KC_E, KC_R, \
|
||||||
KC_A, KC_S, KC_D, \
|
KC_A, KC_S, KC_D, \
|
||||||
KC_Z, KC_X, KC_C, \
|
KC_Z, KC_X, KC_C, \
|
||||||
KC_LSFT, KC_LALT, KC_SPC \
|
KC_LSFT, KC_LALT, KC_SPC \
|
||||||
),
|
),
|
||||||
[OSY] = KEYMAP(
|
[OSY] = LAYOUT(
|
||||||
KC_A, KC_Q, KC_1, KC_FN2, \
|
KC_A, KC_Q, KC_1, KC_FN2, \
|
||||||
KC_S, KC_W, KC_2, KC_LALT, \
|
KC_S, KC_W, KC_2, KC_LALT, \
|
||||||
KC_D, KC_E, KC_3, \
|
KC_D, KC_E, KC_3, \
|
||||||
KC_F, KC_R, KC_4, \
|
KC_F, KC_R, KC_4, \
|
||||||
KC_SPC, KC_T, KC_TAB \
|
KC_SPC, KC_T, KC_TAB \
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -48,21 +44,21 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||||
switch(keycode) {
|
switch(keycode) {
|
||||||
case KC_FN0:
|
case KC_FN0:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
PORTC |= (1 << 6); // PC6 goes high
|
PORTC |= (1 << 6); // PC6 goes high
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KC_FN1:
|
case KC_FN1:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
PORTC &= ~(1 << 6); // PC6 goes high
|
PORTC &= ~(1 << 6); // PC6 goes high
|
||||||
PORTD |= (1<<4);
|
PORTD |= (1<<4);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KC_FN2:
|
case KC_FN2:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
PORTD &= ~(1 << 4); // PC6 goes high
|
PORTD &= ~(1 << 4); // PC6 goes high
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,16 @@
|
|||||||
GameNum firmware
|
# GameNum
|
||||||
======================
|
|
||||||
|
A handwired standard numpad oriented toward gaming on the go.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
|
||||||
|
Hardware Supported: GameNum, Pro Micro
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/gamenum:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
## Board overview
|
## Board overview
|
||||||
|
|
||||||
The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited.
|
The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited.
|
||||||
@@ -22,7 +33,7 @@ The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high
|
|||||||
|
|
||||||
Keep in mind that the minus of the diodes should point towards the pro micros inputs.
|
Keep in mind that the minus of the diodes should point towards the pro micros inputs.
|
||||||
|
|
||||||
##LED hookup
|
## LED hookup
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -34,13 +45,13 @@ Keep in mind here that the number after the name should correspond with the numb
|
|||||||
Next thing to do is to add the actual layer for the keymap.
|
Next thing to do is to add the actual layer for the keymap.
|
||||||
|
|
||||||
```
|
```
|
||||||
[DEF] = KEYMAP(
|
[DEF] = LAYOUT(
|
||||||
KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
|
KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \
|
||||||
KC_7, KC_8, KC_9, KC_PLUS, \
|
KC_7, KC_8, KC_9, KC_PLUS, \
|
||||||
KC_4, KC_5, KC_6, \
|
KC_4, KC_5, KC_6, \
|
||||||
KC_1, KC_2, KC_3, \
|
KC_1, KC_2, KC_3, \
|
||||||
KC_0, KC_DOT, KC_ENT \
|
KC_0, KC_DOT, KC_ENT \
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D:
|
This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D:
|
||||||
@@ -54,8 +65,8 @@ Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate
|
|||||||
Look for this piece of code:
|
Look for this piece of code:
|
||||||
|
|
||||||
```
|
```
|
||||||
DDRD |= (1<<4);
|
DDRD |= (1<<4);
|
||||||
PORTD &= ~(1<<4);
|
PORTD &= ~(1<<4);
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<<y);` defines that pin as an output. `PORTx &= ~(1<<y);` sets the pin to LOW turning off the LED.
|
Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<<y);` defines that pin as an output. `PORTx &= ~(1<<y);` sets the pin to LOW turning off the LED.
|
||||||
@@ -64,39 +75,11 @@ Now go back to `keymap.c` and look for the `process_record_user` function. The f
|
|||||||
|
|
||||||
```
|
```
|
||||||
case KC_FN1:
|
case KC_FN1:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
PORTC &= ~(1 << 6); // PC6 goes low
|
PORTC &= ~(1 << 6); // PC6 goes low
|
||||||
PORTD |= (1<<4); //PD4 goes high
|
PORTD |= (1<<4); //PD4 goes high
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
```
|
```
|
||||||
|
|
||||||
This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit.
|
This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit.
|
||||||
|
|
||||||
|
|
||||||
## Quantum MK Firmware
|
|
||||||
|
|
||||||
For the full Quantum feature list, see [the parent readme.md](/docs/README.md).
|
|
||||||
|
|
||||||
## Building
|
|
||||||
|
|
||||||
Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder.
|
|
||||||
Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with.
|
|
||||||
Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you.
|
|
||||||
Once your dev env is set up, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file.
|
|
||||||
|
|
||||||
### Default
|
|
||||||
|
|
||||||
To build with the default keymap, simply run `make`.
|
|
||||||
|
|
||||||
### Other Keymaps
|
|
||||||
|
|
||||||
To build the firmware binary hex file with a keymap just do `make` with `keymap` option like:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ make keymap=[default|jack|<name>]
|
|
||||||
```
|
|
||||||
|
|
||||||
Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/`
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Minorca Handwired",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 12,
|
||||||
|
"height": 4,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"KA00", "x":0, "y":0},
|
||||||
|
{"label":"KA01", "x":1, "y":0},
|
||||||
|
{"label":"KA02", "x":2, "y":0},
|
||||||
|
{"label":"KA03", "x":3, "y":0},
|
||||||
|
{"label":"KA04", "x":4, "y":0},
|
||||||
|
{"label":"KA05", "x":5, "y":0},
|
||||||
|
{"label":"KA06", "x":6, "y":0},
|
||||||
|
{"label":"KA07", "x":7, "y":0},
|
||||||
|
{"label":"KA08", "x":8, "y":0},
|
||||||
|
{"label":"KA09", "x":9, "y":0},
|
||||||
|
{"label":"KA10", "x":10, "y":0},
|
||||||
|
{"label":"KA11", "x":11, "y":0},
|
||||||
|
{"label":"KB00", "x":0, "y":1, "w":1.25},
|
||||||
|
{"label":"KB01", "x":1.25, "y":1},
|
||||||
|
{"label":"KB02", "x":2.25, "y":1},
|
||||||
|
{"label":"KB03", "x":3.25, "y":1},
|
||||||
|
{"label":"KB04", "x":4.25, "y":1},
|
||||||
|
{"label":"KB05", "x":5.25, "y":1},
|
||||||
|
{"label":"KB06", "x":6.25, "y":1},
|
||||||
|
{"label":"KB07", "x":7.25, "y":1},
|
||||||
|
{"label":"KB08", "x":8.25, "y":1},
|
||||||
|
{"label":"KB09", "x":9.25, "y":1},
|
||||||
|
{"label":"KB11", "x":10.25, "y":1, "w":1.75},
|
||||||
|
{"label":"KC00", "x":0, "y":2, "w":1.75},
|
||||||
|
{"label":"KC02", "x":1.75, "y":2},
|
||||||
|
{"label":"KC03", "x":2.75, "y":2},
|
||||||
|
{"label":"KC04", "x":3.75, "y":2},
|
||||||
|
{"label":"KC05", "x":4.75, "y":2},
|
||||||
|
{"label":"KC06", "x":5.75, "y":2},
|
||||||
|
{"label":"KC07", "x":6.75, "y":2},
|
||||||
|
{"label":"KC08", "x":7.75, "y":2},
|
||||||
|
{"label":"KC09", "x":8.75, "y":2},
|
||||||
|
{"label":"KC10", "x":9.75, "y":2},
|
||||||
|
{"label":"KC11", "x":10.75, "y":2, "w":1.25},
|
||||||
|
{"label":"KD00", "x":0, "y":3, "w":1.25},
|
||||||
|
{"label":"KD02", "x":1.25, "y":3, "w":1.25},
|
||||||
|
{"label":"KD03", "x":2.5, "y":3, "w":1.25},
|
||||||
|
{"label":"KD04", "x":3.75, "y":3, "w":2.25},
|
||||||
|
{"label":"KD07", "x":6, "y":3, "w":2.25},
|
||||||
|
{"label":"KD09", "x":8.25, "y":3, "w":1.25},
|
||||||
|
{"label":"KD10", "x":9.5, "y":3},
|
||||||
|
{"label":"KD11", "x":10.5, "y":3, "w":1.5}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
#include "minorca.h"
|
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
@@ -10,33 +7,23 @@ extern keymap_config_t keymap_config;
|
|||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||||
// entirely and just use numbers.
|
// entirely and just use numbers.
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = { /* Base */
|
[0] = LAYOUT( /* Base */
|
||||||
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_ENT },
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, \
|
||||||
{KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_FN1, KC_FN0 },
|
KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, MO(2), MO(1), \
|
||||||
{KC_NO, XXXXXXX, KC_NO, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_DOT, KC_SLSH, KC_NO }
|
XXXXXXX, XXXXXXX, KC_LALT, KC_SPC, KC_SPC, KC_DOT, KC_SLSH, XXXXXXX \
|
||||||
},
|
),
|
||||||
[1] = { /* First */
|
[1] = LAYOUT( /* First */
|
||||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT },
|
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_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, KC_LGUI },
|
KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_LGUI, \
|
||||||
{KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_PGDN, KC_END, KC_L, KC_SCLN, KC_UP, KC_FN1, KC_FN0 },
|
KC_LCTL, KC_Z, KC_X, KC_C, KC_PGDN, KC_END, KC_L, KC_SCLN, KC_UP, _______, _______, \
|
||||||
{KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO }
|
XXXXXXX, XXXXXXX, KC_LALT, _______, _______, KC_DOWN, KC_RGHT, XXXXXXX \
|
||||||
},
|
),
|
||||||
[2] = { /* Second */
|
[2] = LAYOUT( /* Second */
|
||||||
{KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT },
|
KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \
|
||||||
{KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, XXXXXXX, KC_ENT },
|
KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \
|
||||||
{KC_CAPS, XXXXXXX, KC_LSFT, KC_RSFT, KC_PAUSE,KC_F10, KC_F11, KC_F12, KC_NO, KC_UP, KC_FN1, KC_FN0 },
|
KC_CAPS, KC_LSFT, KC_RSFT, KC_PAUS, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_UP, _______, _______, \
|
||||||
{KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO }
|
XXXXXXX, XXXXXXX, KC_LALT, _______, _______, KC_DOWN, KC_RGHT, XXXXXXX \
|
||||||
},
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[0] = ACTION_LAYER_MOMENTARY(1), // to First overlay
|
|
||||||
[1] = ACTION_LAYER_MOMENTARY(2), // to Second overlay
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
#include "minorca.h"
|
|
||||||
#include "action_layer.h"
|
|
||||||
#include "eeconfig.h"
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
@@ -14,50 +11,34 @@ extern keymap_config_t keymap_config;
|
|||||||
#define _RAISE 2
|
#define _RAISE 2
|
||||||
#define _TB 3
|
#define _TB 3
|
||||||
|
|
||||||
// Macro name shortcuts
|
|
||||||
#define QWERTY M(_QWERTY)
|
|
||||||
#define LOWER M(_LOWER)
|
|
||||||
#define RAISE M(_RAISE)
|
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = { /* Qwerty */
|
[_QWERTY] = LAYOUT( /* Qwerty */ \
|
||||||
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
{FUNC(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_QUOT},
|
LT(_TB, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, \
|
||||||
{KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, FUNC(1)},
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_ENT), \
|
||||||
{KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, FUNC(2), XXXXXXX, XXXXXXX, FUNC(3), XXXXXXX, KC_RALT, KC_APP, KC_RCTL}
|
KC_LCTL, KC_LGUI, KC_LALT, LT(_RAISE, KC_SPC), LT(_LOWER, KC_SPC), KC_RALT, KC_APP, KC_RCTL \
|
||||||
},
|
),
|
||||||
|
|
||||||
[_RAISE] = {
|
[_RAISE] = LAYOUT( \
|
||||||
{S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), 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_TRNS, KC_TRNS, KC_TRNS, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), XXXXXXX, S(KC_BSLS)},
|
_______, _______, _______, KC_PAUS, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_PIPE, \
|
||||||
{KC_TRNS, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT},
|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT, \
|
||||||
{KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_MNXT, KC_MUTE, KC_MPLY}
|
_______, _______, _______, _______, _______, KC_MNXT, KC_MUTE, KC_MPLY \
|
||||||
},
|
),
|
||||||
|
|
||||||
[_LOWER] = {
|
[_LOWER] = LAYOUT( \
|
||||||
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE},
|
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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, XXXXXXX, KC_BSLS},
|
_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_BSLS, \
|
||||||
{KC_TRNS, XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_PGUP, KC_ENT},
|
_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_PGUP, KC_ENT, \
|
||||||
{KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_HOME, KC_PGDN, KC_END}
|
_______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \
|
||||||
},
|
),
|
||||||
|
|
||||||
[_TB] = { /* Tab */
|
[_TB] = LAYOUT( /* Tab */ \
|
||||||
{KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS},
|
KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, _______, _______, _______, _______, _______, KC_PSCR, _______, \
|
||||||
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, KC_TRNS},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||||
{KC_TRNS, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_UP, KC_ENT},
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_UP, KC_ENT, \
|
||||||
{BL_STEP, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT}
|
BL_STEP, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
}
|
)
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
[0] = ACTION_LAYER_TAP_KEY(_TB, KC_TAB),
|
|
||||||
[1] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),
|
|
||||||
[2] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC),
|
|
||||||
[3] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
|
|
||||||
};
|
};
|
||||||
@@ -3,4 +3,16 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11, \
|
||||||
|
KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KB11, \
|
||||||
|
KC00, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11, \
|
||||||
|
KD00, KD02, KD03, KD04, KD07, KD09, KD10, KD11 \
|
||||||
|
) { \
|
||||||
|
{ KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10, KA11 }, \
|
||||||
|
{ KB00, KB01, KB02, KB03, KB04, KB05, KB06, KB07, KB08, KB09, KC_NO, KB11 }, \
|
||||||
|
{ KC00, KC_NO, KC02, KC03, KC04, KC05, KC06, KC07, KC08, KC09, KC10, KC11 }, \
|
||||||
|
{ KD00, KC_NO, KD02, KD03, KD04, KC_NO, KC_NO, KD07, KC_NO, KD09, KD10, KD11 } \
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,33 +1,13 @@
|
|||||||
minorca keyboard firmware
|
# minorca
|
||||||
======================
|
|
||||||
Handwired 40% keyboard
|
|
||||||
|
|
||||||
http://www.panc.co/blog/minorcasebright-information-page
|
A handwired 40% keyboard by panc.co.
|
||||||
|
|
||||||
## Quantum MK Firmware
|
Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
|
||||||
|
Hardware Supported: panc.co minorca
|
||||||
|
Hardware Availability: [panc.co](https://www.panc.co/blog/minorcasebright-information-page)
|
||||||
|
|
||||||
For the full Quantum feature list, see [the parent readme.md](/readme.md).
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
## Building
|
make handwired/minorca:default
|
||||||
|
|
||||||
Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button.
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
|
|
||||||
Depending on which keymap you would like to use, you will have to compile slightly differently.
|
|
||||||
|
|
||||||
### Default
|
|
||||||
To build with the default keymap, simply run `make`.
|
|
||||||
|
|
||||||
### Other Keymaps
|
|
||||||
Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<name>.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files.
|
|
||||||
|
|
||||||
To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
|
|
||||||
```
|
|
||||||
$ make KEYMAP=[default|jack|<name>]
|
|
||||||
```
|
|
||||||
Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
|
|
||||||
|
|
||||||
### Notable forks (which some of the keymap files are from)
|
|
||||||
- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck)
|
|
||||||
- [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c)
|
|
||||||
- [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck)
|
|
||||||
- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck)
|
|
||||||
+74
-74
@@ -1,13 +1,13 @@
|
|||||||
/* A library to output the right key shortcut in any common app.
|
/* A library to output the right key shortcut in any common app.
|
||||||
Given a global variable babble_mode to show the environment and a
|
Given a global variable babble_mode to show the environment and a
|
||||||
key that calls the paste macro, do the right type of paste.
|
key that calls the paste macro, do the right type of paste.
|
||||||
Setting the context is done by another macro, or TBD interaction with the host.
|
Setting the context is done by another macro, or TBD interaction with the host.
|
||||||
|
|
||||||
Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
|
Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
|
||||||
and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
|
and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jeebak/keymap.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../MS_sculpt_mobile/babblePaste.h"
|
#include "babblePaste.h"
|
||||||
|
|
||||||
#include "action_macro.h"
|
#include "action_macro.h"
|
||||||
|
|
||||||
@@ -16,14 +16,14 @@ and https://github.com/qmk/qmk_firmware/blob/master/keyboards/planck/keymaps/jee
|
|||||||
// GLOBAL variable to determine mode. Sets startup default if no eeppom
|
// GLOBAL variable to determine mode. Sets startup default if no eeppom
|
||||||
uint8_t babble_mode =0 ;
|
uint8_t babble_mode =0 ;
|
||||||
|
|
||||||
// small function that we might also want to call from a keymap.
|
// small function that we might also want to call from a keymap.
|
||||||
|
|
||||||
macro_t* switch_babble_mode( uint8_t id) {
|
macro_t* switch_babble_mode( uint8_t id) {
|
||||||
babble_mode= id;
|
babble_mode= id;
|
||||||
return MACRO_NONE; //less typing where called
|
return MACRO_NONE; //less typing where called
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Today I learned that the preprocessor can not create a switch statement label from an argument
|
// Today I learned that the preprocessor can not create a switch statement label from an argument
|
||||||
// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15
|
// And else statements have problems, see https://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_3.html#SEC15
|
||||||
#define BABLM(ent, macro...) \
|
#define BABLM(ent, macro...) \
|
||||||
@@ -32,8 +32,8 @@ macro_t* switch_babble_mode( uint8_t id) {
|
|||||||
|
|
||||||
|
|
||||||
/* this function runs the appropriate babblepaste macro, given
|
/* this function runs the appropriate babblepaste macro, given
|
||||||
the global babble_mode, and a shortcut from the ENUM in babblePaste.h
|
the global babble_mode, and a shortcut from the ENUM in babblePaste.h
|
||||||
TODO, the pointers in this function should be stored in a PROGMEM array, not ram.
|
TODO, the pointers in this function should be stored in a PROGMEM array, not ram.
|
||||||
But that requires even more clever preprocessor foo.
|
But that requires even more clever preprocessor foo.
|
||||||
*/
|
*/
|
||||||
const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
||||||
@@ -43,20 +43,20 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifdef MS_MODE
|
#ifdef MS_MODE
|
||||||
if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
|
if ( BABL_WINDOWS == shortcut ) { return switch_babble_mode(MS_MODE); }
|
||||||
#endif
|
#endif
|
||||||
#ifdef MAC_MODE
|
#ifdef MAC_MODE
|
||||||
if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
|
if ( BABL_MAC == shortcut) { return switch_babble_mode(MAC_MODE); }
|
||||||
#endif
|
#endif
|
||||||
#ifdef LINUX_MODE
|
#ifdef LINUX_MODE
|
||||||
if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); }
|
if ( BABL_LINUX == shortcut ) { return switch_babble_mode(LINUX_MODE); }
|
||||||
#endif
|
#endif
|
||||||
#ifdef READMUX_MODE
|
#ifdef READMUX_MODE
|
||||||
if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; }
|
if ( BABL_READLINE == shortcut ) { switch_babble_mode(READMUX_MODE); return MACRO_NONE; }
|
||||||
#endif
|
#endif
|
||||||
#ifdef VI_MODE
|
#ifdef VI_MODE
|
||||||
if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); }
|
if ( BABL_VI == shortcut ) { return switch_babble_mode(VI_MODE); }
|
||||||
#endif
|
#endif
|
||||||
@@ -66,11 +66,11 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
switch(babble_mode) {
|
switch(babble_mode) {
|
||||||
|
|
||||||
#ifdef MS_MODE
|
#ifdef MS_MODE
|
||||||
|
|
||||||
case MS_MODE:
|
case MS_MODE:
|
||||||
BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
|
BABLM( BABL_GO_LEFT_1C, T(LEFT), END );
|
||||||
BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
|
BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
|
||||||
BABLM( BABL_GO_LEFT_WORD, D(LCTL), T(LEFT), U(LCTL), END );
|
BABLM( BABL_GO_LEFT_WORD, D(LCTL), T(LEFT), U(LCTL), END );
|
||||||
@@ -93,7 +93,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_REDO, D(LCTL), T(Y), U(LCTL), END );
|
BABLM( BABL_REDO, D(LCTL), T(Y), U(LCTL), END );
|
||||||
BABLM( BABL_CUT, D(LCTL), T(X), U(LCTL), END );
|
BABLM( BABL_CUT, D(LCTL), T(X), U(LCTL), END );
|
||||||
BABLM( BABL_COPY, D(LCTL), T(C), U(LCTL), END );
|
BABLM( BABL_COPY, D(LCTL), T(C), U(LCTL), END );
|
||||||
BABLM( BABL_PASTE, D(LCTL), T(V), U(LCTL), END );
|
BABLM( BABL_PASTE, D(LCTL), T(V), U(LCTL), END );
|
||||||
BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
|
BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
|
||||||
BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
|
BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
|
||||||
BABLM( BABL_FIND_NEXT, T(F3),END );
|
BABLM( BABL_FIND_NEXT, T(F3),END );
|
||||||
@@ -114,7 +114,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
|
BABLM( BABL_BROWSER_BACK, D(LALT), T(LEFT), U(LALT),END );
|
||||||
BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
|
BABLM( BABL_BROWSER_FIND, D(LCTL), T(F), U(LCTL),END );
|
||||||
BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
|
BABLM( BABL_BROWSER_BOOKMARK, D(LCTL), T(D), U(LCTL),END );
|
||||||
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LCTL),END ); // EDGE
|
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LCTL),END ); // EDGE
|
||||||
BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
|
BABLM( BABL_BROWSER_DEV_TOOLS, D(LCTL), T(T), U(LCTL),END ); // Chrome
|
||||||
// Chrome
|
// Chrome
|
||||||
BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
|
BABLM( BABL_BROWSER_RELOAD, D(LCTL), T(F5), U(LCTL),END ); // hard reload w/o cache
|
||||||
@@ -126,8 +126,8 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
|
|
||||||
// Todo, ring bell, flash light, show user this isn't supported
|
// Todo, ring bell, flash light, show user this isn't supported
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
|
|
||||||
|
|
||||||
#endif /* MS_MODE*/
|
#endif /* MS_MODE*/
|
||||||
|
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_GO_PREV_LINE , T(UP), END );
|
BABLM( BABL_GO_PREV_LINE , T(UP), END );
|
||||||
BABLM( BABL_PGDN , T(PGDN), END );
|
BABLM( BABL_PGDN , T(PGDN), END );
|
||||||
BABLM( BABL_PGUP , T(PGUP), END );
|
BABLM( BABL_PGUP , T(PGUP), END );
|
||||||
BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
|
BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
|
||||||
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
|
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
|
||||||
BABLM( BABL_DEL_RIGHT_WORD , D(LCTL), T(DEL), U(LCTL), END );
|
BABLM( BABL_DEL_RIGHT_WORD , D(LCTL), T(DEL), U(LCTL), END );
|
||||||
BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
|
BABLM( BABL_DEL_TO_LINE_END, D(RSFT), T(HOME), U(RSFT), T(DEL), END);
|
||||||
@@ -156,8 +156,8 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_REDO , D(LCTL), T(Y), U(LCTL), END );
|
BABLM( BABL_REDO , D(LCTL), T(Y), U(LCTL), END );
|
||||||
BABLM( BABL_CUT , D(LCTL), T(X), U(LCTL), END );
|
BABLM( BABL_CUT , D(LCTL), T(X), U(LCTL), END );
|
||||||
BABLM( BABL_COPY , D(LCTL), T(C), U(LCTL), END );
|
BABLM( BABL_COPY , D(LCTL), T(C), U(LCTL), END );
|
||||||
BABLM( BABL_PASTE , D(LCTL), T(V), U(LCTL), END );
|
BABLM( BABL_PASTE , D(LCTL), T(V), U(LCTL), END );
|
||||||
BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
|
BABLM( BABL_SELECT_ALL, D(LCTL), T(A), U(LCTL), END );
|
||||||
BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
|
BABLM( BABL_FIND, D(LCTL),T(F), U(LCTL),END );
|
||||||
/* BABLM(BABL_FIND_NEXT , T(F3),END ); KDE */
|
/* BABLM(BABL_FIND_NEXT , T(F3),END ); KDE */
|
||||||
BABLM( BABL_FIND_NEXT, D(LCTL),T(G), U(LCTL),END ); // Gnome*/
|
BABLM( BABL_FIND_NEXT, D(LCTL),T(G), U(LCTL),END ); // Gnome*/
|
||||||
@@ -167,7 +167,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_SWITCH_APP_NEXT, D(LCTL),T(TAB), U(LCTL),END );
|
BABLM( BABL_SWITCH_APP_NEXT, D(LCTL),T(TAB), U(LCTL),END );
|
||||||
BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END );
|
BABLM( BABL_SWITCH_APP_LAST, D(LSFT),D(LCTL),T(TAB), U(LCTL), U(LSFT),END );
|
||||||
BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
|
BABLM( BABL_CLOSE_APP, D(LALT),T(F4), U(LALT),END );
|
||||||
//BABLM( BABL_HELP, END );
|
//BABLM( BABL_HELP, END );
|
||||||
|
|
||||||
#ifndef BABL_NOBROWSER
|
#ifndef BABL_NOBROWSER
|
||||||
BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
|
BABLM( BABL_BROWSER_NEW_TAB, D(LCTL), T(T), U(LCTL),END );
|
||||||
@@ -188,9 +188,9 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MAC_MODE
|
#ifdef MAC_MODE
|
||||||
|
|
||||||
case MAC_MODE:
|
case MAC_MODE:
|
||||||
@@ -206,7 +206,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_GO_PREV_LINE , T(UP), END );
|
BABLM( BABL_GO_PREV_LINE , T(UP), END );
|
||||||
BABLM( BABL_PGDN , D(LALT),T(DOWN), U(LALT), END );
|
BABLM( BABL_PGDN , D(LALT),T(DOWN), U(LALT), END );
|
||||||
BABLM( BABL_PGUP , D(LALT),T(UP), U(LALT), END );
|
BABLM( BABL_PGUP , D(LALT),T(UP), U(LALT), END );
|
||||||
BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
|
BABLM( BABL_DEL_RIGHT_1C , D(DEL), END );
|
||||||
BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END );
|
BABLM( BABL_DEL_LEFT_WORD , D(LALT), T(BSPACE), U(LALT), END );
|
||||||
BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END );
|
BABLM( BABL_DEL_RIGHT_WORD, D(LALT), T(DEL), U(LALT), END );
|
||||||
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );// there must be another way
|
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );// there must be another way
|
||||||
@@ -216,7 +216,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_REDO , D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END );
|
BABLM( BABL_REDO , D(LSFT),D(LGUI), T(Z), U(LSFT),U(LGUI), END );
|
||||||
BABLM( BABL_CUT , D(LGUI), T(X), U(LGUI), END );
|
BABLM( BABL_CUT , D(LGUI), T(X), U(LGUI), END );
|
||||||
BABLM( BABL_COPY , D(LGUI), T(C), U(LGUI), END );
|
BABLM( BABL_COPY , D(LGUI), T(C), U(LGUI), END );
|
||||||
BABLM( BABL_PASTE , D(LGUI), T(V), U(LGUI), END );
|
BABLM( BABL_PASTE , D(LGUI), T(V), U(LGUI), END );
|
||||||
BABLM( BABL_SELECT_ALL , D(LGUI), T(A), U(LGUI), END );
|
BABLM( BABL_SELECT_ALL , D(LGUI), T(A), U(LGUI), END );
|
||||||
BABLM( BABL_FIND , D(LGUI),T(F), U(LGUI),END );
|
BABLM( BABL_FIND , D(LGUI),T(F), U(LGUI),END );
|
||||||
BABLM( BABL_FIND_NEXT, D(LGUI),T(G), U(LGUI),END );
|
BABLM( BABL_FIND_NEXT, D(LGUI),T(G), U(LGUI),END );
|
||||||
@@ -238,7 +238,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
|
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
|
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
|
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
|
||||||
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
|
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
|
||||||
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
|
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
|
||||||
// Chrome
|
// Chrome
|
||||||
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
|
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
|
||||||
@@ -247,10 +247,10 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
|
BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EMACS_MODE
|
#ifdef EMACS_MODE
|
||||||
|
|
||||||
case EMACS_MODE:
|
case EMACS_MODE:
|
||||||
@@ -269,18 +269,18 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
|
BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
|
||||||
BABLM( BABL_PGDN , D(LCTL), T(V), U(LCTL), END );
|
BABLM( BABL_PGDN , D(LCTL), T(V), U(LCTL), END );
|
||||||
BABLM( BABL_PGUP , D(LALT), T(V), U(LALT), END );
|
BABLM( BABL_PGUP , D(LALT), T(V), U(LALT), END );
|
||||||
BABLM( BABL_DEL_RIGHT_1C, D(LCTL), T(D), U(LCTL),END );
|
BABLM( BABL_DEL_RIGHT_1C, D(LCTL), T(D), U(LCTL),END );
|
||||||
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
|
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(BSPACE), U(LCTL), END );
|
||||||
BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
|
BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
|
||||||
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
|
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
|
||||||
BABLM( BABL_DEL_TO_LINE_START, T(ESC), T(0), D(LCTL), T(K), U(LCTL), END );
|
BABLM( BABL_DEL_TO_LINE_START, T(ESC), T(0), D(LCTL), T(K), U(LCTL), END );
|
||||||
#ifndef BABL_MOVEMENTONLY
|
#ifndef BABL_MOVEMENTONLY
|
||||||
BABLM( BABL_UNDO , D(LCTL), T(X), U(LCTL),T(C), END );
|
BABLM( BABL_UNDO , D(LCTL), T(X), U(LCTL),T(C), END );
|
||||||
BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
|
BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
|
||||||
BABLM( BABL_CUT , D(LCTL), T(W), U(LCTL), END );
|
BABLM( BABL_CUT , D(LCTL), T(W), U(LCTL), END );
|
||||||
BABLM( BABL_COPY , D(LALT), T(W), U(LALT), END ); //really?
|
BABLM( BABL_COPY , D(LALT), T(W), U(LALT), END ); //really?
|
||||||
BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
|
BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
|
||||||
BABLM( BABL_SELECT_ALL ,D(LCTL), T(X), U(LCTL),T(H), END );
|
BABLM( BABL_SELECT_ALL ,D(LCTL), T(X), U(LCTL),T(H), END );
|
||||||
BABLM( BABL_FIND , D(LCTL), T(S), U(LCTL),END );
|
BABLM( BABL_FIND , D(LCTL), T(S), U(LCTL),END );
|
||||||
BABLM( BABL_FIND_NEXT , D(LCTL), T(S), U(LCTL),END );
|
BABLM( BABL_FIND_NEXT , D(LCTL), T(S), U(LCTL),END );
|
||||||
BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
|
BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
|
||||||
@@ -290,7 +290,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_CLOSE_APP , D(LCTL), T(X), U(LCTL),T(C),END );
|
BABLM( BABL_CLOSE_APP , D(LCTL), T(X), U(LCTL),T(C),END );
|
||||||
BABLM( BABL_HELP , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help
|
BABLM( BABL_HELP , D(LCTL),T(H), U(LCTL),T(A),END); // start search in help
|
||||||
#ifndef BABL_NOBROWSER
|
#ifndef BABL_NOBROWSER
|
||||||
/* you get to figure w3 out
|
/* you get to figure w3 out
|
||||||
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
|
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
|
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
|
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
|
||||||
@@ -301,7 +301,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
|
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
|
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
|
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
|
||||||
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
|
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
|
||||||
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
|
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
|
||||||
// Chrome
|
// Chrome
|
||||||
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
|
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
|
||||||
@@ -312,18 +312,18 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef VI_MODE
|
#ifdef VI_MODE
|
||||||
case VI_MODE:
|
case VI_MODE:
|
||||||
// you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell)
|
// you have to track the modes yourself. Otherwise motion is awful (bell, bell, bell)
|
||||||
|
|
||||||
|
|
||||||
BABLM( BABL_GO_LEFT_1C , T(H), END );
|
BABLM( BABL_GO_LEFT_1C , T(H), END );
|
||||||
BABLM( BABL_GO_RIGHT_1C , T(L), END );
|
BABLM( BABL_GO_RIGHT_1C , T(L), END );
|
||||||
BABLM( BABL_GO_LEFT_WORD , T(B),END );
|
BABLM( BABL_GO_LEFT_WORD , T(B),END );
|
||||||
@@ -336,18 +336,18 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_GO_PREV_LINE, T(K), END );
|
BABLM( BABL_GO_PREV_LINE, T(K), END );
|
||||||
BABLM( BABL_PGDN ,D(LCTL), T(F), U(LCTL), END );
|
BABLM( BABL_PGDN ,D(LCTL), T(F), U(LCTL), END );
|
||||||
BABLM( BABL_PGUP , D(LCTL), T(B), U(LCTL), END );
|
BABLM( BABL_PGUP , D(LCTL), T(B), U(LCTL), END );
|
||||||
BABLM( BABL_DEL_RIGHT_1C , T(X),END );
|
BABLM( BABL_DEL_RIGHT_1C , T(X),END );
|
||||||
BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END );
|
BABLM( BABL_DEL_LEFT_WORD , T(D),T(G),T(E),END );
|
||||||
BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END );
|
BABLM( BABL_DEL_RIGHT_WORD , T(D),T(W),END );
|
||||||
BABLM( BABL_DEL_TO_LINE_END, T(D),D(LSFT), T(4),U(LSFT) ,END ); // d$
|
BABLM( BABL_DEL_TO_LINE_END, T(D),D(LSFT), T(4),U(LSFT) ,END ); // d$
|
||||||
BABLM( BABL_DEL_TO_LINE_START, T(D),D(LSFT), T(6),U(LSFT) ,END );
|
BABLM( BABL_DEL_TO_LINE_START, T(D),D(LSFT), T(6),U(LSFT) ,END );
|
||||||
#ifndef BABL_MOVEMENTONLY
|
#ifndef BABL_MOVEMENTONLY
|
||||||
BABLM( BABL_UNDO , T(U), END );
|
BABLM( BABL_UNDO , T(U), END );
|
||||||
BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END );
|
BABLM( BABL_REDO , D(LCTL), T(R), U(LCTL), END );
|
||||||
BABLM( BABL_CUT , T(X), END );
|
BABLM( BABL_CUT , T(X), END );
|
||||||
BABLM( BABL_COPY , T(Y),END );
|
BABLM( BABL_COPY , T(Y),END );
|
||||||
BABLM( BABL_PASTE , T(P), END );
|
BABLM( BABL_PASTE , T(P), END );
|
||||||
BABLM( BABL_SELECT_ALL , D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful?
|
BABLM( BABL_SELECT_ALL , D(LSFT), T(SCLN),U(LSFT),D(LSFT), T(5),U(LSFT),T(Y), END ); // wrong but helpful?
|
||||||
BABLM( BABL_FIND , T(SLASH),END );
|
BABLM( BABL_FIND , T(SLASH),END );
|
||||||
BABLM( BABL_FIND_NEXT , T(N),END );
|
BABLM( BABL_FIND_NEXT , T(N),END );
|
||||||
BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
|
BABLM( BABL_FIND_REPLACE , D(LALT),D(LSFT), T(5),U(LSFT), U(LALT), END );
|
||||||
@@ -357,7 +357,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM(BABL_CLOSE_APP, D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END );
|
BABLM(BABL_CLOSE_APP, D(LSFT), T(SCLN),U(LSFT), T(Q), D(RSFT), T(1),U(RSFT), END );
|
||||||
BABLM(BABL_HELP, D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help
|
BABLM(BABL_HELP, D(LSFT), T(SCLN),U(LSFT),T(H),END); // start search in help
|
||||||
#ifndef BABL_NOBROWSER
|
#ifndef BABL_NOBROWSER
|
||||||
/* you get to figure this out
|
/* you get to figure this out
|
||||||
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
|
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
|
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
|
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
|
||||||
@@ -368,7 +368,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
|
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
|
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
|
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
|
||||||
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
|
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
|
||||||
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
|
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
|
||||||
// Chrome
|
// Chrome
|
||||||
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
|
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
|
||||||
@@ -377,8 +377,8 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
|
BABLM( BABL_BROWSER_ZOOM_OUT, D(LGUI), T(MINS), U(LGUI),END );
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -387,10 +387,10 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
#ifdef READMUX_MODE
|
#ifdef READMUX_MODE
|
||||||
// Readline command line editing + tmux windowing
|
// Readline command line editing + tmux windowing
|
||||||
// I havent decided how much to do readline and how much tmux
|
// I havent decided how much to do readline and how much tmux
|
||||||
|
|
||||||
|
|
||||||
case READMUX_MODE:
|
case READMUX_MODE:
|
||||||
|
|
||||||
BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
|
BABLM( BABL_GO_LEFT_1C , T(LEFT), END );
|
||||||
BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
|
BABLM( BABL_GO_RIGHT_1C , T(RIGHT), END );
|
||||||
BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END );
|
BABLM( BABL_GO_LEFT_WORD , D(LALT), T(B), U(LALT), END );
|
||||||
@@ -403,28 +403,28 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
|
BABLM( BABL_GO_PREV_LINE , D(LCTL), T(P), U(LCTL), END );
|
||||||
BABLM( BABL_PGDN , T(PGDN), END );
|
BABLM( BABL_PGDN , T(PGDN), END );
|
||||||
BABLM( BABL_PGUP , T(PGUP), END );
|
BABLM( BABL_PGUP , T(PGUP), END );
|
||||||
BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END );
|
BABLM( BABL_DEL_RIGHT_1C , D(LCTL), T(D), U(LCTL),END );
|
||||||
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(W), U(LCTL), END );
|
BABLM( BABL_DEL_LEFT_WORD , D(LCTL), T(W), U(LCTL), END );
|
||||||
BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
|
BABLM( BABL_DEL_RIGHT_WORD , D(LALT), T(D), U(LALT), END );
|
||||||
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
|
BABLM( BABL_DEL_TO_LINE_END, D(LCTL), T(K), U(LCTL), END );
|
||||||
BABLM( BABL_DEL_TO_LINE_START, D(LCTL), T(U), U(LCTL), END );
|
BABLM( BABL_DEL_TO_LINE_START, D(LCTL), T(U), U(LCTL), END );
|
||||||
#ifndef BABL_MOVEMENTONLY
|
#ifndef BABL_MOVEMENTONLY
|
||||||
BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END );
|
BABLM( BABL_UNDO , D(LALT), T(R), U(LALT) , END );
|
||||||
BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
|
BABLM( BABL_REDO , D(LCTL), T(X), U(LCTL),T(C), END ); // arguably
|
||||||
BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time
|
BABLM( BABL_CUT , D(LCTL), T(K), U(LCTL), END ); // wrong half the time
|
||||||
//BABLM( BABL_COPY ,END );
|
//BABLM( BABL_COPY ,END );
|
||||||
BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
|
BABLM( BABL_PASTE , D(LCTL), T(Y), U(LCTL), END );
|
||||||
BABLM( BABL_SELECT_ALL , D(LCTL), T(A), T(K), T(Y), U(LCTL) , END );
|
BABLM( BABL_SELECT_ALL , D(LCTL), T(A), T(K), T(Y), U(LCTL) , END );
|
||||||
BABLM( BABL_FIND , D(LCTL), T(R), U(LCTL), END ); // search history
|
BABLM( BABL_FIND , D(LCTL), T(R), U(LCTL), END ); // search history
|
||||||
BABLM(BABL_FIND_NEXT, D(LCTL), T(S), U(LCTL), END );
|
BABLM(BABL_FIND_NEXT, D(LCTL), T(S), U(LCTL), END );
|
||||||
//BABLM( BABL_FIND_REPLACE ,END );
|
//BABLM( BABL_FIND_REPLACE ,END );
|
||||||
BABLM( BABL_RUNAPP , D(LCTL), T(B), U(LCTL), T(C),END ); //tmux
|
BABLM( BABL_RUNAPP , D(LCTL), T(B), U(LCTL), T(C),END ); //tmux
|
||||||
BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(B), U(LCTL), T(N),END ); //tmux
|
BABLM( BABL_SWITCH_APP_NEXT , D(LCTL), T(B), U(LCTL), T(N),END ); //tmux
|
||||||
BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(B), U(LCTL), T(P),END ); //tmux
|
BABLM( BABL_SWITCH_APP_LAST , D(LCTL), T(B), U(LCTL), T(P),END ); //tmux
|
||||||
BABLM( BABL_CLOSE_APP , D(LCTL), T(B), U(LCTL), T(D),END); // usually what I want
|
BABLM( BABL_CLOSE_APP , D(LCTL), T(B), U(LCTL), T(D),END); // usually what I want
|
||||||
// BABLM( BABL_HELP ,END );
|
// BABLM( BABL_HELP ,END );
|
||||||
#ifndef BABL_NOBROWSER
|
#ifndef BABL_NOBROWSER
|
||||||
/* Add lynx shortcuts?
|
/* Add lynx shortcuts?
|
||||||
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
|
BABLM( BABL_BROWSER_NEW_TAB, D(LGUI), T(T), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
|
BABLM( BABL_BROWSER_CLOSE_TAB, D(LGUI), T(W), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
|
BABLM( BABL_BROWSER_REOPEN_LAST_TAB, D(LGUI), D(RSFT),T(T), U(RSFT),U(LGUI),END );
|
||||||
@@ -435,7 +435,7 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
|
BABLM( BABL_BROWSER_BACK, D(LGUI), T(LEFT), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
|
BABLM( BABL_BROWSER_FIND, D(LGUI), T(F), U(LGUI),END );
|
||||||
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
|
BABLM( BABL_BROWSER_BOOKMARK, D(LGUI), T(D), U(LGUI),END );
|
||||||
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
|
//BABLM( BABL_BROWSER_DEV_TOOLS, T(F12), U(LGUI),END ); // EDGE
|
||||||
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
|
BABLM( BABL_BROWSER_DEV_TOOLS, D(LGUI), D(LALT), T(I), U(LALT),U(LGUI),END ); // Chrome
|
||||||
// Chrome
|
// Chrome
|
||||||
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
|
BABLM( BABL_BROWSER_RELOAD, D(LGUI), T(R), U(LGUI),END ); // add shift for reload w/o cache
|
||||||
@@ -445,12 +445,12 @@ const macro_t *babblePaste (keyrecord_t *record, uint8_t shortcut) {
|
|||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return MACRO_NONE;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
default:
|
return MACRO_NONE;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
default:
|
||||||
return MACRO_NONE;
|
return MACRO_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
+17
-17
@@ -1,15 +1,15 @@
|
|||||||
/* A library to output the right key shortcut in any common app.
|
/* A library to output the right key shortcut in any common app.
|
||||||
Given a global variable babble_mode to show the environment and a
|
Given a global variable babble_mode to show the environment and a
|
||||||
key that calls the paste macro, do the right type of paste.
|
key that calls the paste macro, do the right type of paste.
|
||||||
|
|
||||||
Setting the bable_mode is done by another macro, or TBD interaction with the host.
|
Setting the bable_mode is done by another macro, or TBD interaction with the host.
|
||||||
|
|
||||||
Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
|
Huge thanks to https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
|
||||||
and jeebak & algernon's keymap
|
and jeebak & algernon's keymap
|
||||||
*/
|
*/
|
||||||
#ifndef _babblePaste_h_included__
|
#ifndef _babblePaste_h_included__
|
||||||
#define _babblePaste_h_included__
|
#define _babblePaste_h_included__
|
||||||
#include "../MS_sculpt_mobile/config.h"
|
#include "config.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "quantum_keycodes.h"
|
#include "quantum_keycodes.h"
|
||||||
|
|
||||||
@@ -18,11 +18,11 @@ and jeebak & algernon's keymap
|
|||||||
/* ***************************
|
/* ***************************
|
||||||
|
|
||||||
// Uncomment any modes you want. Whatever mode = 0 will be the default on boot
|
// Uncomment any modes you want. Whatever mode = 0 will be the default on boot
|
||||||
// Expect to get errors if you comment a feature out and leave it in your keymap.
|
// Expect to get errors if you comment a feature out and leave it in your keymap.
|
||||||
|
|
||||||
#define USE_BABLPASTE
|
#define USE_BABLPASTE
|
||||||
|
|
||||||
//#define MS_MODE 0 // Windows.
|
//#define MS_MODE 0 // Windows.
|
||||||
//#define MAC_MODE 1
|
//#define MAC_MODE 1
|
||||||
//#define LINUX_MODE 2 //aka gnome+KDE
|
//#define LINUX_MODE 2 //aka gnome+KDE
|
||||||
//#define EMACS_MODE 3
|
//#define EMACS_MODE 3
|
||||||
@@ -42,7 +42,7 @@ and jeebak & algernon's keymap
|
|||||||
//#define BABL_MOVEMENTONLY
|
//#define BABL_MOVEMENTONLY
|
||||||
|
|
||||||
|
|
||||||
// Define starting number for BABL macros in the macro range.
|
// Define starting number for BABL macros in the macro range.
|
||||||
// Probably can start the default even lower
|
// Probably can start the default even lower
|
||||||
#define BABL_START_NUM 50
|
#define BABL_START_NUM 50
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ enum {
|
|||||||
// left & right
|
// left & right
|
||||||
BABL_GO_LEFT_1C= BABL_START_NUM,
|
BABL_GO_LEFT_1C= BABL_START_NUM,
|
||||||
BABL_GO_RIGHT_1C,
|
BABL_GO_RIGHT_1C,
|
||||||
BABL_GO_LEFT_WORD,
|
BABL_GO_LEFT_WORD,
|
||||||
BABL_GO_RIGHT_WORD,
|
BABL_GO_RIGHT_WORD,
|
||||||
BABL_GO_START_LINE,
|
BABL_GO_START_LINE,
|
||||||
BABL_GO_END_LINE,
|
BABL_GO_END_LINE,
|
||||||
@@ -65,7 +65,7 @@ enum {
|
|||||||
BABL_PGDN,
|
BABL_PGDN,
|
||||||
BABL_PGUP,
|
BABL_PGUP,
|
||||||
// And the delete options
|
// And the delete options
|
||||||
//BABL_DEL_LEFT_1C == backspace, so why bother.
|
//BABL_DEL_LEFT_1C == backspace, so why bother.
|
||||||
BABL_DEL_RIGHT_1C, // usually = Del
|
BABL_DEL_RIGHT_1C, // usually = Del
|
||||||
BABL_DEL_LEFT_WORD,
|
BABL_DEL_LEFT_WORD,
|
||||||
BABL_DEL_RIGHT_WORD,
|
BABL_DEL_RIGHT_WORD,
|
||||||
@@ -110,7 +110,7 @@ enum {
|
|||||||
BABL_BROWSER_FULLSCREEN,
|
BABL_BROWSER_FULLSCREEN,
|
||||||
BABL_BROWSER_ZOOM_IN,
|
BABL_BROWSER_ZOOM_IN,
|
||||||
BABL_BROWSER_ZOOM_OUT,
|
BABL_BROWSER_ZOOM_OUT,
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -137,8 +137,8 @@ enum {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum?
|
// BUG, used to jump to babble functiion. Surely there is a way to calculate size of enum?
|
||||||
#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes.
|
#define BABL_NUM_MACROS 48+4 // 48 + # of defined modes.
|
||||||
|
|
||||||
/* And all the shorthand keymap ready versions */
|
/* And all the shorthand keymap ready versions */
|
||||||
// First the mode switching macros
|
// First the mode switching macros
|
||||||
@@ -161,7 +161,7 @@ enum {
|
|||||||
#define B_READ M(BABL_READLINE)
|
#define B_READ M(BABL_READLINE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// and all the movement & action.
|
// and all the movement & action.
|
||||||
|
|
||||||
#define B_L1C M(BABL_GO_LEFT_1C)
|
#define B_L1C M(BABL_GO_LEFT_1C)
|
||||||
#define B_R1C M(BABL_GO_RIGHT_1C)
|
#define B_R1C M(BABL_GO_RIGHT_1C)
|
||||||
@@ -175,7 +175,7 @@ enum {
|
|||||||
#define B_UP M(BABL_GO_PREV_LINE)
|
#define B_UP M(BABL_GO_PREV_LINE)
|
||||||
#define B_PGDN M(BABL_PGDN)
|
#define B_PGDN M(BABL_PGDN)
|
||||||
#define B_PGUP M(BABL_PGUP)
|
#define B_PGUP M(BABL_PGUP)
|
||||||
//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother.
|
//#define B_BKSP M(BABL_DEL_LEFT_1C) == backspace so why bother.
|
||||||
#define B_DEL M(BABL_DEL_RIGHT_1C) // usually = Del
|
#define B_DEL M(BABL_DEL_RIGHT_1C) // usually = Del
|
||||||
#define B_DLW M(BABL_DEL_LEFT_WORD)
|
#define B_DLW M(BABL_DEL_LEFT_WORD)
|
||||||
#define B_DRW M(BABL_DEL_RIGHT_WORD)
|
#define B_DRW M(BABL_DEL_RIGHT_WORD)
|
||||||
@@ -210,8 +210,8 @@ enum {
|
|||||||
#define B_BFUlL M(BABL_BROWSER_FULLSCREEN)
|
#define B_BFUlL M(BABL_BROWSER_FULLSCREEN)
|
||||||
#define B_ZMIN M(BABL_BROWSER_ZOOM_IN)
|
#define B_ZMIN M(BABL_BROWSER_ZOOM_IN)
|
||||||
#define B_ZMOT M(BABL_BROWSER_ZOOM_OUT)
|
#define B_ZMOT M(BABL_BROWSER_ZOOM_OUT)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "MS Sculpt Mobile",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 16,
|
||||||
|
"height": 6,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"Esc", "x":0, "y":0},
|
||||||
|
{"label":"F1", "x":1, "y":0},
|
||||||
|
{"label":"F2", "x":2, "y":0},
|
||||||
|
{"label":"F3", "x":3, "y":0},
|
||||||
|
{"label":"F4", "x":4, "y":0},
|
||||||
|
{"label":"F5", "x":5, "y":0},
|
||||||
|
{"label":"F6", "x":6, "y":0},
|
||||||
|
{"label":"F7", "x":7, "y":0},
|
||||||
|
{"label":"F8", "x":8, "y":0},
|
||||||
|
{"label":"F9", "x":9, "y":0},
|
||||||
|
{"label":"F10", "x":10, "y":0},
|
||||||
|
{"label":"F11", "x":11, "y":0},
|
||||||
|
{"label":"F12", "x":12, "y":0},
|
||||||
|
{"label":"PrtSc", "x":13, "y":0},
|
||||||
|
{"label":"Home", "x":14, "y":0},
|
||||||
|
{"label":"End", "x":15, "y":0},
|
||||||
|
{"label":"`", "x":0, "y":1},
|
||||||
|
{"label":"1", "x":1, "y":1},
|
||||||
|
{"label":"2", "x":2, "y":1},
|
||||||
|
{"label":"3", "x":3, "y":1},
|
||||||
|
{"label":"4", "x":4, "y":1},
|
||||||
|
{"label":"5", "x":5, "y":1},
|
||||||
|
{"label":"6", "x":6, "y":1},
|
||||||
|
{"label":"7", "x":7, "y":1},
|
||||||
|
{"label":"8", "x":8, "y":1},
|
||||||
|
{"label":"9", "x":9, "y":1},
|
||||||
|
{"label":"0", "x":10, "y":1},
|
||||||
|
{"label":"-", "x":11, "y":1},
|
||||||
|
{"label":"=", "x":12, "y":1},
|
||||||
|
{"label":"Backspace", "x":13, "y":1, "w":2},
|
||||||
|
{"label":"Del", "x":15, "y":1, "h":1.6},
|
||||||
|
{"label":"Tab", "x":0, "y":2, "w":1.5},
|
||||||
|
{"label":"Q", "x":1.5, "y":2},
|
||||||
|
{"label":"W", "x":2.5, "y":2},
|
||||||
|
{"label":"E", "x":3.5, "y":2},
|
||||||
|
{"label":"R", "x":4.5, "y":2},
|
||||||
|
{"label":"T", "x":5.5, "y":2},
|
||||||
|
{"label":"Y", "x":6.5, "y":2},
|
||||||
|
{"label":"U", "x":7.5, "y":2},
|
||||||
|
{"label":"I", "x":8.5, "y":2},
|
||||||
|
{"label":"O", "x":9.5, "y":2},
|
||||||
|
{"label":"P", "x":10.5, "y":2},
|
||||||
|
{"label":"[", "x":11.5, "y":2},
|
||||||
|
{"label":"]", "x":12.5, "y":2},
|
||||||
|
{"label":"\\", "x":13.5, "y":2, "w":1.5},
|
||||||
|
{"label":"Caps Lock", "x":0, "y":3, "w":1.75},
|
||||||
|
{"label":"A", "x":1.75, "y":3},
|
||||||
|
{"label":"S", "x":2.75, "y":3},
|
||||||
|
{"label":"D", "x":3.75, "y":3},
|
||||||
|
{"label":"F", "x":4.75, "y":3},
|
||||||
|
{"label":"G", "x":5.75, "y":3},
|
||||||
|
{"label":"H", "x":6.75, "y":3},
|
||||||
|
{"label":"J", "x":7.75, "y":3},
|
||||||
|
{"label":"K", "x":8.75, "y":3},
|
||||||
|
{"label":"L", "x":9.75, "y":3},
|
||||||
|
{"label":";", "x":10.75, "y":3},
|
||||||
|
{"label":"'", "x":11.75, "y":3},
|
||||||
|
{"label":"Enter", "x":12.75, "y":3, "w":2.25},
|
||||||
|
{"label":"PgUp", "x":15, "y":2.6, "h":1.2},
|
||||||
|
{"label":"LShift", "x":0, "y":4, "w":2.25},
|
||||||
|
{"label":"Z", "x":2.25, "y":4},
|
||||||
|
{"label":"X", "x":3.25, "y":4},
|
||||||
|
{"label":"C", "x":4.25, "y":4},
|
||||||
|
{"label":"V", "x":5.25, "y":4},
|
||||||
|
{"label":"B", "x":6.25, "y":4},
|
||||||
|
{"label":"N", "x":7.25, "y":4},
|
||||||
|
{"label":"M", "x":8.25, "y":4},
|
||||||
|
{"label":",", "x":9.25, "y":4},
|
||||||
|
{"label":".", "x":10.25, "y":4},
|
||||||
|
{"label":"/", "x":11.25, "y":4},
|
||||||
|
{"label":"RShift", "x":12.25, "y":4, "w":1.75},
|
||||||
|
{"label":"Up", "x":14, "y":4},
|
||||||
|
{"label":"PgDn", "x":15, "y":3.8, "h":1.2},
|
||||||
|
{"label":"LCtrl", "x":0, "y":5, "w":1.25},
|
||||||
|
{"label":"LWin", "x":1.25, "y":5, "w":1.25},
|
||||||
|
{"label":"LAlt", "x":2.5, "y":5, "w":1.25},
|
||||||
|
{"label":"Space", "x":3.75, "y":5, "w":5.5},
|
||||||
|
{"label":"RAlt", "x":9.25, "y":5, "w":1.25},
|
||||||
|
{"label":"Fn", "x":10.5, "y":5, "w":1.25},
|
||||||
|
{"label":"RCtrl", "x":11.75, "y":5, "w":1.25},
|
||||||
|
{"label":"Left", "x":13, "y":5},
|
||||||
|
{"label":"Down", "x":14, "y":5},
|
||||||
|
{"label":"Right", "x":15, "y":5}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// place overrides here
|
||||||
+13
-33
@@ -1,7 +1,7 @@
|
|||||||
#include "../../MS_sculpt_mobile.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute|
|
* |ESC | F1 | F2 | F3 | F4 | F5 | F6 | f7 | F8 | F9 | F10| F11| F12|Vol-|Vol+|Mute|
|
||||||
* -------------------------------------------------------------------------------'
|
* -------------------------------------------------------------------------------'
|
||||||
@@ -10,42 +10,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
|
* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
|
||||||
* -------------------------------------------------------------------------------'
|
* -------------------------------------------------------------------------------'
|
||||||
* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
|
* | caps | a | s | d | f | g | h | j | k | l | ; | ' | enter |PgUp|
|
||||||
* --------------------------------------------------------------------------------
|
* --------------------------------------------------------------------------------
|
||||||
* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
|
* |Lsft | z | x | c | v | b | n | m | , | . | / | Rsft| Up| PgDn|
|
||||||
* ---------------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------------
|
||||||
* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght|
|
* |Lctl |Lgui |Lalt | Space |Ralt | FN | Rctl |Left|Down|Rght|
|
||||||
* ---------------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[0] = KEYMAP( \
|
[0] = LAYOUT( \
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, KC_MUTE,\
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, KC_MUTE, \
|
||||||
KC_GRAVE, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
|
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP,\
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
|
||||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,\
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, RSFT(KC_1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
|
||||||
)
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
const uint16_t PROGMEM fn_actions[] = {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
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_init_user(void) {
|
||||||
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# The default keymap for Microsoft Sculpt Mobile
|
||||||
File renamed without changes.
+5
-9
@@ -1,23 +1,20 @@
|
|||||||
#ifndef CONFIG_USER_H
|
#pragma once
|
||||||
#define CONFIG_USER_H
|
|
||||||
|
|
||||||
#include "../../../MS_sculpt_mobile/config.h"
|
|
||||||
|
|
||||||
#define USE_BABLPASTE
|
#define USE_BABLPASTE
|
||||||
|
|
||||||
// Expect to get errors if you comment a feature out and leave it in your keymap.
|
// Expect to get errors if you comment a feature out and leave it in your keymap.
|
||||||
|
|
||||||
#ifdef USE_BABLPASTE
|
#ifdef USE_BABLPASTE
|
||||||
//define BabblePaste maps
|
//define BabblePaste maps
|
||||||
// Windows.
|
// Windows.
|
||||||
#define MAC_MODE 0
|
#define MAC_MODE 0
|
||||||
#define MS_MODE 1
|
#define MS_MODE 1
|
||||||
//aka gnome+KDE
|
//aka gnome+KDE
|
||||||
//#define LINUX_MODE 2
|
//#define LINUX_MODE 2
|
||||||
//#define EMACS_MODE 3
|
//#define EMACS_MODE 3
|
||||||
#define VI_MODE 3
|
#define VI_MODE 3
|
||||||
// Readline and tmux
|
// Readline and tmux
|
||||||
#define READMUX_MODE 2
|
#define READMUX_MODE 2
|
||||||
//#define WORDSTAR_MODE 5
|
//#define WORDSTAR_MODE 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -29,4 +26,3 @@
|
|||||||
//#define BABL_NOBROWSER
|
//#define BABL_NOBROWSER
|
||||||
|
|
||||||
// place overrides here
|
// place overrides here
|
||||||
#endif
|
|
||||||
+7
-13
@@ -1,11 +1,5 @@
|
|||||||
#include "../../../MS_sculpt_mobile/babblePaste.h"
|
#include "babblePaste.h"
|
||||||
#include "../../MS_sculpt_mobile.h"
|
#include QMK_KEYBOARD_H
|
||||||
#include "action_layer.h"
|
|
||||||
#include "action_util.h"
|
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
#include "audio.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _QWR 0
|
#define _QWR 0
|
||||||
#define _CDH 2
|
#define _CDH 2
|
||||||
@@ -59,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ---------------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_QWR] = KEYMAP( \
|
[_QWR] = LAYOUT( \
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, CDH,\
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_VOLU, CDH,\
|
||||||
KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
|
KC_ESC, KC_1, KC_2, KC_3 ,KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQL, KC_BSPC, KC_DEL,\
|
||||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\
|
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,\
|
||||||
@@ -68,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
KC_LCTL, KC_LGUI, KC_LALT, KC_FN1, KC_RGUI,TT_SYM,KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT
|
||||||
),
|
),
|
||||||
|
|
||||||
[_CDH] = KEYMAP (\
|
[_CDH] = LAYOUT(\
|
||||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, QWR, \
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, QWR, \
|
||||||
KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
KC_ESC, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\
|
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, ____, ____, ____,\
|
||||||
@@ -95,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ---------------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_SYM] = KEYMAP (\
|
[_SYM] = LAYOUT(\
|
||||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\
|
M(VIBRK), KC_CIRC, KC_LCBR, KC_RCBR,KC_AT, KC_PERC, ____, KC_LBRC,KC_LPRN,KC_RPRN,KC_UNDS, ____, ____, ____,\
|
||||||
@@ -118,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* ---------------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[_MOV] = KEYMAP (\
|
[_MOV] = LAYOUT(\
|
||||||
____, B_MAC,B_WIN,B_READ, B_VI, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
____, B_MAC,B_WIN,B_READ, B_VI, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
____, ____, B_PAPP, B_NAPP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
____, ____, B_PAPP, B_NAPP, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
____, B_UNDO, ____, B_BFND, ____, B_PTAB, B_DSOL, B_DLW, B_UP, B_DRW, B_DEOL, ____, ____, ____, \
|
____, B_UNDO, ____, B_BFND, ____, B_PTAB, B_DSOL, B_DLW, B_UP, B_DRW, B_DEOL, ____, ____, ____, \
|
||||||
@@ -127,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____
|
||||||
),
|
),
|
||||||
|
|
||||||
[_TRAN] = KEYMAP (\
|
[_TRAN] = LAYOUT(\
|
||||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, \
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# A more programmer oriented keymap for Microsoft Sculpt Mobile
|
||||||
File renamed without changes.
@@ -0,0 +1 @@
|
|||||||
|
#include "ms_sculpt_mobile.h"
|
||||||
+2
-2
@@ -4,7 +4,7 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
|
|
||||||
#define KEYMAP( \
|
#define LAYOUT( \
|
||||||
k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \
|
k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \
|
||||||
k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \
|
k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \
|
||||||
k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \
|
k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define MATRIX_TESTING_KEYMAP( \
|
#define MATRIX_TESTING_LAYOUT( \
|
||||||
k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\
|
k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\
|
||||||
k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\
|
k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\
|
||||||
k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\
|
k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
# Microsoft Sculpt Mobile
|
||||||
|
|
||||||
|
This is a way to take a Microsoft ergonomic bluetooth keyboard, and make it
|
||||||
|
into a hard-wired keyboard running QMK.
|
||||||
|
|
||||||
|
The keyboard is known under several different names:
|
||||||
|
Mobile Bluetooth 5000, Mobile 6000, Sculpt mobile, and Asus rebranded.
|
||||||
|
|
||||||
|
I had a stack of them, since they're cheap on ebay, travel well, and are just ergo enough.
|
||||||
|
|
||||||
|
The ribbon cable is 1mm pitch, which is hard to hand solder. I bought a cheap set of
|
||||||
|
"pitch adapter" boards https://www.amazon.com/Double-Sided-0-4mm-1-0-Adapter-60mmx38mm/dp/B00OK42118
|
||||||
|
|
||||||
|
Cut the original ribbon cable sockets off the bluetooth board using a razor, they're hard to desolder.
|
||||||
|
They're also allow the cable to be inserted on top or bottom.
|
||||||
|
|
||||||
|
If I was going to do it again, I'd make the MCU connection come out the top of the keyboard
|
||||||
|
and avoid the wires dangling out the bottom.
|
||||||
|
|
||||||
|
As I was debugging the matrix, I started to get random failures. In desparation I tried a second MCU,
|
||||||
|
but had the same problems. It turns out that the ribbon cable connections can get worn. Shave a
|
||||||
|
half millimeter off the end of the ribbon cable & the errors go away.
|
||||||
|
|
||||||
|
My method for discovering the matrix was to set up a LAYOUT macro that included all pins.
|
||||||
|
See MATRIX_TESTING_LAYOUT if you need it. Then set up a keymap that has all printable symbols
|
||||||
|
in the first 4 rows. test each key & record output. Then switch the printable symbols to the
|
||||||
|
bottom 4 rows & repeat. This was enough to show the matrix.
|
||||||
|
|
||||||
|
|
||||||
|
The full original keymap for the Sculpt is
|
||||||
|
|
||||||
|
| | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R |
|
||||||
|
|:-:|:--:|:--:|:--:|:---:|:---:|:---:|:----:|:----:|:----:|:-----:|:----:|:------:|:----:|:-----:|:----:|:------:|:----:|:---:|
|
||||||
|
| 0 | b | n | m | , | . | / | | | | Caps | | | | | | | | Fn |
|
||||||
|
| 1 | g | h | " | | | | | | | | Vol+ | Mute | RCtl | | Vol- | PgDn | LCtl | |
|
||||||
|
| 2 | 7 | 8 | 9 | 0 | Del | | PgUp | | | | | RShift | | | | LShift | | |
|
||||||
|
| 3 | p | [ | ] | \ | | | | | | | RAlt | | | | LAlt | | | |
|
||||||
|
| 4 | y | u | i | o | | | | | | | | | | LGUI | | | | |
|
||||||
|
| 5 | ~ | - | += | j | k | l | ; | 5 | 6 | Bksp | 1 | 2 | 3 | 4 | F4 | F5 | F6 | |
|
||||||
|
| 6 | a | s | d | q | w | e | Up | Left | Down | Right | | | | Space | F1 | F2 | F3 | Tab |
|
||||||
|
| 7 | F7 | F8 | F9 | F10 | F11 | F12 | | f | r | t | z | x | c | | v | Enter | Esc | |
|
||||||
|
|
||||||
|
This works with 18 cols + 8 rows on a Teensy++, or ARM-based Teensy.
|
||||||
|
|
||||||
|
The Astar mini has all pins exposed , so you can do 18x8
|
||||||
|
If you want a speaker, LEDs, etc., you'll need to free up a pin. I recommend joining columns
|
||||||
|
R and L to the same pin.
|
||||||
|
|
||||||
|
Building - add ASTAR=1 to the compile line or leave out for teensy2++
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make handwired/ms_sculpt_mobile:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
File renamed without changes.
@@ -71,5 +71,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{{ RANDOM_STRING_MACRO }}
|
LAYOUT( RANDOM_STRING_MACRO )
|
||||||
};
|
};
|
||||||
@@ -1 +1,12 @@
|
|||||||
#include "quantum.h"
|
#ifndef NICEKEY_H
|
||||||
|
#define NICEKEY_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00 \
|
||||||
|
) { \
|
||||||
|
{ k00 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Custom handwired nicekey, a one key keyboard that writes random compliments.
|
Custom handwired nicekey, a one key keyboard that writes random compliments.
|
||||||
|
|
||||||
Keyboard Maintainer: spydon
|
Keyboard Maintainer: [spydon](https://github.com/spydon)
|
||||||
Hardware Supported: Custom handwired one key
|
Hardware Supported: Custom handwired one key
|
||||||
Hardware Availability:
|
Hardware Availability:
|
||||||
|
|
||||||
@@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment):
|
|||||||
|
|
||||||
make handwired/nicekey:default
|
make handwired/nicekey:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "onekey.h"
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
{{ KC_A }}
|
LAYOUT( KC_A )
|
||||||
};
|
};
|
||||||
@@ -1 +1,12 @@
|
|||||||
#include "quantum.h"
|
#ifndef ONEKEY_H
|
||||||
|
#define ONEKEY_H
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT( \
|
||||||
|
k00 \
|
||||||
|
) { \
|
||||||
|
{ k00 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment):
|
|||||||
|
|
||||||
make handwired/onekey:default
|
make handwired/onekey:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
||||||
@@ -593,19 +593,39 @@ void matrix_scan_user(void) {
|
|||||||
if(!RGBAnimation){
|
if(!RGBAnimation){
|
||||||
switch (layer_state) {
|
switch (layer_state) {
|
||||||
case L_BASE:
|
case L_BASE:
|
||||||
led_ripple_effect(0,112,127);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(0,112,127);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(0,112,127);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case L_OPT:
|
case L_OPT:
|
||||||
led_ripple_effect(127,0,100);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(127,0,100);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(127,0,100);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case L_NUM:
|
case L_NUM:
|
||||||
led_ripple_effect(127,23,0);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(127,23,0);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(127,23,0);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case L_SYM:
|
case L_SYM:
|
||||||
led_ripple_effect(0,127,0);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(0,127,0);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(0,127,0);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case L_FUNC:
|
case L_FUNC:
|
||||||
led_ripple_effect(127,0,61);
|
#ifdef RGBLED_BACK
|
||||||
|
led_ripple_effect(127,0,61);
|
||||||
|
#else
|
||||||
|
rgblight_setrgb(127,0,61);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,29 +32,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[_LOWER] = LAYOUT(
|
[_LOWER] = LAYOUT(
|
||||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX,
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_7, KC_8, KC_9, KC_PLUS, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSLS, KC_4, KC_5, KC_6, KC_MINUS, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_VOLU, KC_HOME, KC_LEFT, KC_UP, KC_RGHT, KC_PGUP, KC_WH_U, KC_MS_L, KC_MS_U, KC_MS_R, XXXXXXX, KC_BTN4,
|
KC_VOLU, KC_HOME, KC_LEFT, KC_UP, KC_RGHT, KC_PGUP, KC_PAST, KC_1, KC_2, KC_3, KC_EQL, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_VOLD, KC_END, KC_INS, KC_DOWN, KC_DEL, KC_PGDN, KC_MUTE, XXXXXXX, KC_WH_D, KC_WH_L, KC_MS_D, KC_WH_R, KC_BTN3, KC_BTN5,
|
KC_VOLD, KC_END, KC_INS, KC_DOWN, KC_DEL, KC_PGDN, KC_MUTE, _______, _______, KC_0, KC_COMM, KC_DOT, KC_ENT, _______,
|
||||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
_______, _______, _______, KC_BTN1, KC_BTN2, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||||
),
|
),
|
||||||
|
|
||||||
[_RAISE] = LAYOUT(
|
[_RAISE] = LAYOUT(
|
||||||
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
KC_GRAVE,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_TILD, KC_PIPE, KC_LT, KC_GT, _______, _______, _______, _______, _______, _______, _______, _______,
|
KC_GRAVE, KC_TILD, KC_UNDS, KC_EQL, KC_PIPE, _______, _______, _______, _______, _______, _______, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_BSLASH,KC_LCBR, KC_RCBR, KC_MINUS, KC_LBRC, KC_RBRC, _______, KC_LEFT, KC_UP, KC_RGHT, _______, _______,
|
KC_BSLASH,KC_LCBR, KC_RCBR, KC_MINUS, KC_LBRC, KC_RBRC, _______, KC_LEFT, KC_UP, KC_RGHT, _______, _______,
|
||||||
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
KC_COLN, KC_UNDS, KC_LPRN, KC_PLUS, KC_RPRN, KC_EQL, KC_UNDO, _______, _______, _______, KC_DOWN, _______, _______, _______,
|
KC_COLN, KC_LT, KC_GT, KC_PLUS, KC_LPRN, KC_RPRN, _______, _______, _______, _______, KC_DOWN, _______, _______, _______,
|
||||||
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
KC_CUT, KC_COPY, KC_PSTE, _______, _______, _______
|
_______, _______, _______, _______, _______, _______
|
||||||
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
// └────────┴────────┴────────┘ └────────┴────────┴────────┘
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
[1] = LAYOUT(
|
[1] = LAYOUT(
|
||||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
|
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
|
||||||
|
|||||||
@@ -9,8 +9,15 @@ extern keymap_config_t keymap_config;
|
|||||||
TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \
|
TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \
|
||||||
TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY))
|
TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY))
|
||||||
|
|
||||||
|
#define _GMLayer LAYOUT( \
|
||||||
|
KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, /**/KC_F, KC_G, KC_C, KC_R, KC_L, \
|
||||||
|
KC_A, KC_O, KC_E, KC_U, KC_I, /**/KC_D, KC_H, ALT_T(KC_T), SFT_T(KC_N), CTL_T(KC_S), \
|
||||||
|
KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, /**/KC_B, KC_M, KC_W, KC_V, KC_Z, \
|
||||||
|
TD(DA_UPLY), MO(_VL), KC_TAB, KC_BSPACE, KC_ESC, /**/KC_INS, KC_HOME, KC_PGUP, MO(_VL), TD(DA_UPLY), \
|
||||||
|
TD(DA_DWLY), TD(DA_LCTL), KC_SPC, TD(DA_LSPR), LSFT_T(KC_CAPS),/**/SFT_T(KC_CAPS), TD(DA_RALT), KC_ENT, TD(DA_RCTL), TD(DA_DWLY))
|
||||||
|
|
||||||
#define _upLayer LAYOUT( \
|
#define _upLayer LAYOUT( \
|
||||||
KC_4, KC_5, KC_6, _______, _______,/**/ _______, KC_RBRC, _______, _______, _______, \
|
KC_4, KC_5, KC_6, KC_YREG, _______,/**/ _______, KC_RBRC, _______, _______, _______, \
|
||||||
LCTL_T(KC_1), LSFT_T(KC_2), LALT_T(KC_3), _______, _______,/**/ KC_LBRC, KC_BSLS, _______, _______, _______, \
|
LCTL_T(KC_1), LSFT_T(KC_2), LALT_T(KC_3), _______, _______,/**/ KC_LBRC, KC_BSLS, _______, _______, _______, \
|
||||||
KC_7, KC_8, KC_9, KC_0, KC_GRV, /**/ KC_SLSH, _______, _______, _______, _______, \
|
KC_7, KC_8, KC_9, KC_0, KC_GRV, /**/ KC_SLSH, _______, _______, _______, _______, \
|
||||||
_______, _______, _______, _______, _______,/**/ KC_DEL, KC_END, KC_PGDN, _______, _______, \
|
_______, _______, _______, _______, _______,/**/ KC_DEL, KC_END, KC_PGDN, _______, _______, \
|
||||||
@@ -35,4 +42,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
[_UL] = _upLayer,
|
[_UL] = _upLayer,
|
||||||
[_DL] = _downLayer,
|
[_DL] = _downLayer,
|
||||||
[_VL] = _upLayer,
|
[_VL] = _upLayer,
|
||||||
[_AL] = _astdLayer};
|
[_AL] = _astdLayer,
|
||||||
|
[_GM] = _GMLayer};
|
||||||
|
|
||||||
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
if (record->event.pressed) {
|
||||||
|
switch (keycode) {
|
||||||
|
case YREG:
|
||||||
|
SEND_STRING("\"0p");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#ifndef CONFIG_USER_H
|
||||||
|
#define CONFIG_USER_H
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_SERIAL
|
||||||
|
/* #define USE_I2C */
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
/* #define _MASTER_RIGHT */
|
||||||
|
/* #define EE_HANDS */
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _FN0 0
|
||||||
|
#define _FN1 1
|
||||||
|
#define _FN2 2
|
||||||
|
|
||||||
|
#define KC_X1 MO(_FN1)
|
||||||
|
#define KC_X2 MO(_FN2)
|
||||||
|
|
||||||
|
#define KC_LPRN LSFT(KC_9) // (
|
||||||
|
#define KC_RPRN LSFT(KC_0) // )
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐
|
||||||
|
* │ ESC │ q │ w │ e │ r │ t │ │ y │ u │ i │ o │ p │ BS │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ CTRL │ a │ s │ d │ f │ g │ │ h │ j │ k │ l │ " ' │ RET │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ SHFT │ z │ x │ c │ v │ b │ │ n │ m │ [ { │ ] } │ ; : │ SHFT │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ L1 │ ALT │ L2 │ TAB | SPC │ SPC │ │ SPC │ SPC │ , < │ . > │ - _ │ / ? │
|
||||||
|
* └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_FN0] = LAYOUT_ortho_4x12( \
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
|
||||||
|
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, \
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_LBRC, KC_RBRC, KC_SCLN, KC_RSFT, \
|
||||||
|
KC_X1, KC_LALT, KC_X2, KC_TAB, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_COMM, KC_DOT, KC_MINS, KC_SLSH \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐
|
||||||
|
* │ │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ DEL │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ │ ä │ ö │ ü │ ß │ │ │ LEFT │ DOWN │ UP │ RGT │ │ │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ │ Ä │ Ö │ Ü │ € │ │ │ │ │ ( │ ) │ │ │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ | │ │ | SPC │ SPC │ │ SPC │ SPC │ │ │ │ \ | │
|
||||||
|
* └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_FN1] = LAYOUT_ortho_4x12( \
|
||||||
|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \
|
||||||
|
_______, UC(L'ä'), UC(L'ö'), UC(L'ü'), UC(L'ß'), _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_PIPE, \
|
||||||
|
_______, UC(L'Ä'), UC(L'Ö'), UC(L'Ü'), UC(L'€'), _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, \
|
||||||
|
_______, _______, _______, KC_TAB, KC_SPC, KC_SPC, KC_SPC, KC_SPC, _______, _______, _______, KC_BSLS \
|
||||||
|
),
|
||||||
|
|
||||||
|
/* ┌──────┬──────┬──────┬──────┬──────┬──────┐ ┌──────┬──────┬──────┬──────┬──────┬──────┐
|
||||||
|
* │ ` │ ! │ @ │ # │ $ │ % │ │ ^ │ & │ * │ ~ │ + │ = │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ │ │ │ │ │ │ │ HOME │ PGDN │ PGUP │ END │ │ │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │
|
||||||
|
* ├──────┼──────┼──────┼──────┼──────┼──────┤ ├──────┼──────┼──────┼──────┼──────┼──────┤
|
||||||
|
* │ │ │ │ │ SPC │ SPC │ │ SPC │ SPC │ │ VOL+ │ VOL- │ MUTE │
|
||||||
|
* └──────┴──────┴──────┴──────┴──────┴──────┘ └──────┴──────┴──────┴──────┴──────┴──────┘
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_FN2] = LAYOUT_ortho_4x12( \
|
||||||
|
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_TILD, KC_PLUS, KC_PEQL, \
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \
|
||||||
|
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_SPC, KC_SPC, KC_SPC, KC_SPC, _______, KC_VOLD, KC_VOLU, KC_MUTE \
|
||||||
|
)
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
set_unicode_input_mode(UC_LNX);
|
||||||
|
};
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
AUTO_SHIFT_ENABLE = no
|
||||||
|
AUTO_SHIFT_MODIFIERS = no
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
BACKLIGHT_ENABLE = no
|
||||||
|
UNICODE_ENABLE = yes
|
||||||
|
DEFAULT_FOLDER = levinson/rev2
|
||||||
|
|
||||||
|
ifndef QUANTUM_DIR
|
||||||
|
include ../../../../Makefile
|
||||||
|
endif
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2017 Danny Nguyen <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* Use I2C or Serial, not both */
|
||||||
|
|
||||||
|
#define USE_I2C
|
||||||
|
// #define USE_SERIAL
|
||||||
|
|
||||||
|
|
||||||
|
#define FORCE_NKRO //For Steno.
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "keymap_steno.h"
|
||||||
|
|
||||||
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
|
#define _PLOVER 0
|
||||||
|
#define _QWERTY 1
|
||||||
|
#define _LOWER 2
|
||||||
|
#define _RAISE 3
|
||||||
|
#define _ADJUST 4
|
||||||
|
|
||||||
|
enum custom_keycodes
|
||||||
|
{
|
||||||
|
PLOVER = SAFE_RANGE,
|
||||||
|
QWERTY,
|
||||||
|
LOWER,
|
||||||
|
RAISE,
|
||||||
|
ADJUST,
|
||||||
|
EXT_QWE,
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] =
|
||||||
|
{
|
||||||
|
|
||||||
|
[_PLOVER] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
STN_PWR, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
STN_FN, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
XXXXXXX, STN_RE1, STN_RE2, XXXXXXX, STN_A, STN_O, STN_E, STN_U, XXXXXXX, XXXXXXX, QWERTY, XXXXXXX
|
||||||
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
[_QWERTY] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
KC_LGUI, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
KC_LALT, KC_MINUS, KC_TAB, KC_LCTL, LOWER, KC_SPC, KC_ENT, RAISE, KC_RCTL, KC_RGUI, EXT_QWE, KC_RALT
|
||||||
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
[_LOWER] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_7, KC_8, KC_9, KC_PLUS, _______,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
KC_F7, KC_F8, KC_LEFT, KC_UP, KC_RGHT, KC_F9, KC_PSLS, KC_4, KC_5, KC_6, KC_MINUS, KC_MUTE,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______, KC_F10, KC_F11, KC_DOWN, KC_F11, KC_F12, KC_PAST, KC_1, KC_2, KC_3, KC_EQL, KC_VOLU,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______, _______, _______, _______, _______, _______, KC_0, _______, KC_COMM, KC_DOT, KC_ENT, KC_VOLD
|
||||||
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
[_RAISE] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
KC_GRAVE, KC_TILD, KC_UNDS, KC_EQL, KC_PIPE, _______, KC_HOME, KC_DEL, _______, KC_INS, KC_PGUP, _______,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
KC_BSLASH,KC_LCBR, KC_RCBR, KC_MINUS, KC_LBRC, KC_RBRC, KC_END, KC_LEFT, KC_UP, KC_RGHT, KC_PGDN, _______,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
KC_COLN, KC_LT, KC_GT, KC_PLUS, KC_LPRN, KC_RPRN, _______, _______, KC_DOWN, _______, _______, _______,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
[_ADJUST] = LAYOUT(
|
||||||
|
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
|
||||||
|
_______, _______, KC_CAPS, KC_MENU, KC_APP, KC_PSCR, _______, _______, _______, _______, _______, _______,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______, _______,_______, _______, _______, KC_PAUS, _______, _______, _______, _______, _______, _______,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______, _______, _______, _______, _______, KC_SLCK, _______, _______, _______, _______, _______, _______,
|
||||||
|
//├────────┼────────┼────────┼────────┼────────┼────────┼ ┼────────┼────────┼────────┼────────┼────────┼────────┤
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
//└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴ ┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void matrix_init_user() {
|
||||||
|
steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case PLOVER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
set_single_persistent_default_layer(_PLOVER);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case LOWER:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_LOWER);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case RAISE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_RAISE);
|
||||||
|
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case ADJUST:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_on(_ADJUST);
|
||||||
|
} else {
|
||||||
|
layer_off(_ADJUST);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case QWERTY:
|
||||||
|
if (!record->event.pressed) {
|
||||||
|
layer_on(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case EXT_QWE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
layer_off(_QWERTY);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
EXTRAKEY_ENABLE = no # Disable if you run out of usb endpoints. Media keys need this to work.
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys(+4700) Uses extra usb enpoints.
|
||||||
|
STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER.
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
NKRO_ENABLE = yes
|
||||||
|
BOOTMAGIC_ENABLE = yes
|
||||||
@@ -32,17 +32,64 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
#define MATRIX_COLS 15
|
#define MATRIX_COLS 15
|
||||||
|
|
||||||
|
/* MCU Port name definitions */
|
||||||
#define PA 0
|
#define PA 0
|
||||||
#define PB 1
|
#define PB 1
|
||||||
|
|
||||||
|
/* Port and Pin definition of key row hardware configuration */
|
||||||
#define MATRIX_ROW_PORTS PA, PA, PA, PA, PA
|
#define MATRIX_ROW_PORTS PA, PA, PA, PA, PA
|
||||||
#define MATRIX_ROW_PINS 0, 1, 2, 3, 4
|
#define MATRIX_ROW_PINS 0, 1, 2, 3, 4
|
||||||
|
|
||||||
|
/* Port and Pin definition of key column hardware configuration */
|
||||||
#define MATRIX_COL_PORTS PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PA, PA, PA, PA, PA
|
#define MATRIX_COL_PORTS PB, PB, PB, PB, PB, PB, PB, PB, PB, PB, PA, PA, PA, PA, PA
|
||||||
#define MATRIX_COL_PINS 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 10, 11
|
#define MATRIX_COL_PINS 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 10, 11
|
||||||
|
|
||||||
/* Print boot debug codes using debug LED when M28 and M30 shorted */
|
/* This Shift Register expands available hardware output lines to control additional peripherals */
|
||||||
#define DEBUG_BOOT_TRACING
|
/* It uses four lines from the MCU to provide 16 output lines */
|
||||||
|
/* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */
|
||||||
|
#define SR_EXP_RCLK_PORT PB
|
||||||
|
#define SR_EXP_RCLK_PIN 14
|
||||||
|
/* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */
|
||||||
|
#define SR_EXP_OE_N_PORT PB
|
||||||
|
#define SR_EXP_OE_N_PIN 15
|
||||||
|
/* SERCOM port to use for Shift Register SPI */
|
||||||
|
/* DATAOUT and SCLK must be configured to use hardware pins of this port */
|
||||||
|
#define SR_EXP_SERCOM SERCOM2
|
||||||
|
/* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */
|
||||||
|
#define SR_EXP_DATAOUT_PORT PA
|
||||||
|
#define SR_EXP_DATAOUT_PIN 12
|
||||||
|
#define SR_EXP_DATAOUT_MUX 2
|
||||||
|
/* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */
|
||||||
|
#define SR_EXP_SCLK_PORT PA
|
||||||
|
#define SR_EXP_SCLK_PIN 13
|
||||||
|
#define SR_EXP_SCLK_MUX 2
|
||||||
|
|
||||||
|
/* Debug LED (Small LED Located near MCU) */
|
||||||
|
#define DEBUG_LED_ENABLE 1
|
||||||
|
#define DEBUG_LED_PORT PA
|
||||||
|
#define DEBUG_LED_PIN 27
|
||||||
|
|
||||||
|
/* Additional debugging ports */
|
||||||
|
/* PCB M21 */
|
||||||
|
#define DEBUG_PORT1_ENABLE 1
|
||||||
|
#define DEBUG_PORT1_PORT PB
|
||||||
|
#define DEBUG_PORT1_PIN 3
|
||||||
|
/* PCB M23 */
|
||||||
|
#define DEBUG_PORT2_ENABLE 1
|
||||||
|
#define DEBUG_PORT2_PORT PB
|
||||||
|
#define DEBUG_PORT2_PIN 17
|
||||||
|
/* PCB M25 */
|
||||||
|
#define DEBUG_PORT3_ENABLE 1
|
||||||
|
#define DEBUG_PORT3_PORT PA
|
||||||
|
#define DEBUG_PORT3_PIN 20
|
||||||
|
|
||||||
|
/* Debug Boot Tracing - During boot sequence, ground this pin to halt and display debug code using Debug LED */
|
||||||
|
/* This is useful in determining which hardware device may have malfunctioned or is improperly configured */
|
||||||
|
/* Feature is automatically disabled after successful boot */
|
||||||
|
/* PCB M27 */
|
||||||
|
#define DEBUG_BOOT_TRACING_ENABLE 1
|
||||||
|
#define DEBUG_BOOT_TRACING_PORT PB
|
||||||
|
#define DEBUG_BOOT_TRACING_PIN 23
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCING_DELAY 5
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ void matrix_init(void)
|
|||||||
PORT->Group[col_ports[col]].DIRSET.reg = 1 << col_pins[col]; //Output
|
PORT->Group[col_ports[col]].DIRSET.reg = 1 << col_pins[col]; //Output
|
||||||
PORT->Group[col_ports[col]].OUTCLR.reg = 1 << col_pins[col]; //Low
|
PORT->Group[col_ports[col]].OUTCLR.reg = 1 << col_pins[col]; //Low
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ uint8_t matrix_scan(void)
|
|||||||
|
|
||||||
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
||||||
|
|
||||||
//m15_off; //Profiling scans
|
//DBG_1_OFF; //Profiling scans
|
||||||
|
|
||||||
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ uint8_t matrix_scan(void)
|
|||||||
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//m15_on; //Profiling scans
|
//DBG_1_ON; //Profiling scans
|
||||||
|
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
|||||||
@@ -32,17 +32,64 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 11
|
#define MATRIX_ROWS 11
|
||||||
#define MATRIX_COLS 8
|
#define MATRIX_COLS 8
|
||||||
|
|
||||||
|
/* MCU Port name definitions */
|
||||||
#define PA 0
|
#define PA 0
|
||||||
#define PB 1
|
#define PB 1
|
||||||
|
|
||||||
|
/* Port and Pin definition of key row hardware configuration */
|
||||||
#define MATRIX_ROW_PORTS PB, PB, PB, PB, PB, PB, PA, PA, PB, PB, PB
|
#define MATRIX_ROW_PORTS PB, PB, PB, PB, PB, PB, PA, PA, PB, PB, PB
|
||||||
#define MATRIX_ROW_PINS 4, 5, 6, 7, 8, 9, 10, 11, 10, 11, 12
|
#define MATRIX_ROW_PINS 4, 5, 6, 7, 8, 9, 10, 11, 10, 11, 12
|
||||||
|
|
||||||
|
/* Port and Pin definition of key column hardware configuration */
|
||||||
#define MATRIX_COL_PORTS PA, PA, PA, PA, PA, PA, PA, PA
|
#define MATRIX_COL_PORTS PA, PA, PA, PA, PA, PA, PA, PA
|
||||||
#define MATRIX_COL_PINS 0, 1, 2, 3, 4, 5, 6, 7
|
#define MATRIX_COL_PINS 0, 1, 2, 3, 4, 5, 6, 7
|
||||||
|
|
||||||
/* Print boot debug codes using debug LED when M28 and M30 shorted */
|
/* This Shift Register expands available hardware output lines to control additional peripherals */
|
||||||
#define DEBUG_BOOT_TRACING
|
/* It uses four lines from the MCU to provide 16 output lines */
|
||||||
|
/* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */
|
||||||
|
#define SR_EXP_RCLK_PORT PB
|
||||||
|
#define SR_EXP_RCLK_PIN 14
|
||||||
|
/* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */
|
||||||
|
#define SR_EXP_OE_N_PORT PB
|
||||||
|
#define SR_EXP_OE_N_PIN 15
|
||||||
|
/* SERCOM port to use for Shift Register SPI */
|
||||||
|
/* DATAOUT and SCLK must be configured to use hardware pins of this port */
|
||||||
|
#define SR_EXP_SERCOM SERCOM2
|
||||||
|
/* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */
|
||||||
|
#define SR_EXP_DATAOUT_PORT PA
|
||||||
|
#define SR_EXP_DATAOUT_PIN 12
|
||||||
|
#define SR_EXP_DATAOUT_MUX 2
|
||||||
|
/* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */
|
||||||
|
#define SR_EXP_SCLK_PORT PA
|
||||||
|
#define SR_EXP_SCLK_PIN 13
|
||||||
|
#define SR_EXP_SCLK_MUX 2
|
||||||
|
|
||||||
|
/* Debug LED (Small LED Located near MCU) */
|
||||||
|
#define DEBUG_LED_ENABLE 1
|
||||||
|
#define DEBUG_LED_PORT PA
|
||||||
|
#define DEBUG_LED_PIN 27
|
||||||
|
|
||||||
|
/* Additional debugging ports */
|
||||||
|
/* PCB M21 */
|
||||||
|
#define DEBUG_PORT1_ENABLE 1
|
||||||
|
#define DEBUG_PORT1_PORT PB
|
||||||
|
#define DEBUG_PORT1_PIN 3
|
||||||
|
/* PCB M23 */
|
||||||
|
#define DEBUG_PORT2_ENABLE 1
|
||||||
|
#define DEBUG_PORT2_PORT PB
|
||||||
|
#define DEBUG_PORT2_PIN 17
|
||||||
|
/* PCB M25 */
|
||||||
|
#define DEBUG_PORT3_ENABLE 1
|
||||||
|
#define DEBUG_PORT3_PORT PA
|
||||||
|
#define DEBUG_PORT3_PIN 20
|
||||||
|
|
||||||
|
/* Debug Boot Tracing - During boot sequence, ground this pin to halt and display debug code using Debug LED */
|
||||||
|
/* This is useful in determining which hardware device may have malfunctioned or is improperly configured */
|
||||||
|
/* Feature is automatically disabled after successful boot */
|
||||||
|
/* PCB M27 */
|
||||||
|
#define DEBUG_BOOT_TRACING_ENABLE 1
|
||||||
|
#define DEBUG_BOOT_TRACING_PORT PB
|
||||||
|
#define DEBUG_BOOT_TRACING_PIN 23
|
||||||
|
|
||||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||||
#define DEBOUNCING_DELAY 5
|
#define DEBOUNCING_DELAY 5
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ void matrix_init(void)
|
|||||||
PORT->Group[col_ports[col]].DIRSET.reg = 1 << col_pins[col]; //Output
|
PORT->Group[col_ports[col]].DIRSET.reg = 1 << col_pins[col]; //Output
|
||||||
PORT->Group[col_ports[col]].OUTCLR.reg = 1 << col_pins[col]; //Low
|
PORT->Group[col_ports[col]].OUTCLR.reg = 1 << col_pins[col]; //Low
|
||||||
}
|
}
|
||||||
|
|
||||||
matrix_init_quantum();
|
matrix_init_quantum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ uint8_t matrix_scan(void)
|
|||||||
|
|
||||||
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active
|
||||||
|
|
||||||
//m15_off; //Profiling scans
|
//DBG_1_OFF; //Profiling scans
|
||||||
|
|
||||||
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ uint8_t matrix_scan(void)
|
|||||||
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
//m15_on; //Profiling scans
|
//DBG_1_ON; //Profiling scans
|
||||||
|
|
||||||
matrix_scan_quantum();
|
matrix_scan_quantum();
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
|
|
||||||
#include "planck.h"
|
#include "planck.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "eeconfig.h"
|
#include "eeconfig.h"
|
||||||
@@ -38,10 +37,6 @@ enum planck_keycodes {
|
|||||||
|
|
||||||
#include "dynamic_macro.h"
|
#include "dynamic_macro.h"
|
||||||
|
|
||||||
// Fillers to make layering more clear
|
|
||||||
#define _______ KC_TRNS
|
|
||||||
#define XXXXXXX KC_NO
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
/* Qwerty
|
/* Qwerty
|
||||||
@@ -55,12 +50,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
* | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_QWERTY] = {
|
[_QWERTY] = LAYOUT_planck_grid(
|
||||||
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC },
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
{MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) },
|
MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT),
|
||||||
{KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT },
|
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT,
|
||||||
{MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2) }
|
MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2)
|
||||||
},
|
),
|
||||||
|
|
||||||
/* Function
|
/* Function
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -73,12 +68,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
|
* | Fn | Ctrl | Alt | GUI |Lower | Bksp |Space |Mouse | MENU | Alt | Ctrl | Fn |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_FUNC] = {
|
[_FUNC] = LAYOUT_planck_grid(
|
||||||
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
|
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||||
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT },
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT,
|
||||||
{KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) },
|
KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT),
|
||||||
{_______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______ }
|
_______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
/* Lower
|
/* Lower
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -91,12 +86,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play |
|
* | | | | |Lower | Del |Space | | Next | Vol- | Vol+ | Play |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_LOWER] = {
|
[_LOWER] = LAYOUT_planck_grid(
|
||||||
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC },
|
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC,
|
||||||
{LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) },
|
LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC),
|
||||||
{KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) },
|
KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT),
|
||||||
{_______, _______, _______, _______, _______, KC_DEL, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY }
|
_______, _______, _______, _______, _______, KC_DEL, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||||
},
|
),
|
||||||
|
|
||||||
/* Raise
|
/* Raise
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -109,12 +104,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | Mouse| | | | | Alt | Enter|Raise | | | | |
|
* | Mouse| | | | | Alt | Enter|Raise | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_RAISE] = {
|
[_RAISE] = LAYOUT_planck_grid(
|
||||||
{KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN },
|
KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN,
|
||||||
{KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) },
|
KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)),
|
||||||
{_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) },
|
_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS),
|
||||||
{MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______ }
|
MO(_MOUSE), _______, _______, _______, _______, KC_LALT, KC_ENT, _______, XXXXXXX, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
/* Adjust (Lower + Raise)
|
/* Adjust (Lower + Raise)
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -127,12 +122,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | | | | | | | | | |
|
* | | | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ADJUST] = {
|
[_ADJUST] = LAYOUT_planck_grid(
|
||||||
{M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL },
|
M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL,
|
||||||
{KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ },
|
KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______,
|
||||||
{TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ },
|
TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
/* Mouse
|
/* Mouse
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -145,12 +140,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | | | | | | | | | | |
|
* | | | | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_MOUSE] = {
|
[_MOUSE] = LAYOUT_planck_grid(
|
||||||
{KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ },
|
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______,
|
||||||
{KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ },
|
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
/* Function 2 (Right hand side)
|
/* Function 2 (Right hand side)
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -163,47 +158,47 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | | | | | | | | | | |
|
* | | | | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_FUNC2] = {
|
[_FUNC2] = LAYOUT_planck_grid(
|
||||||
{_______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______},
|
_______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,
|
||||||
{_______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______},
|
_______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||||
{_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) },
|
_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) ,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
[_MAC] = {
|
[_MAC] = LAYOUT_planck_grid(
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2 }
|
MFNC, _______, _______, _______, MLWR, _______, _______, MRSE, _______, _______, _______, MFNC2
|
||||||
},
|
),
|
||||||
|
|
||||||
[_MLWR] = {
|
[_MLWR] = LAYOUT_planck_grid(
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
[_MRSE] = {
|
[_MRSE] = LAYOUT_planck_grid(
|
||||||
{_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) },
|
_______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL),
|
||||||
{_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) },
|
_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS),
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
[_MFNC]= {
|
[_MFNC]= LAYOUT_planck_grid(
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) },
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT),
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
[_MFNC2] = {
|
[_MFNC2] = LAYOUT_planck_grid(
|
||||||
{_______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______},
|
_______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,
|
||||||
{_______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______},
|
_______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||||
{_______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) },
|
_______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) ,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ the second is the output when shift is applied.
|
|||||||
|
|
||||||
**Note:** The below tables assume a UK layout.
|
**Note:** The below tables assume a UK layout.
|
||||||
|
|
||||||
|
####Flashing
|
||||||
|
Rev <=5: sudo make planck:ajp10304:dfu
|
||||||
|
Rev 6: sudo make planck/rev6:ajp10304:dfu-util
|
||||||
|
|
||||||
##### Main Qwerty Layer
|
##### Main Qwerty Layer
|
||||||
|
|
||||||
* Tab: when held, operates as shift.
|
* Tab: when held, operates as shift.
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ When you are done, press `Media` and `Enter`. You will finally hear a tune confi
|
|||||||
|
|
||||||
Press `Media` and the key where you stored your Macro, either `;` or `'`. The Macro will play.
|
Press `Media` and the key where you stored your Macro, either `;` or `'`. The Macro will play.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
http://www.keyboard-layout-editor.com/#/gists/4cfb26f84bbb4fabe5e6c7cc22c85e24
|
http://www.keyboard-layout-editor.com/#/gists/4cfb26f84bbb4fabe5e6c7cc22c85e24
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
// Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6
|
// Layout picture at http://www.keyboard-layout-editor.com/#/gists/125febfad6960add078e6f14256539b6
|
||||||
|
|
||||||
#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example"
|
#include QMK_KEYBOARD_H
|
||||||
#include "planck.h"
|
|
||||||
#include "action_layer.h"
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -79,12 +77,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | Ctrl | GUI | Alt | Mute | Lower| Space | Raise| / | Left | Down | Right|
|
* | Ctrl | GUI | Alt | Mute | Lower| Space | Raise| / | Left | Down | Right|
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_QWERTY] = {
|
[_QWERTY] = LAYOUT_planck_grid(
|
||||||
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||||
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||||
{SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT},
|
SFT_CAP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, SFT_ENT,
|
||||||
{KC_LCTL, KC_LGUI, KC_LALT, MEDIA, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT}
|
KC_LCTL, KC_LGUI, KC_LALT, MEDIA, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
},
|
),
|
||||||
|
|
||||||
/* NUMPAD
|
/* NUMPAD
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -97,12 +95,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | | | | | | 0 | . | , | = |
|
* | | | | | | | | 0 | . | , | = |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_NUMPAD] = {
|
[_NUMPAD] = LAYOUT_planck_grid(
|
||||||
{QWERTY, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS},
|
QWERTY, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||||
{_______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS},
|
_______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||||
{_______, KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_P1, KC_P2, KC_P3, KC_PENT},
|
_______, KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL}
|
_______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_PCMM, KC_PEQL
|
||||||
},
|
),
|
||||||
|
|
||||||
/* LOCK
|
/* LOCK
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -115,30 +113,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | NULL | | | | | | | | | |
|
* | | NULL | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_LOCKED] = {
|
[_LOCKED] = LAYOUT_planck_grid(
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT},
|
KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT,
|
||||||
{_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
_______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
/* RAISE
|
/* RAISE
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* | Del | F1 | F2 | F3 | F4 | F5 | | - | = | [ | ] | \ |
|
* | Del | F11 | F12 | F13 | F14 | F15 | | - | = | [ | ] | \ |
|
||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* |LShift| F6 | F7 | F8 | F9 | F10 | |ISO # |ISO / | NULL | PgUp | Enter|
|
* |LShift| F16 | F17 | F18 | F19 | F20 | |ISO # |ISO / | NULL | PgUp | Enter|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | | | | F11 | | F12 | | | Home | PgDn | End |
|
* | | | | | | | | | Home | PgDn | End |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_RAISE] = {
|
[_RAISE] = LAYOUT_planck_grid(
|
||||||
{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_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
|
||||||
{KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
|
KC_DEL , KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||||
{KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, KC_NUHS, KC_NUBS, XXXXXXX, KC_PGUP, KC_ENT },
|
KC_LSFT, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, KC_NUHS, KC_NUBS, XXXXXXX, KC_PGUP, KC_ENT,
|
||||||
{_______, _______, _______, KC_F11, _______, KC_F12, KC_F12, _______, _______, KC_HOME, KC_PGDN, KC_END }
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
},
|
),
|
||||||
|
|
||||||
/* LOWER
|
/* LOWER
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -148,15 +146,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
* |LShift| F6 | F7 | F8 | F9 | F10 | |ISO ~ |ISO | | NULL | PgUp | Enter|
|
* |LShift| F6 | F7 | F8 | F9 | F10 | |ISO ~ |ISO | | NULL | PgUp | Enter|
|
||||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||||
* | | | | F11 | | F12 | | | Home | PgDn | End |
|
* | | | | | | | | | Home | PgDn | End |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_LOWER] = {
|
[_LOWER] = LAYOUT_planck_grid(
|
||||||
{KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
|
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL ,
|
||||||
{KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
|
KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||||
{KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, S(KC_NUHS), S(KC_NUBS), XXXXXXX, KC_PGUP, KC_ENT },
|
KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, S(KC_NUHS), S(KC_NUBS), XXXXXXX, KC_PGUP, KC_ENT ,
|
||||||
{_______, _______, _______, KC_F11, _______, KC_F12, KC_F12, _______, _______, KC_HOME, KC_PGDN, KC_END }
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
|
||||||
},
|
),
|
||||||
|
|
||||||
/* MEDIA AND COMMANDS
|
/* MEDIA AND COMMANDS
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -169,12 +167,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |ONESHT| NULL | NULL | | Vol- | Mute | Vol+ |Zoom 0| Stop | Next | Play |
|
* |ONESHT| NULL | NULL | | Vol- | Mute | Vol+ |Zoom 0| Stop | Next | Play |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_MEDIA] = {
|
[_MEDIA] = LAYOUT_planck_grid(
|
||||||
{XXXXXXX, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX},
|
XXXXXXX, XXXXXXX, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, KC_AGAIN, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, XXXXXXX,
|
||||||
{XXXXXXX, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2 },
|
XXXXXXX, XXXXXXX, KC_WSCH, XXXXXXX, KC_FIND, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,
|
||||||
{KC_LSFT, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DYN_REC_STOP },
|
KC_LSFT, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ZOOM_OUT, ZOOM_IN, KC_MPRV, DYN_REC_STOP,
|
||||||
{ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY }
|
ONESHOT, XXXXXXX, XXXXXXX, _______, KC_VOLD, KC_MUTE, KC_MUTE, KC_VOLU, ZOOM_NML, KC_MSTP, KC_MNXT, KC_MPLY
|
||||||
},
|
),
|
||||||
|
|
||||||
/* ONESHOT
|
/* ONESHOT
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -187,12 +185,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | | | | | | | | | | | |
|
* | | | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ONESHOT] = {
|
[_ONESHOT] = LAYOUT_planck_grid(
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
},
|
),
|
||||||
|
|
||||||
/* FUNCTIONS
|
/* FUNCTIONS
|
||||||
* ,-----------------------------------------------------------------------------------.
|
* ,-----------------------------------------------------------------------------------.
|
||||||
@@ -205,12 +203,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* | Reset| NULL | LOCK | NULL | | NULL | | NULL |AGNorm|Voice-|AGSwap|
|
* | Reset| NULL | LOCK | NULL | | NULL | | NULL |AGNorm|Voice-|AGSwap|
|
||||||
* `-----------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_FUNCTN] = {
|
[_FUNCTN] = LAYOUT_planck_grid(
|
||||||
{KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PWR },
|
KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PWR,
|
||||||
{KC_WAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
|
KC_WAKE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||||
{XXXXXXX, XXXXXXX, XXXXXXX, AU_OFF, MU_OFF, QWERTY, NUMPAD, MU_ON, AU_ON, XXXXXXX, MUV_IN, KC_SYSREQ},
|
XXXXXXX, XXXXXXX, XXXXXXX, AU_OFF, MU_OFF, QWERTY, NUMPAD, MU_ON, AU_ON, XXXXXXX, MUV_IN, KC_SYSREQ,
|
||||||
{RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, AG_NORM, MUV_DE, AG_SWAP}
|
RESET, XXXXXXX, LOCK, XXXXXXX, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, AG_NORM, MUV_DE, AG_SWAP
|
||||||
}
|
)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
#include "d51_util.h"
|
#include "d51_util.h"
|
||||||
|
|
||||||
//Display unsigned 32-bit number through m15
|
static volatile uint32_t w;
|
||||||
//Read as follows: 1230 = || ||| |||| | (note always ending toggle)
|
|
||||||
void m15_print(uint32_t x)
|
//Display unsigned 32-bit number by port toggling DBG_1 (to view on a scope)
|
||||||
|
//Read as follows: 1230 = | | | | | | || (note zero is fast double toggle)
|
||||||
|
#define DBG_PAUSE 5
|
||||||
|
void dbg_print(uint32_t x)
|
||||||
{
|
{
|
||||||
int8_t t;
|
int8_t t;
|
||||||
uint32_t n;
|
uint32_t n;
|
||||||
@@ -26,24 +29,34 @@ void m15_print(uint32_t x)
|
|||||||
while (p2--) p *= 10;
|
while (p2--) p *= 10;
|
||||||
n = x / p;
|
n = x / p;
|
||||||
x -= n * p;
|
x -= n * p;
|
||||||
while (n > 0)
|
if (!n)
|
||||||
{
|
{
|
||||||
m15_on;
|
DBG_1_ON;
|
||||||
|
DBG_1_OFF;
|
||||||
|
DBG_1_ON;
|
||||||
|
DBG_1_OFF;
|
||||||
n--;
|
n--;
|
||||||
m15_off;
|
|
||||||
}
|
}
|
||||||
//Will always end with an extra toggle
|
else
|
||||||
m15_on;
|
{
|
||||||
|
while (n > 0)
|
||||||
|
{
|
||||||
|
DBG_1_ON;
|
||||||
|
DBG_1_OFF;
|
||||||
|
n--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
t--;
|
t--;
|
||||||
m15_off;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (w = DBG_PAUSE; w; w--); //Long pause after number is complete
|
||||||
}
|
}
|
||||||
|
|
||||||
//Display unsigned 32-bit number through debug led
|
//Display unsigned 32-bit number through debug led
|
||||||
//Read as follows: 1230 = [*] [* *] [* * *] [**] (note zero is fast double flash)
|
//Read as follows: 1230 = [*] [* *] [* * *] [**] (note zero is fast double flash)
|
||||||
#define DLED_ONTIME 1000000
|
#define DLED_ONTIME 1000000
|
||||||
#define DLED_PAUSE 1500000
|
#define DLED_PAUSE 1500000
|
||||||
volatile uint32_t w;
|
|
||||||
void dled_print(uint32_t x, uint8_t long_pause)
|
void dled_print(uint32_t x, uint8_t long_pause)
|
||||||
{
|
{
|
||||||
int8_t t;
|
int8_t t;
|
||||||
@@ -70,13 +83,13 @@ void dled_print(uint32_t x, uint8_t long_pause)
|
|||||||
x -= n * p;
|
x -= n * p;
|
||||||
if (!n)
|
if (!n)
|
||||||
{
|
{
|
||||||
led_on;
|
DBG_LED_ON;
|
||||||
for (w = DLED_ONTIME / 4; w; w--);
|
for (w = DLED_ONTIME / 4; w; w--);
|
||||||
led_off;
|
DBG_LED_OFF;
|
||||||
for (w = DLED_ONTIME / 4; w; w--);
|
for (w = DLED_ONTIME / 4; w; w--);
|
||||||
led_on;
|
DBG_LED_ON;
|
||||||
for (w = DLED_ONTIME / 4; w; w--);
|
for (w = DLED_ONTIME / 4; w; w--);
|
||||||
led_off;
|
DBG_LED_OFF;
|
||||||
for (w = DLED_ONTIME / 4; w; w--);
|
for (w = DLED_ONTIME / 4; w; w--);
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
@@ -84,9 +97,9 @@ void dled_print(uint32_t x, uint8_t long_pause)
|
|||||||
{
|
{
|
||||||
while (n > 0)
|
while (n > 0)
|
||||||
{
|
{
|
||||||
led_on;
|
DBG_LED_ON;
|
||||||
for (w = DLED_ONTIME; w; w--);
|
for (w = DLED_ONTIME; w; w--);
|
||||||
led_off;
|
DBG_LED_OFF;
|
||||||
for (w = DLED_ONTIME / 2; w; w--);
|
for (w = DLED_ONTIME / 2; w; w--);
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
@@ -102,11 +115,52 @@ void dled_print(uint32_t x, uint8_t long_pause)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_BOOT_TRACING
|
#ifdef DEBUG_BOOT_TRACING_ENABLE
|
||||||
|
|
||||||
volatile uint32_t debug_code;
|
volatile uint32_t debug_code;
|
||||||
|
|
||||||
void EIC_15_Handler()
|
//These macros are for compile time substitution
|
||||||
|
#define DEBUG_BOOT_TRACING_EXTINTn (DEBUG_BOOT_TRACING_PIN % _U_(0x10))
|
||||||
|
#define DEBUG_BOOT_TRACING_EXTINTb (_U_(0x1) << DEBUG_BOOT_TRACING_EXTINTn)
|
||||||
|
#define DEBUG_BOOT_TRACING_CONFIG_INDn (DEBUG_BOOT_TRACING_EXTINTn / _U_(0x8))
|
||||||
|
#define DEBUG_BOOT_TRACING_CONFIG_SENSEn (DEBUG_BOOT_TRACING_EXTINTn % _U_(0x8))
|
||||||
|
#define DEBUG_BOOT_TRACING_CONFIG_SENSEb (DEBUG_BOOT_TRACING_CONFIG_SENSEn * _U_(0x4))
|
||||||
|
#define DEBUG_BOOT_TRACING_IRQn (EIC_0_IRQn + DEBUG_BOOT_TRACING_EXTINTn)
|
||||||
|
|
||||||
|
//These macros perform PORT+PIN definition translation to IRQn in the preprocessor
|
||||||
|
#define PORTPIN_TO_IRQn_EXPAND(def) def
|
||||||
|
#define PORTPIN_TO_IRQn_DEF(def) PORTPIN_TO_IRQn_EXPAND(def)
|
||||||
|
#if DEBUG_BOOT_TRACING_PIN < 10
|
||||||
|
#define PORTPIN_TO_IRQn_TODEF(port, pin) PORTPIN_TO_IRQn_DEF(PIN_ ## port ## 0 ## pin ## A_EIC_EXTINT_NUM)
|
||||||
|
#else
|
||||||
|
#define PORTPIN_TO_IRQn_TODEF(port, pin) PORTPIN_TO_IRQn_DEF(PIN_ ## port ## pin ## A_EIC_EXTINT_NUM)
|
||||||
|
#endif
|
||||||
|
#define PORTPIN_TO_IRQn(port, pin) PORTPIN_TO_IRQn_TODEF(port, pin)
|
||||||
|
|
||||||
|
//These macros perform function name output in the preprocessor
|
||||||
|
#define DEBUG_BOOT_TRACING_HANDLER_CONCAT(irq) void EIC_ ## irq ## _Handler(void)
|
||||||
|
#define DEBUG_BOOT_TRACING_HANDLER(irq) DEBUG_BOOT_TRACING_HANDLER_CONCAT(irq)
|
||||||
|
|
||||||
|
//To generate the function name of the IRQ handler catching boot tracing,
|
||||||
|
// certain macros must be undefined, so save their current values to macro stack
|
||||||
|
#pragma push_macro("PA")
|
||||||
|
#pragma push_macro("PB")
|
||||||
|
#pragma push_macro("_L_")
|
||||||
|
|
||||||
|
//Undefine / redefine pushed macros
|
||||||
|
#undef PA
|
||||||
|
#undef PB
|
||||||
|
#undef _L_
|
||||||
|
#define _L_(x) x
|
||||||
|
|
||||||
|
//Perform the work and output
|
||||||
|
//Ex: PORT PB, PIN 31 = void EIC_15_Handler(void)
|
||||||
|
DEBUG_BOOT_TRACING_HANDLER(PORTPIN_TO_IRQn(DEBUG_BOOT_TRACING_PORT, DEBUG_BOOT_TRACING_PIN))
|
||||||
|
|
||||||
|
//Restore macros
|
||||||
|
#pragma pop_macro("PA")
|
||||||
|
#pragma pop_macro("PB")
|
||||||
|
#pragma pop_macro("_L_")
|
||||||
{
|
{
|
||||||
//This is only for non-functional keyboard troubleshooting and should be disabled after boot
|
//This is only for non-functional keyboard troubleshooting and should be disabled after boot
|
||||||
//Intention is to lock up the keyboard here with repeating debug led code
|
//Intention is to lock up the keyboard here with repeating debug led code
|
||||||
@@ -120,13 +174,13 @@ void debug_code_init(void)
|
|||||||
{
|
{
|
||||||
DBGC(DC_UNSET);
|
DBGC(DC_UNSET);
|
||||||
|
|
||||||
//Configure Ports for EIC on PB31
|
//Configure Ports for EIC
|
||||||
PORT->Group[1].DIRCLR.reg = 1 << 31; //Input
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].DIRCLR.reg = 1 << DEBUG_BOOT_TRACING_PIN; //Input
|
||||||
PORT->Group[1].OUTSET.reg = 1 << 31; //High
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].OUTSET.reg = 1 << DEBUG_BOOT_TRACING_PIN; //High
|
||||||
PORT->Group[1].PINCFG[31].bit.INEN = 1; //Input Enable
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.INEN = 1; //Input Enable
|
||||||
PORT->Group[1].PINCFG[31].bit.PULLEN = 1; //Pull Enable
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.PULLEN = 1; //Pull Enable
|
||||||
PORT->Group[1].PINCFG[31].bit.PMUXEN = 1; //Mux Enable
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.PMUXEN = 1; //Mux Enable
|
||||||
PORT->Group[1].PMUX[15].bit.PMUXO = 0; //Mux A
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PMUX[DEBUG_BOOT_TRACING_PIN / 2].bit.PMUXO = 0; //Mux A
|
||||||
|
|
||||||
//Enable CLK_EIC_APB
|
//Enable CLK_EIC_APB
|
||||||
MCLK->APBAMASK.bit.EIC_ = 1;
|
MCLK->APBAMASK.bit.EIC_ = 1;
|
||||||
@@ -134,25 +188,33 @@ void debug_code_init(void)
|
|||||||
//Configure EIC
|
//Configure EIC
|
||||||
EIC->CTRLA.bit.SWRST = 1;
|
EIC->CTRLA.bit.SWRST = 1;
|
||||||
while (EIC->SYNCBUSY.bit.SWRST) {}
|
while (EIC->SYNCBUSY.bit.SWRST) {}
|
||||||
EIC->ASYNCH.reg = 1 << 15;
|
EIC->ASYNCH.reg = DEBUG_BOOT_TRACING_EXTINTb;
|
||||||
EIC->INTENSET.reg = 1 << 15;
|
EIC->INTENSET.reg = DEBUG_BOOT_TRACING_EXTINTb;
|
||||||
EIC->CONFIG[1].bit.SENSE7 = 2;
|
EIC->CONFIG[DEBUG_BOOT_TRACING_CONFIG_INDn].reg |= (EIC_CONFIG_SENSE0_FALL_Val << DEBUG_BOOT_TRACING_CONFIG_SENSEb);
|
||||||
EIC->CTRLA.bit.ENABLE = 1;
|
EIC->CTRLA.bit.ENABLE = 1;
|
||||||
while (EIC->SYNCBUSY.bit.ENABLE) {}
|
while (EIC->SYNCBUSY.bit.ENABLE) {}
|
||||||
|
|
||||||
//Enable EIC IRQ
|
//Enable EIC IRQ
|
||||||
NVIC_EnableIRQ(EIC_15_IRQn);
|
NVIC_EnableIRQ(DEBUG_BOOT_TRACING_IRQn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void debug_code_disable(void)
|
void debug_code_disable(void)
|
||||||
{
|
{
|
||||||
//Disable EIC IRQ
|
//Disable EIC IRQ
|
||||||
NVIC_DisableIRQ(EIC_15_IRQn);
|
NVIC_DisableIRQ(DEBUG_BOOT_TRACING_IRQn);
|
||||||
|
|
||||||
//Disable EIC
|
//Disable EIC
|
||||||
EIC->CTRLA.bit.ENABLE = 0;
|
EIC->CTRLA.bit.ENABLE = 0;
|
||||||
while (EIC->SYNCBUSY.bit.ENABLE) {}
|
while (EIC->SYNCBUSY.bit.ENABLE) {}
|
||||||
|
|
||||||
|
//Default port configuration
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].DIRCLR.reg = 1 << DEBUG_BOOT_TRACING_PIN; //Input
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].OUTCLR.reg = 1 << DEBUG_BOOT_TRACING_PIN; //Low
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.INEN = 0; //Input Disable
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.PULLEN = 0; //Pull Disable
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PINCFG[DEBUG_BOOT_TRACING_PIN].bit.PMUXEN = 0; //Mux Disable
|
||||||
|
PORT->Group[DEBUG_BOOT_TRACING_PORT].PMUX[DEBUG_BOOT_TRACING_PIN / 2].bit.PMUXO = 0; //Mux A
|
||||||
|
|
||||||
//Disable CLK_EIC_APB
|
//Disable CLK_EIC_APB
|
||||||
MCLK->APBAMASK.bit.EIC_ = 0;
|
MCLK->APBAMASK.bit.EIC_ = 0;
|
||||||
}
|
}
|
||||||
@@ -162,4 +224,4 @@ void debug_code_disable(void)
|
|||||||
void debug_code_init(void) {}
|
void debug_code_init(void) {}
|
||||||
void debug_code_disable(void) {}
|
void debug_code_disable(void) {}
|
||||||
|
|
||||||
#endif //DEBUG_BOOT_TRACING
|
#endif //DEBUG_BOOT_TRACING_ENABLE
|
||||||
@@ -20,37 +20,65 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "samd51j18a.h"
|
#include "samd51j18a.h"
|
||||||
|
|
||||||
//TODO: PS: Should bring these ports out to keyboard level configuration
|
/* Debug LED */
|
||||||
|
#if DEBUG_LED_ENABLE == 1
|
||||||
|
#define DBG_LED_ENA PORT->Group[DEBUG_LED_PORT].DIRSET.reg = (1 << DEBUG_LED_PIN)
|
||||||
|
#define DBG_LED_DIS PORT->Group[DEBUG_LED_PORT].DIRCLR.reg = (1 << DEBUG_LED_PIN)
|
||||||
|
#define DBG_LED_ON PORT->Group[DEBUG_LED_PORT].OUTSET.reg = (1 << DEBUG_LED_PIN)
|
||||||
|
#define DBG_LED_OFF PORT->Group[DEBUG_LED_PORT].OUTCLR.reg = (1 << DEBUG_LED_PIN)
|
||||||
|
#else
|
||||||
|
#define DBG_LED_ENA
|
||||||
|
#define DBG_LED_DIS
|
||||||
|
#define DBG_LED_ON
|
||||||
|
#define DBG_LED_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
//Debug LED PA27
|
/* Debug Port 1 */
|
||||||
#define led_ena REG_PORT_DIRSET0 = 0x08000000 //PA27 Output
|
#if DEBUG_PORT1_ENABLE == 1
|
||||||
#define led_on REG_PORT_OUTSET0 = 0x08000000 //PA27 High
|
#define DBG_1_ENA PORT->Group[DEBUG_PORT1_PORT].DIRSET.reg = (1 << DEBUG_PORT1_PIN)
|
||||||
#define led_off REG_PORT_OUTCLR0 = 0x08000000 //PA27 Low
|
#define DBG_1_DIS PORT->Group[DEBUG_PORT1_PORT].DIRCLR.reg = (1 << DEBUG_PORT1_PIN)
|
||||||
|
#define DBG_1_ON PORT->Group[DEBUG_PORT1_PORT].OUTSET.reg = (1 << DEBUG_PORT1_PIN)
|
||||||
|
#define DBG_1_OFF PORT->Group[DEBUG_PORT1_PORT].OUTCLR.reg = (1 << DEBUG_PORT1_PIN)
|
||||||
|
#else
|
||||||
|
#define DBG_1_ENA
|
||||||
|
#define DBG_1_DIS
|
||||||
|
#define DBG_1_ON
|
||||||
|
#define DBG_1_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
//Debug Port PB30
|
/* Debug Port 2 */
|
||||||
#define m15_ena REG_PORT_DIRSET1 = 0x40000000 //PB30 Output
|
#if DEBUG_PORT2_ENABLE == 1
|
||||||
#define m15_on REG_PORT_OUTSET1 = 0x40000000 //PB30 High
|
#define DBG_2_ENA PORT->Group[DEBUG_PORT2_PORT].DIRSET.reg = (1 << DEBUG_PORT2_PIN)
|
||||||
#define m15_off REG_PORT_OUTCLR1 = 0x40000000 //PB30 Low
|
#define DBG_2_DIS PORT->Group[DEBUG_PORT2_PORT].DIRCLR.reg = (1 << DEBUG_PORT2_PIN)
|
||||||
|
#define DBG_2_ON PORT->Group[DEBUG_PORT2_PORT].OUTSET.reg = (1 << DEBUG_PORT2_PIN)
|
||||||
|
#define DBG_2_OFF PORT->Group[DEBUG_PORT2_PORT].OUTCLR.reg = (1 << DEBUG_PORT2_PIN)
|
||||||
|
#else
|
||||||
|
#define DBG_2_ENA
|
||||||
|
#define DBG_2_DIS
|
||||||
|
#define DBG_2_ON
|
||||||
|
#define DBG_2_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
//Debug Port PB23
|
/* Debug Port 3 */
|
||||||
#define m27_ena REG_PORT_DIRSET1 = 0x800000 //PB23 Output
|
#if DEBUG_PORT3_ENABLE == 1
|
||||||
#define m27_on REG_PORT_OUTSET1 = 0x800000 //PB23 High
|
#define DBG_3_ENA PORT->Group[DEBUG_PORT3_PORT].DIRSET.reg = (1 << DEBUG_PORT3_PIN)
|
||||||
#define m27_off REG_PORT_OUTCLR1 = 0x800000 //PB23 Low
|
#define DBG_3_DIS PORT->Group[DEBUG_PORT3_PORT].DIRCLR.reg = (1 << DEBUG_PORT3_PIN)
|
||||||
|
#define DBG_3_ON PORT->Group[DEBUG_PORT3_PORT].OUTSET.reg = (1 << DEBUG_PORT3_PIN)
|
||||||
|
#define DBG_3_OFF PORT->Group[DEBUG_PORT3_PORT].OUTCLR.reg = (1 << DEBUG_PORT3_PIN)
|
||||||
|
#else
|
||||||
|
#define DBG_3_ENA
|
||||||
|
#define DBG_3_DIS
|
||||||
|
#define DBG_3_ON
|
||||||
|
#define DBG_3_OFF
|
||||||
|
#endif
|
||||||
|
|
||||||
//Debug Port PB31
|
void dbg_print(uint32_t x);
|
||||||
#define m28_ena REG_PORT_DIRSET1 = 0x80000000 //PB31 Output
|
|
||||||
#define m28_on REG_PORT_OUTSET1 = 0x80000000 //PB31 High
|
|
||||||
#define m28_off REG_PORT_OUTCLR1 = 0x80000000 //PB31 Low
|
|
||||||
|
|
||||||
#define m15_loop(M15X) {uint8_t M15L=M15X; while(M15L--){m15_on;CLK_delay_us(1);m15_off;}}
|
|
||||||
|
|
||||||
void m15_print(uint32_t x);
|
|
||||||
void dled_print(uint32_t x, uint8_t long_pause);
|
void dled_print(uint32_t x, uint8_t long_pause);
|
||||||
|
|
||||||
void debug_code_init(void);
|
void debug_code_init(void);
|
||||||
void debug_code_disable(void);
|
void debug_code_disable(void);
|
||||||
|
|
||||||
#ifdef DEBUG_BOOT_TRACING
|
#ifdef DEBUG_BOOT_TRACING_ENABLE
|
||||||
|
|
||||||
#define DBGC(n) debug_code = n
|
#define DBGC(n) debug_code = n
|
||||||
|
|
||||||
@@ -190,6 +218,6 @@ enum debug_code_list {
|
|||||||
|
|
||||||
#define DBGC(n) {}
|
#define DBGC(n) {}
|
||||||
|
|
||||||
#endif //DEBUG_BOOT_TRACING
|
#endif //DEBUG_BOOT_TRACING_ENABLE
|
||||||
|
|
||||||
#endif //_D51_UTIL_H_
|
#endif //_D51_UTIL_H_
|
||||||
@@ -267,8 +267,8 @@ uint8_t I2C3733_Init_Control(void)
|
|||||||
|
|
||||||
CLK_delay_ms(1);
|
CLK_delay_ms(1);
|
||||||
|
|
||||||
srdata.bit.IRST = 0;
|
sr_exp_data.bit.IRST = 0;
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
CLK_delay_ms(1);
|
CLK_delay_ms(1);
|
||||||
|
|
||||||
@@ -357,8 +357,8 @@ void I2C3733_Control_Set(uint8_t state)
|
|||||||
{
|
{
|
||||||
DBGC(DC_I2C3733_CONTROL_SET_BEGIN);
|
DBGC(DC_I2C3733_CONTROL_SET_BEGIN);
|
||||||
|
|
||||||
srdata.bit.SDB_N = (state == 1 ? 1 : 0);
|
sr_exp_data.bit.SDB_N = (state == 1 ? 1 : 0);
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
DBGC(DC_I2C3733_CONTROL_SET_COMPLETE);
|
DBGC(DC_I2C3733_CONTROL_SET_COMPLETE);
|
||||||
}
|
}
|
||||||
@@ -489,7 +489,7 @@ uint8_t i2c_led_q_request_room(uint8_t request_size)
|
|||||||
|
|
||||||
if (i2c_led_q_full >= 100) //Give the queue a chance to clear up
|
if (i2c_led_q_full >= 100) //Give the queue a chance to clear up
|
||||||
{
|
{
|
||||||
led_on;
|
DBG_LED_ON;
|
||||||
I2C_DMAC_LED_Init();
|
I2C_DMAC_LED_Init();
|
||||||
i2c_led_q_init();
|
i2c_led_q_init();
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -520,9 +520,9 @@ void led_matrix_task(void)
|
|||||||
//Process more data if not finished
|
//Process more data if not finished
|
||||||
if (led_cur != lede)
|
if (led_cur != lede)
|
||||||
{
|
{
|
||||||
//m15_off; //debug profiling
|
//DBG_1_OFF; //debug profiling
|
||||||
led_matrix_run();
|
led_matrix_run();
|
||||||
//m15_on; //debug profiling
|
//DBG_1_ON; //debug profiling
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,8 +247,13 @@ void main_subtasks(void)
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
led_ena;
|
DBG_LED_ENA;
|
||||||
m15_ena;
|
DBG_1_ENA;
|
||||||
|
DBG_1_OFF;
|
||||||
|
DBG_2_ENA;
|
||||||
|
DBG_2_OFF;
|
||||||
|
DBG_3_ENA;
|
||||||
|
DBG_3_OFF;
|
||||||
|
|
||||||
debug_code_init();
|
debug_code_init();
|
||||||
|
|
||||||
@@ -256,7 +261,7 @@ int main(void)
|
|||||||
|
|
||||||
ADC0_init();
|
ADC0_init();
|
||||||
|
|
||||||
SPI_Init();
|
SR_EXP_Init();
|
||||||
|
|
||||||
i2c1_init();
|
i2c1_init();
|
||||||
|
|
||||||
@@ -274,8 +279,7 @@ int main(void)
|
|||||||
|
|
||||||
while (USB2422_Port_Detect_Init() == 0) {}
|
while (USB2422_Port_Detect_Init() == 0) {}
|
||||||
|
|
||||||
led_off;
|
DBG_LED_OFF;
|
||||||
m15_off;
|
|
||||||
|
|
||||||
led_matrix_init();
|
led_matrix_init();
|
||||||
|
|
||||||
|
|||||||
@@ -17,73 +17,70 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#include "arm_atsam_protocol.h"
|
#include "arm_atsam_protocol.h"
|
||||||
|
|
||||||
Srdata_t srdata;
|
sr_exp_t sr_exp_data;
|
||||||
|
|
||||||
void SPI_WriteSRData(void)
|
void SR_EXP_WriteData(void)
|
||||||
{
|
{
|
||||||
uint16_t timeout;
|
SR_EXP_RCLK_LO;
|
||||||
|
|
||||||
SC2_RCLCK_LO;
|
while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.DRE)) { DBGC(DC_SPI_WRITE_DRE); }
|
||||||
|
|
||||||
timeout = 50000;
|
SR_EXP_SERCOM->SPI.DATA.bit.DATA = sr_exp_data.reg & 0xFF; //Shift in bits 7-0
|
||||||
while (!(SCSPI->SPI.INTFLAG.bit.DRE) && --timeout) { DBGC(DC_SPI_WRITE_DRE); }
|
while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.TXC)) { DBGC(DC_SPI_WRITE_TXC_1); }
|
||||||
|
|
||||||
SCSPI->SPI.DATA.bit.DATA = srdata.reg & 0xFF; //Shift in bits 7-0
|
SR_EXP_SERCOM->SPI.DATA.bit.DATA = (sr_exp_data.reg >> 8) & 0xFF; //Shift in bits 15-8
|
||||||
timeout = 50000;
|
while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.TXC)) { DBGC(DC_SPI_WRITE_TXC_2); }
|
||||||
while (!(SCSPI->SPI.INTFLAG.bit.TXC) && --timeout) { DBGC(DC_SPI_WRITE_TXC_1); }
|
|
||||||
|
|
||||||
SCSPI->SPI.DATA.bit.DATA = (srdata.reg >> 8) & 0xFF; //Shift in bits 15-8
|
SR_EXP_RCLK_HI;
|
||||||
timeout = 50000;
|
|
||||||
while (!(SCSPI->SPI.INTFLAG.bit.TXC) && --timeout) { DBGC(DC_SPI_WRITE_TXC_2); }
|
|
||||||
|
|
||||||
SC2_RCLCK_HI;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SPI_Init(void)
|
void SR_EXP_Init(void)
|
||||||
{
|
{
|
||||||
uint32_t timeout;
|
|
||||||
|
|
||||||
DBGC(DC_SPI_INIT_BEGIN);
|
DBGC(DC_SPI_INIT_BEGIN);
|
||||||
|
|
||||||
CLK_set_spi_freq(CHAN_SERCOM_SPI, FREQ_SPI_DEFAULT);
|
CLK_set_spi_freq(CHAN_SERCOM_SPI, FREQ_SPI_DEFAULT);
|
||||||
|
|
||||||
PORT->Group[0].PMUX[6].bit.PMUXE = 2;
|
//Set up MCU Shift Register pins
|
||||||
PORT->Group[0].PMUX[6].bit.PMUXO = 2;
|
PORT->Group[SR_EXP_RCLK_PORT].DIRSET.reg = (1 << SR_EXP_RCLK_PIN);
|
||||||
PORT->Group[0].PINCFG[12].bit.PMUXEN = 1;
|
PORT->Group[SR_EXP_OE_N_PORT].DIRSET.reg = (1 << SR_EXP_OE_N_PIN);
|
||||||
PORT->Group[0].PINCFG[13].bit.PMUXEN = 1;
|
|
||||||
|
//Set up MCU SPI pins
|
||||||
|
PORT->Group[SR_EXP_DATAOUT_PORT].PMUX[SR_EXP_DATAOUT_PIN / 2].bit.SR_EXP_DATAOUT_MUX_SEL = SR_EXP_DATAOUT_MUX; //MUX select for sercom
|
||||||
|
PORT->Group[SR_EXP_SCLK_PORT].PMUX[SR_EXP_SCLK_PIN / 2].bit.SR_EXP_SCLK_MUX_SEL = SR_EXP_SCLK_MUX; //MUX select for sercom
|
||||||
|
PORT->Group[SR_EXP_DATAOUT_PORT].PINCFG[SR_EXP_DATAOUT_PIN].bit.PMUXEN = 1; //MUX Enable
|
||||||
|
PORT->Group[SR_EXP_SCLK_PORT].PINCFG[SR_EXP_SCLK_PIN].bit.PMUXEN = 1; //MUX Enable
|
||||||
|
|
||||||
//Configure Shift Registers
|
//Initialize Shift Register
|
||||||
SC2_DIRSET;
|
SR_EXP_OE_N_DIS;
|
||||||
SC2_RCLCK_HI;
|
SR_EXP_RCLK_HI;
|
||||||
SC2_OE_DIS;
|
|
||||||
|
|
||||||
SCSPI->SPI.CTRLA.bit.DORD = 1;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.DORD = 1; //Data Order - LSB is transferred first
|
||||||
SCSPI->SPI.CTRLA.bit.CPOL = 1;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.CPOL = 1; //Clock Polarity - SCK high when idle. Leading edge of cycle is falling. Trailing rising.
|
||||||
SCSPI->SPI.CTRLA.bit.CPHA = 1;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.CPHA = 1; //Clock Phase - Leading Edge Falling, change, Trailing Edge - Rising, sample
|
||||||
SCSPI->SPI.CTRLA.bit.DIPO = 3;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.DIPO = 3; //Data In Pinout - SERCOM PAD[3] is used as data input (Configure away from DOPO. Not using input.)
|
||||||
SCSPI->SPI.CTRLA.bit.MODE = 3; //master
|
SR_EXP_SERCOM->SPI.CTRLA.bit.DOPO = 0; //Data Output PAD[0], Serial Clock PAD[1]
|
||||||
|
SR_EXP_SERCOM->SPI.CTRLA.bit.MODE = 3; //Operating Mode - Master operation
|
||||||
|
|
||||||
SCSPI->SPI.CTRLA.bit.ENABLE = 1;
|
SR_EXP_SERCOM->SPI.CTRLA.bit.ENABLE = 1; //Enable - Peripheral is enabled or being enabled
|
||||||
timeout = 50000;
|
while (SR_EXP_SERCOM->SPI.SYNCBUSY.bit.ENABLE) { DBGC(DC_SPI_SYNC_ENABLING); }
|
||||||
while (SCSPI->SPI.SYNCBUSY.bit.ENABLE && timeout--) { DBGC(DC_SPI_SYNC_ENABLING); }
|
|
||||||
|
|
||||||
srdata.reg = 0;
|
sr_exp_data.reg = 0;
|
||||||
srdata.bit.HUB_CONNECT = 0;
|
sr_exp_data.bit.HUB_CONNECT = 0;
|
||||||
srdata.bit.HUB_RESET_N = 0;
|
sr_exp_data.bit.HUB_RESET_N = 0;
|
||||||
srdata.bit.S_UP = 0;
|
sr_exp_data.bit.S_UP = 0;
|
||||||
srdata.bit.E_UP_N = 1;
|
sr_exp_data.bit.E_UP_N = 1;
|
||||||
srdata.bit.S_DN1 = 1;
|
sr_exp_data.bit.S_DN1 = 1;
|
||||||
srdata.bit.E_DN1_N = 1;
|
sr_exp_data.bit.E_DN1_N = 1;
|
||||||
srdata.bit.E_VBUS_1 = 0;
|
sr_exp_data.bit.E_VBUS_1 = 0;
|
||||||
srdata.bit.E_VBUS_2 = 0;
|
sr_exp_data.bit.E_VBUS_2 = 0;
|
||||||
srdata.bit.SRC_1 = 1;
|
sr_exp_data.bit.SRC_1 = 1;
|
||||||
srdata.bit.SRC_2 = 1;
|
sr_exp_data.bit.SRC_2 = 1;
|
||||||
srdata.bit.IRST = 1;
|
sr_exp_data.bit.IRST = 1;
|
||||||
srdata.bit.SDB_N = 0;
|
sr_exp_data.bit.SDB_N = 0;
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
//Enable register output
|
//Enable Shift Register output
|
||||||
SC2_OE_ENA;
|
SR_EXP_OE_N_ENA;
|
||||||
|
|
||||||
DBGC(DC_SPI_INIT_COMPLETE);
|
DBGC(DC_SPI_INIT_COMPLETE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,21 +18,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifndef _SPI_H_
|
#ifndef _SPI_H_
|
||||||
#define _SPI_H_
|
#define _SPI_H_
|
||||||
|
|
||||||
//TODO: PS: Should bring ports to keyboard configuration
|
/* Macros for Shift Register control */
|
||||||
|
#define SR_EXP_RCLK_LO PORT->Group[SR_EXP_RCLK_PORT].OUTCLR.reg = (1 << SR_EXP_RCLK_PIN)
|
||||||
|
#define SR_EXP_RCLK_HI PORT->Group[SR_EXP_RCLK_PORT].OUTSET.reg = (1 << SR_EXP_RCLK_PIN)
|
||||||
|
#define SR_EXP_OE_N_ENA PORT->Group[SR_EXP_OE_N_PORT].OUTCLR.reg = (1 << SR_EXP_OE_N_PIN)
|
||||||
|
#define SR_EXP_OE_N_DIS PORT->Group[SR_EXP_OE_N_PORT].OUTSET.reg = (1 << SR_EXP_OE_N_PIN)
|
||||||
|
|
||||||
#define SCSPI SERCOM2
|
/* Determine bits to set for mux selection */
|
||||||
|
#if SR_EXP_DATAOUT_PIN % 2 == 0
|
||||||
|
#define SR_EXP_DATAOUT_MUX_SEL PMUXE
|
||||||
|
#else
|
||||||
|
#define SR_EXP_DATAOUT_MUX_SEL PMUXO
|
||||||
|
#endif
|
||||||
|
|
||||||
#define P14_DIR 0x00004000 /* PIN14 DIR Bit */
|
/* Determine bits to set for mux selection */
|
||||||
#define P14_OUT 0x00004000 /* PIN14 OUT Bit */
|
#if SR_EXP_SCLK_PIN % 2 == 0
|
||||||
#define P15_DIR 0x00008000 /* PIN15 DIR Bit */
|
#define SR_EXP_SCLK_MUX_SEL PMUXE
|
||||||
#define P15_OUT 0x00008000 /* PIN15 OUT Bit */
|
#else
|
||||||
|
#define SR_EXP_SCLK_MUX_SEL PMUXO
|
||||||
#define SC2_RCLCK_LO REG_PORT_OUTCLR1 = P14_OUT /* PB14 Low, SC2_RCLCK Low */
|
#endif
|
||||||
#define SC2_RCLCK_HI REG_PORT_OUTSET1 = P14_OUT /* PB14 High, SC2_RCLCK High */
|
|
||||||
#define SC2_OE_ENA REG_PORT_OUTCLR1 = P15_OUT /* PB15 Low, SC2_OE_N Low (Shift register enabled) */
|
|
||||||
#define SC2_OE_DIS REG_PORT_OUTSET1 = P15_OUT /* PB15 High, SC2_OE_N High (Shift register disabled) */
|
|
||||||
#define SC2_DIRSET REG_PORT_DIRSET1 = P14_DIR | P15_DIR; /* PB14 PB15 OUT */
|
|
||||||
|
|
||||||
|
/* Data structure to define Shift Register output expander hardware */
|
||||||
|
/* This structure gets shifted into registers LSB first */
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
uint16_t RSVD4:1; /*!< bit: 0 */
|
uint16_t RSVD4:1; /*!< bit: 0 */
|
||||||
@@ -53,11 +60,11 @@ typedef union {
|
|||||||
uint16_t HUB_CONNECT:1; /*!< bit: 15 SIGNAL VBUS CONNECT TO USB HUB WHEN 1 */
|
uint16_t HUB_CONNECT:1; /*!< bit: 15 SIGNAL VBUS CONNECT TO USB HUB WHEN 1 */
|
||||||
} bit; /*!< Structure used for bit access */
|
} bit; /*!< Structure used for bit access */
|
||||||
uint16_t reg; /*!< Type used for register access */
|
uint16_t reg; /*!< Type used for register access */
|
||||||
} Srdata_t;
|
} sr_exp_t;
|
||||||
|
|
||||||
extern Srdata_t srdata;
|
extern sr_exp_t sr_exp_data;
|
||||||
|
|
||||||
void SPI_WriteSRData(void);
|
void SR_EXP_WriteData(void);
|
||||||
void SPI_Init(void);
|
void SR_EXP_Init(void);
|
||||||
|
|
||||||
#endif //_SPI_H_
|
#endif //_SPI_H_
|
||||||
@@ -77,7 +77,6 @@ void USB2422_init(void)
|
|||||||
Port *pport = PORT;
|
Port *pport = PORT;
|
||||||
Oscctrl *posc = OSCCTRL;
|
Oscctrl *posc = OSCCTRL;
|
||||||
Usb *pusb = USB;
|
Usb *pusb = USB;
|
||||||
Srdata_t *pspi = &srdata;
|
|
||||||
|
|
||||||
DBGC(DC_USB2422_INIT_BEGIN);
|
DBGC(DC_USB2422_INIT_BEGIN);
|
||||||
|
|
||||||
@@ -132,9 +131,9 @@ void USB2422_init(void)
|
|||||||
|
|
||||||
i2c0_init(); //IC2 clk must be high at USB2422 reset release time to signal SMB configuration
|
i2c0_init(); //IC2 clk must be high at USB2422 reset release time to signal SMB configuration
|
||||||
|
|
||||||
pspi->bit.HUB_CONNECT = 1; //connect signal
|
sr_exp_data.bit.HUB_CONNECT = 1; //connect signal
|
||||||
pspi->bit.HUB_RESET_N = 1; //reset high
|
sr_exp_data.bit.HUB_RESET_N = 1; //reset high
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
CLK_delay_us(100);
|
CLK_delay_us(100);
|
||||||
|
|
||||||
@@ -150,16 +149,14 @@ void USB2422_init(void)
|
|||||||
|
|
||||||
void USB_reset(void)
|
void USB_reset(void)
|
||||||
{
|
{
|
||||||
Srdata_t *pspi = &srdata;
|
|
||||||
|
|
||||||
DBGC(DC_USB_RESET_BEGIN);
|
DBGC(DC_USB_RESET_BEGIN);
|
||||||
|
|
||||||
//pulse reset for at least 1 usec
|
//pulse reset for at least 1 usec
|
||||||
pspi->bit.HUB_RESET_N = 0; //reset low
|
sr_exp_data.bit.HUB_RESET_N = 0; //reset low
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
CLK_delay_us(1);
|
CLK_delay_us(1);
|
||||||
pspi->bit.HUB_RESET_N = 1; //reset high to run
|
sr_exp_data.bit.HUB_RESET_N = 1; //reset high to run
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
CLK_delay_us(1);
|
CLK_delay_us(1);
|
||||||
|
|
||||||
DBGC(DC_USB_RESET_COMPLETE);
|
DBGC(DC_USB_RESET_COMPLETE);
|
||||||
@@ -241,14 +238,14 @@ void USB_set_host_by_voltage(void)
|
|||||||
#ifndef MD_BOOTLOADER
|
#ifndef MD_BOOTLOADER
|
||||||
usb_extra_state = USB_EXTRA_STATE_UNKNOWN;
|
usb_extra_state = USB_EXTRA_STATE_UNKNOWN;
|
||||||
#endif //MD_BOOTLOADER
|
#endif //MD_BOOTLOADER
|
||||||
srdata.bit.SRC_1 = 1; //USBC-1 available for test
|
sr_exp_data.bit.SRC_1 = 1; //USBC-1 available for test
|
||||||
srdata.bit.SRC_2 = 1; //USBC-2 available for test
|
sr_exp_data.bit.SRC_2 = 1; //USBC-2 available for test
|
||||||
srdata.bit.E_UP_N = 1; //HOST disable
|
sr_exp_data.bit.E_UP_N = 1; //HOST disable
|
||||||
srdata.bit.E_DN1_N = 1; //EXTRA disable
|
sr_exp_data.bit.E_DN1_N = 1; //EXTRA disable
|
||||||
srdata.bit.E_VBUS_1 = 0; //USBC-1 disable full power I/O
|
sr_exp_data.bit.E_VBUS_1 = 0; //USBC-1 disable full power I/O
|
||||||
srdata.bit.E_VBUS_2 = 0; //USBC-2 disable full power I/O
|
sr_exp_data.bit.E_VBUS_2 = 0; //USBC-2 disable full power I/O
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
CLK_delay_ms(250);
|
CLK_delay_ms(250);
|
||||||
|
|
||||||
@@ -262,37 +259,37 @@ void USB_set_host_by_voltage(void)
|
|||||||
|
|
||||||
if (v_con_1 > v_con_2)
|
if (v_con_1 > v_con_2)
|
||||||
{
|
{
|
||||||
srdata.bit.S_UP = 0; //HOST to USBC-1
|
sr_exp_data.bit.S_UP = 0; //HOST to USBC-1
|
||||||
srdata.bit.S_DN1 = 1; //EXTRA to USBC-2
|
sr_exp_data.bit.S_DN1 = 1; //EXTRA to USBC-2
|
||||||
srdata.bit.SRC_1 = 1; //HOST on USBC-1
|
sr_exp_data.bit.SRC_1 = 1; //HOST on USBC-1
|
||||||
srdata.bit.SRC_2 = 0; //EXTRA available on USBC-2
|
sr_exp_data.bit.SRC_2 = 0; //EXTRA available on USBC-2
|
||||||
|
|
||||||
srdata.bit.E_VBUS_1 = 1; //USBC-1 enable full power I/O
|
sr_exp_data.bit.E_VBUS_1 = 1; //USBC-1 enable full power I/O
|
||||||
srdata.bit.E_VBUS_2 = 0; //USBC-2 disable full power I/O
|
sr_exp_data.bit.E_VBUS_2 = 0; //USBC-2 disable full power I/O
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
srdata.bit.E_UP_N = 0; //HOST enable
|
sr_exp_data.bit.E_UP_N = 0; //HOST enable
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
usb_host_port = USB_HOST_PORT_1;
|
usb_host_port = USB_HOST_PORT_1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
srdata.bit.S_UP = 1; //EXTRA to USBC-1
|
sr_exp_data.bit.S_UP = 1; //EXTRA to USBC-1
|
||||||
srdata.bit.S_DN1 = 0; //HOST to USBC-2
|
sr_exp_data.bit.S_DN1 = 0; //HOST to USBC-2
|
||||||
srdata.bit.SRC_1 = 0; //EXTRA available on USBC-1
|
sr_exp_data.bit.SRC_1 = 0; //EXTRA available on USBC-1
|
||||||
srdata.bit.SRC_2 = 1; //HOST on USBC-2
|
sr_exp_data.bit.SRC_2 = 1; //HOST on USBC-2
|
||||||
|
|
||||||
srdata.bit.E_VBUS_1 = 0; //USBC-1 disable full power I/O
|
sr_exp_data.bit.E_VBUS_1 = 0; //USBC-1 disable full power I/O
|
||||||
srdata.bit.E_VBUS_2 = 1; //USBC-2 enable full power I/O
|
sr_exp_data.bit.E_VBUS_2 = 1; //USBC-2 enable full power I/O
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
srdata.bit.E_UP_N = 0; //HOST enable
|
sr_exp_data.bit.E_UP_N = 0; //HOST enable
|
||||||
|
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
usb_host_port = USB_HOST_PORT_2;
|
usb_host_port = USB_HOST_PORT_2;
|
||||||
}
|
}
|
||||||
@@ -325,15 +322,15 @@ uint8_t USB2422_Port_Detect_Init(void)
|
|||||||
if (v_con_1 > v_con_2) //Values updated from USB_set_host_by_voltage();
|
if (v_con_1 > v_con_2) //Values updated from USB_set_host_by_voltage();
|
||||||
{
|
{
|
||||||
//1 flash for port 1 detected
|
//1 flash for port 1 detected
|
||||||
if (tmod > 500 && tmod < 600) { led_on; }
|
if (tmod > 500 && tmod < 600) { DBG_LED_ON; }
|
||||||
else { led_off; }
|
else { DBG_LED_OFF; }
|
||||||
}
|
}
|
||||||
else if (v_con_2 > v_con_1) //Values updated from USB_set_host_by_voltage();
|
else if (v_con_2 > v_con_1) //Values updated from USB_set_host_by_voltage();
|
||||||
{
|
{
|
||||||
//2 flash for port 2 detected
|
//2 flash for port 2 detected
|
||||||
if (tmod > 500 && tmod < 600) { led_on; }
|
if (tmod > 500 && tmod < 600) { DBG_LED_ON; }
|
||||||
else if (tmod > 700 && tmod < 800) { led_on; }
|
else if (tmod > 700 && tmod < 800) { DBG_LED_ON; }
|
||||||
else { led_off; }
|
else { DBG_LED_OFF; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CLK_get_ms() > port_detect_retry_ms)
|
if (CLK_get_ms() > port_detect_retry_ms)
|
||||||
@@ -357,12 +354,12 @@ void USB_ExtraSetState(uint8_t state)
|
|||||||
if (state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG)
|
if (state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG)
|
||||||
state = USB_EXTRA_STATE_DISABLED;
|
state = USB_EXTRA_STATE_DISABLED;
|
||||||
|
|
||||||
if (usb_host_port == USB_HOST_PORT_1) srdata.bit.E_VBUS_2 = state;
|
if (usb_host_port == USB_HOST_PORT_1) sr_exp_data.bit.E_VBUS_2 = state;
|
||||||
else if (usb_host_port == USB_HOST_PORT_2) srdata.bit.E_VBUS_1 = state;
|
else if (usb_host_port == USB_HOST_PORT_2) sr_exp_data.bit.E_VBUS_1 = state;
|
||||||
else return;
|
else return;
|
||||||
|
|
||||||
srdata.bit.E_DN1_N = !state;
|
sr_exp_data.bit.E_DN1_N = !state;
|
||||||
SPI_WriteSRData();
|
SR_EXP_WriteData();
|
||||||
|
|
||||||
usb_extra_state = state_save;
|
usb_extra_state = state_save;
|
||||||
|
|
||||||
|
|||||||
@@ -16,13 +16,13 @@
|
|||||||
#define FORCE_NKRO
|
#define FORCE_NKRO
|
||||||
|
|
||||||
#ifndef TAPPING_TOGGLE
|
#ifndef TAPPING_TOGGLE
|
||||||
#define TAPPING_TOGGLE 1
|
#define TAPPING_TOGGLE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TAPPING_TERM
|
#ifdef TAPPING_TERM
|
||||||
#undef TAPPING_TERM
|
#undef TAPPING_TERM
|
||||||
#endif
|
#endif
|
||||||
#define TAPPING_TERM 120
|
#define TAPPING_TERM 95
|
||||||
|
|
||||||
// Disable action_get_macro and fn_actions, since we don't use these
|
// Disable action_get_macro and fn_actions, since we don't use these
|
||||||
// and it saves on space in the firmware.
|
// and it saves on space in the firmware.
|
||||||
|
|||||||
+24
-3
@@ -17,15 +17,27 @@ qk_tap_dance_action_t tap_dance_actions[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
volatile uint8_t active_layer = _BL;
|
volatile uint8_t active_layer = _BL;
|
||||||
|
volatile uint8_t gm_layer_act = false;
|
||||||
static tap upltap_state = {.state = 0};
|
static tap upltap_state = {.state = 0};
|
||||||
static tap dwltap_state = {.state = 0};
|
static tap dwltap_state = {.state = 0};
|
||||||
static tap lsprtap_state = {.state = 0};
|
static tap lsprtap_state = {.state = 0};
|
||||||
static tap ralttap_state = {.state = 0};
|
static tap ralttap_state = {.state = 0};
|
||||||
|
|
||||||
void layer_switcher_tap(uint8_t new_layer) {
|
void layer_switcher_tap(uint8_t new_layer) {
|
||||||
layer_off(active_layer);
|
if (gm_layer_act == true) {
|
||||||
layer_on(new_layer);
|
layer_off(active_layer);
|
||||||
active_layer = new_layer;
|
if (new_layer == _BL) {
|
||||||
|
layer_on(_GM);
|
||||||
|
active_layer = _GM;
|
||||||
|
} else {
|
||||||
|
layer_on(new_layer);
|
||||||
|
active_layer = new_layer;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
layer_off(active_layer);
|
||||||
|
layer_on(new_layer);
|
||||||
|
active_layer = new_layer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cur_dance(qk_tap_dance_state_t *state) {
|
int cur_dance(qk_tap_dance_state_t *state) {
|
||||||
@@ -162,6 +174,14 @@ void dance_dwly_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|||||||
case DOUBLE_HOLD:
|
case DOUBLE_HOLD:
|
||||||
layer_switcher_tap(_AL);
|
layer_switcher_tap(_AL);
|
||||||
break;
|
break;
|
||||||
|
case TRIPLE_TAP:
|
||||||
|
if (gm_layer_act == true) {
|
||||||
|
gm_layer_act = false;
|
||||||
|
layer_switcher_tap(_BL);
|
||||||
|
} else {
|
||||||
|
gm_layer_act = true;
|
||||||
|
layer_switcher_tap(_GM);
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
layer_switcher_tap(_BL);
|
layer_switcher_tap(_BL);
|
||||||
break;
|
break;
|
||||||
@@ -174,6 +194,7 @@ void dance_dwly_reset(qk_tap_dance_state_t *state, void *user_data) {
|
|||||||
break;
|
break;
|
||||||
case SINGLE_HOLD:
|
case SINGLE_HOLD:
|
||||||
case DOUBLE_HOLD:
|
case DOUBLE_HOLD:
|
||||||
|
case TRIPLE_TAP:
|
||||||
default:
|
default:
|
||||||
layer_switcher_tap(_BL);
|
layer_switcher_tap(_BL);
|
||||||
break;
|
break;
|
||||||
|
|||||||
+9
-1
@@ -3,16 +3,24 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
enum custom_keycodes { CK_SAFE = SAFE_RANGE, RGUP, RGDWN, NEWPLACEHOLDER };
|
enum custom_keycodes {
|
||||||
|
CK_SAFE = SAFE_RANGE,
|
||||||
|
RGUP,
|
||||||
|
RGDWN,
|
||||||
|
YREG,
|
||||||
|
NEW_SAFE_RANGE
|
||||||
|
};
|
||||||
|
|
||||||
#define _______ KC_TRNS
|
#define _______ KC_TRNS
|
||||||
#define KC_RGUP RGUP
|
#define KC_RGUP RGUP
|
||||||
#define KC_RGDWN RGDWN
|
#define KC_RGDWN RGDWN
|
||||||
|
#define KC_YREG YREG
|
||||||
|
|
||||||
#define _BL 0 // The base layer
|
#define _BL 0 // The base layer
|
||||||
#define _UL 1 // The up layer
|
#define _UL 1 // The up layer
|
||||||
#define _DL 2 // The down layer
|
#define _DL 2 // The down layer
|
||||||
#define _VL 3 // The shifted up layer
|
#define _VL 3 // The shifted up layer
|
||||||
#define _AL 4 // The assorted layer
|
#define _AL 4 // The assorted layer
|
||||||
|
#define _GM 5
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Executable
+49
@@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# NOTE: This script uses tabs for indentation
|
||||||
|
|
||||||
|
USAGE="Usage: $0 [keyboard[:keymap[:target]]]"
|
||||||
|
|
||||||
|
# Check preconditions
|
||||||
|
for arg; do
|
||||||
|
if [ "$arg" = "--help" ]; then
|
||||||
|
echo "$USAGE"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ $# -gt 1 ]; then
|
||||||
|
echo "$USAGE" >&2
|
||||||
|
exit 1
|
||||||
|
elif ! command -v docker >/dev/null 2>&1; then
|
||||||
|
echo "Error: docker not found" >&2
|
||||||
|
echo "See https://docs.docker.com/install/#supported-platforms for installation instructions" >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Determine arguments
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
printf "keyboard=" && read -r keyboard
|
||||||
|
[ -n "$keyboard" ] && printf "keymap=" && read -r keymap
|
||||||
|
[ -n "$keymap" ] && printf "target=" && read -r target
|
||||||
|
else
|
||||||
|
IFS=':' read -r keyboard keymap target x <<-EOF
|
||||||
|
$1
|
||||||
|
EOF
|
||||||
|
if [ -n "$x" ]; then
|
||||||
|
echo "$USAGE" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -n "$target" ]; then
|
||||||
|
if [ "$(uname)" = "Linux" ] || docker-machine active >/dev/null 2>&1; then
|
||||||
|
usb_args="--privileged -v /dev/bus/usb:/dev/bus/usb"
|
||||||
|
else
|
||||||
|
echo "Error: target requires docker-machine to work on your platform" >&2
|
||||||
|
echo "See http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos" >&2
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
dir=$(pwd -W 2>/dev/null) || dir=$PWD # Use Windows path if on Windows
|
||||||
|
|
||||||
|
# Run container and build firmware
|
||||||
|
docker run --rm $usb_args -v "$dir":/qmk_firmware qmkfm/qmk_firmware \
|
||||||
|
make "$keyboard${keymap:+:$keymap}${target:+:$target}"
|
||||||
Reference in new issue
Block a user