Compare commits

...

9 Commits

Author SHA1 Message Date
zvecr
d8df01ca5e Align docker and vagrant base images (#4905)
* Align docker and vagrant base images - update box to debian 9.6

* Align docker and vagrant base images - lock docker image to debian 9

* Align docker and vagrant base images - update vagrant docker to debian 9
2019-03-17 10:36:59 -07:00
cubimon
f9f0a31904 Unicode fix for new wincompose version (#5082)
* unicode fix for new wincompose version

* move wincompose case to linux

* Change unicode input end to enter
2019-03-17 10:35:14 -07:00
Samuel Jahnke
c74b11a959 [Keymap] Improvements to Samuel's literate keymap (#5428)
* added my own keymap

* changed thing

* updated keymap Samuel

* updated laypout for better one handed use

* updated stuff I want

* happy with my lagout

* formatting

* Added new literate config

* made everything nice

* cleaned

* fixed spelling and two small bugs in macros

* Made press and lift function for modifiers

* made taps occur on press instead of release

* added oneshot keys and chars cant be negative!

* removed debug message

* Added command and qwerty layers

* fixed bug with oneshot layer

* same bug, different key
2019-03-17 10:22:35 -07:00
DDRnJn
fcc9b4b8e7 Added 4 new songs to song_list.h
Added Liebesleid by Kriesler (or Rachmaninoff), Michishirube from Violet Evergarden, Melodies of Life from Final Fantasy 9 and Eyes on Me from Final Fantasy 8
2019-03-17 10:17:12 -07:00
jotix
5047503230 [Keymap] Jotix (#5424)
* ortho_4x12 jotix2 layout

* ortho_4x12 jotix2 layout
2019-03-17 10:16:08 -07:00
Nik Richers
c62f6b0825 [Keymap] Add a tweaked Redox keymap (#5422)
* Add nrichers keymap

* Additional keymap tweaks, add readme info

* Improve descriptions for changes from default keymap

* Add image of keymap, update .gitignore to

* Add image link

Adds an image of the modified keymap.

* Improve legibility of keymap changes with colour coding

* Tinker with color codes in Markdown

* Experiment with colour codes

* Tinker more with colour codes

* Figured out the easiest way to include colour coding

* Undo earlier .gitignore change
2019-03-17 10:13:45 -07:00
noroadsleft
e30c993d75 [Keyboard] XD75 refactor (#5420)
* Refactor layout macro names

Update the names of the layout macros to reflect QMK's desired usage.

- KEYMAP renamed to LAYOUT
  - colinta keymap updated accordingly
- KC_KEYMAP renamed to LAYOUT_kc
  - mtdjr keymap updated accordingly

* Update xd75.h to use #pragma once include guard

* Update keymaps to use QMK_KEYBOARD_H

* Refactor default keymap

- updated to use layout macro
- remove deprecated action_get_macro function
- add functions from QMK keymap.c template
  - process_record_user
  - matrix_init_user
  - matrix_scan_user
  - led_set_user

* Update supporting files

- updated config.h files to use #pragma once include guard
- remove errant QUANTUM_DIR code block

* Rename readme files to fully lowercase filenames

* Restructure keyboard readme

Updated the readme to better align with the current QMK template.

* Bugfixes to supporting files
2019-03-17 10:04:50 -07:00
Drashna Jaelre
e9ace14878 [Docs] Add VSCode guide to docs (#5124)
* Add VSCode guide to docs

* Fix settings menu enumeration

* Update docs/other_vscode.md

Co-Authored-By: drashna <drashna@live.com>

* Update docs/other_vscode.md

Co-Authored-By: drashna <drashna@live.com>

* Update docs/other_vscode.md

Co-Authored-By: drashna <drashna@live.com>

* Update docs/other_vscode.md

Co-Authored-By: drashna <drashna@live.com>

* Update docs/other_vscode.md

Co-Authored-By: drashna <drashna@live.com>
2019-03-15 14:34:58 -07:00
Danny
22e499efdb [Keyboard] Add handwired split tester (#5413)
* Add handwired split tester

* Update keyboards/handwired/splittest/readme.md

Co-Authored-By: nooges <nooges@users.noreply.github.com>

* Update keyboards/handwired/splittest/readme.md

Co-Authored-By: nooges <nooges@users.noreply.github.com>
2019-03-15 14:28:38 -07:00
67 changed files with 1340 additions and 505 deletions

View File

@@ -1,4 +1,4 @@
FROM debian
FROM debian:9
RUN apt-get update && apt-get install --no-install-recommends -y \
avr-libc \

4
Vagrantfile vendored
View File

@@ -6,7 +6,7 @@ Vagrant.configure(2) do |config|
config.vm.define "qmk_firmware"
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
config.vm.box = "bento/ubuntu-16.04"
config.vm.box = "generic/debian9"
# This section allows you to customize the Virtualbox VM
# settings, ie showing the GUI or upping the memory
@@ -55,7 +55,7 @@ Vagrant.configure(2) do |config|
# image, you'll need to: chmod -R a+rw .
config.vm.provider "docker" do |docker, override|
override.vm.box = nil
docker.image = "jesselang/debian-vagrant:jessie"
docker.image = "jesselang/debian-vagrant:stretch"
docker.has_ssh = true
end

View File

@@ -92,7 +92,8 @@
* [Understanding QMK](understanding_qmk.md)
* Other Topics
* [Using Eclipse with QMK](eclipse.md)
* [Using Eclipse with QMK](other_eclipse.md)
* [Using VSCode with QMK](other_vscode.md)
* [Support](support.md)
* QMK Internals (In Progress)

117
docs/other_vscode.md Normal file
View File

@@ -0,0 +1,117 @@
# Setting up Visual Studio Code for QMK Development
[Visual Studio Code](https://code.visualstudio.com/) (VS Code) is an open-source code editor that supports many different programming languages.
Using a full-featured editor such as VS Code provides many advantages over a plain text editor, such as:
* intelligent code completion
* convenient navigation in the code
* refactoring tools
* build automation (no need for the command-line)
* a graphical front end for GIT
* many other tools such as debugging, code formatting, showing call hierarchies etc.
The purpose of this page is to document how to set up VS Code for developing QMK Firmware.
This guide covers how to configure everything needed on Windows and Ubuntu 18.04
# Set up VS Code
Before starting, you will want to make sure that you have all of the build tools set up, and QMK Firmware cloned. Head to the the [Newbs Getting Started Guide](newbs_getting_started.md) to get things set up, if you haven't already.
## Windows
### Prerequisites
* [Git for Windows](https://git-scm.com/download/win) (This link will prompt to save/run the installer)
1. Disable all of the options but `Git LFS (Large File Support)` and `Check daily for Git for Windows updates`.
2. Set the default editor to `Use Visual Studio Code as Git's default editor`
3. Select the `Use Git from Git Bash only` option, since that's the option that you should use here.
4. For the `Choosing HTTPS transport backend`, either option should be fine.
5. Select the `Checkout as-is, commit Unix-style line endings` option. QMK Firmware uses Unix style commits.
6. For the extra options, leave the default options as is.
This software is needed for Git support in VS Code. It may be possible to not include this, but it is much simpler to just use this.
* [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases) (Optional)
This software provides better support for Git by providing secure storage for git credentials, MFA and personal access token generation.
This isn't strictly needed, but we would recommend it.
### Installing VS Code
1. Head to [VS Code](https://code.visualstudio.com/) and download the installer
2. Run the installer
This part is super simple. However, there is some configuration that we need to do to ensure things are configured correctly.
### Configuring VS Code
First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properies.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already.
Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS.
Once you have saved this file, you will need to reload VS Code, if it was already running.
?> You should see an `extensions.json` and `settings.json` file in the `.vscode` folder, as well.
Now, we will set up the MSYS2 window to show up in VSCode as the integrated terminal. This has a number of advantages. Mostly, you can control+click on errors and jump to those files. This makes debugging much easier. It's also nice, in that you don't have to jump to another window.
1. Click <kbd><kbd>File</kbd> > <kbd>Preferences ></kbd> > <kbd>Settings</kbd> </kbd>
2. Click on the <kbd>{}</kbd> button, in the top right to open the `settings.json` file.
3. Set the file's content to:
```json
{
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.env.windows": {
"MSYSTEM": "MINGW64",
"CHERE_INVOKING": "1"
},
"terminal.integrated.shellArgs.windows": [
"--login"
],
"terminal.integrated.cursorStyle": "line"
}
```
If there are settings here already, then just add everything between the first and last curly brackets.
?> If you installed MSYS2 to a different folder, then you'll need to change the path for `terminal.integrated.shell.windows` to the correct path for your system.
4. Hit Ctrl-` (grave) to bring up the terminal.
This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard.
## Every other Operating System
1. Head to [VS Code](https://code.visualstudio.com/) and download the installer
2. Run the installer
3. That's it
No, really, that's it. The paths needed are already included when installing the packages, and it is much better about detecting the current workspace files and parsing them for IntelliSense.
## Plugins
There are a number of extensions that you may want to install:
* [Git Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack) -
This installs a bunch of Git related tools that may make using Git with QMK Firmware easier.
* [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - _[Optional]_ - Helps to keep the code to the QMK Coding Conventions.
* [Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2) - _[Optional]_ - This color codes the brackets in your code, to make it easier to reference nested code.
* [Github Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's.
* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody.
* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too.
* [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[Optional]_ - This shows the current Travis CI status, if you have it set up.
Restart once you've installed any extensions
# Configure VS Code for QMK
1. Click <kbd><kbd>File</kbd> > <kbd>Open Folder</kbd></kbd>
2. Open the QMK Firmware folder that you cloned from GitHub.
3. Click <kbd><kbd>File</kbd> > <kbd>Save Workspace As...</kbd></kbd>
And now you're ready to code QMK Firmware in VS Code

View File

@@ -23,6 +23,8 @@
#define QMK_LED B4
#define BACKLIGHT_LEVELS 3
#define BACKLIGHT_PIN B5
#define BACKLIGHT_BREATHING
#define BREATHING_PERIOD 5
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

View File

@@ -0,0 +1,75 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xCB10
#define PRODUCT_ID 0x1111
#define DEVICE_VER 0x0100
#define MANUFACTURER Keebio
#define PRODUCT Split Tester
#define DESCRIPTION Split keyboard testing unit
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 2
#define MATRIX_COLS 1
// wiring of each half
#define MATRIX_ROW_PINS { B3 }
#define MATRIX_COL_PINS { B6 }
#define SPLIT_HAND_PIN F6
#define SOFT_SERIAL_PIN D1
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
#define RGBLED_SPLIT { 6, 6 }
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
// #define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION

View File

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

View File

@@ -0,0 +1,5 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(RGB_MOD, RESET)
};

View File

@@ -0,0 +1,26 @@
Split Tester
============
A two-switch tester built using two Pro Micros, mainly intended to test RGB on split keyboards. Seen here: https://www.instagram.com/p/BvCPNzynwrV/
Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges)
Hardware Supported: Pro Micro
Make example for this keyboard (after setting up your build environment):
make handwired/splittest:default
Example of flashing this keyboard:
make handwired/splittest:default:avrdude
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).
Wiring
------
- Add switches to both Pro Micros across B3 and B6 pins
- Add pull-up resistor to left side between VCC and F6
- Add pull-down resistors to right side between GND and F6
- Connect the following pins on both sides together: D0, D1, GND, VCC
- Add I2C 4.7kOhm resistors between D0 and VCC, and D1 and VCC
- Wire Di of RGB strip for each half to D2

View File

@@ -0,0 +1,65 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of
# different sizes, comment this out, and the correct address will be loaded
# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = caterina
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# 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 = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # 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
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SPLIT_KEYBOARD = yes

View File

@@ -0,0 +1 @@
#include "splittest.h"

View File

@@ -0,0 +1,5 @@
#pragma once
#include "quantum.h"
#define LAYOUT(L1, R1) {{L1}, {R1}}

View File

@@ -5,7 +5,7 @@ This is my qmk firmware for my keyboard. I grew tired of organizing the keycode
array in plain text so I made it a literate .org file. I've never done this
before, so bear with me.
* Keymap
* Layers
#+BEGIN_COMMENT
#+NAME: empty-layer
@@ -19,7 +19,7 @@ before, so bear with me.
#+END_COMMENT
This is my "pretty" org mode organized table for my main dvorak layer. If you
don't use org mode, it won't be that exiting, but if you enjoy working in org
don't use org mode, it won't be that exciting, but if you enjoy working in org
mode, you can edit this table directly, and this file is tangled to the actual
keymap. No more organizing spaces or converting to and from comments.
@@ -31,23 +31,45 @@ keymap. No more organizing spaces or converting to and from comments.
| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | T_RGUI |
|--------+--------+------+------+------+-----+-----+-----+------+-------+--------+--------|
This qwerty layout is just so normal people can try out the board. Tap keys
would need to be customized I think, more on that later. I also put another
dvorak key here because I have nightmares of getting trapped in this forsaken
layout.
#+NAME: qwerty-layer
|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------|
| T_LRSE | Q | W | E | R | T | Y | U | I | O | P | T_RRSE |
| T_LSFT | A | S | D | F | G | H | J | K | L | SCLN | T_RSFT |
| T_LCTL | Z | X | C | V | B | N | M | COMM | DOT | QUOT | T_RCTL |
| T_LGUI | T_LALT | UP | DOWN | BSPC | TAB | ENT | SPC | LEFT | RIGHT | T_RALT | DVORAK |
|--------+--------+----+------+------+-----+-----+-----+------+-------+--------+--------|
I tried to keep my layout bare bones, just what would be available on a normal
keyboard, minus some keys I never used. The bottom left copies a normal
keyboard, minus some keys I never used. This one secondary layer should cover a
majority of the keys not found on the home layer. The bottom left copies a normal
keyboards symbols from shifted numbers, and the rest is placed where convenient,
with some considerations for one handed use, hence the shortcuts in the top
left.
#+TODO: qwerty layer for ma friends
#+NAME: secondary-layer
|----+--------+--------+--------+--------+------+------+----+--------+--------+-----+----|
| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | F11 | -- |
| -- | ESC | CAPS | PGUP | PGDN | F4 | ASTR | 4 | 5 | 6 | 0 | -- |
| -- | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | F12 | -- |
| -- | -- | EZUP | EZDOWN | -- | AMPR | PIPE | -- | EZLEFT | EZRGHT | -- | -- |
|----+--------+--------+--------+--------+------+------+----+--------+--------+-----+----|
|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------|
| -- | EZUNDO | EZCOPY | EZCUT | EZPSTE | INS | EQL | 7 | 8 | 9 | -- | -- |
| EZSHFT | ESC | CAPS | PGUP | PGDN | HOME | ASTR | 4 | 5 | 6 | 0 | EZSHFT |
| EZCTRL | EXLM | AT | HASH | DLR | PERC | CIRC | 1 | 2 | 3 | COM | EZCTRL |
| EZGUI | EZALT | EZUP | EZDOWN | SPC | AMPR | PIPE | END | EZLEFT | EZRGHT | EZALT | EZGUI |
|--------+--------+--------+--------+--------+------+------+-----+--------+--------+-------+--------|
But wait, we are missing several important keys!? yes, well, the modifier keys
Basic command layer for one-shot macros and function keys.
#+NAME: command-layer
|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----|
| -- | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | -- |
| -- | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | -- |
| -- | F21 | F22 | F23 | F24 | QWERTY | DVORAK | USER | EMAIL | NAME | -- | -- |
| -- | -- | -- | -- | -- | -- | -- | DIR | -- | -- | -- | -- |
|----+-----+-----+-----+-----+--------+--------+------+-------+------+-----+----|
But wait, we are missing several important keys? well, yes, but the modifier keys
all do other keys when tapped. More about that in the keymap section.
* Keymap Conversion in Python
@@ -55,7 +77,7 @@ all do other keys when tapped. More about that in the keymap section.
This python can convert that table into the array needed for the keymap file. It
simply prepends every key with "KC_". I used to use a dictionary to convert some
keys from the table into qmk keycodes, but the double convertion was
unneccessary so I simply prepended all my macros with KC and moved all the
unneccessary so I just prepended all my macros with KC and moved all the
implementation to the `process-user-input` function.
#+NAME:layer-to-array
@@ -84,54 +106,68 @@ return results
* keymap.c
Now that we have done all the hard work, lets layout our keymap file then define
our macros.
** Headers And Layer Declaration
Now that we laid out our layout, lets lay out our kemap file.
#+BEGIN_SRC C :noweb yes
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
static uint16_t tap_timers[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#+END_SRC
char last_mod = -1;
enum planck_layers {
_DVORAK,
_RISE
};
** Keycodes
#+BEGIN_SRC C :noweb yes
// where the 'T_' communicates how the key does something different when tapped.
enum planck_keycodes {
DVORAK = SAFE_RANGE,
KC_T_LALT,
KC_T_RALT,
KC_T_LGUI,
KC_T_RGUI,
KC_T_LCTL,
KC_T_RCTL,
KC_T_LSFT,
KC_T_RSFT,
KC_T_LRSE,
KC_T_RRSE,
KC_EZRGHT,
KC_EZLEFT,
KC_EZUP,
KC_EZDOWN,
KC_EZUNDO,
KC_EZCOPY,
KC_EZCUT,
KC_EZPSTE
//DVORAK = SAFE_RANGE,
KC_T_LALT = SAFE_RANGE,
KC_T_RALT,
KC_T_LGUI,
KC_T_RGUI,
KC_T_LCTL,
KC_T_RCTL,
KC_T_LSFT,
KC_T_RSFT,
KC_T_LRSE,
KC_T_RRSE,
KC_EZRGHT,
KC_EZLEFT,
KC_EZUP,
KC_EZDOWN,
KC_EZUNDO,
KC_EZCOPY,
KC_EZCUT,
KC_EZPSTE,
KC_EZSHFT,
KC_EZCTRL,
KC_EZGUI,
KC_EZALT,
KC_DVORAK,
KC_QWERTY,
KC_USER,
KC_EMAIL,
KC_NAME,
KC_DIR,
KC_COM
};
#+END_SRC
** Import Key table
#+BEGIN_SRC C :noweb yes
enum planck_layers {
_DVORAK,
_QWERTY,
_RISE,
_COMMAND
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#+END_SRC
** Import Key table
#+BEGIN_SRC C :noweb yes
[_DVORAK] =
@@ -142,6 +178,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#+END_SRC
#+BEGIN_SRC C :noweb yes
[_QWERTY] =
#+END_SRC
#+BEGIN_SRC C :noweb yes
<<layer-to-array(qwerty-layer)>>
#+END_SRC
#+BEGIN_SRC C :noweb yes
[_RISE] =
@@ -152,50 +198,96 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#+END_SRC
** Process User Input
*** Tap Key Functionality
#+BEGIN_SRC C :noweb yes
[_COMMAND] =
These methods define how I implemented the tap mechanic. Basically, I believe
that /pressing/ any other key should be grounds for the hold functionality to be
assumed. My natuaral typing style experiences no delays from my method.
#+END_SRC
#+BEGIN_SRC C :noweb yes
<<layer-to-array(command-layer)>>
#+END_SRC
#+BEGIN_SRC C :noweb yes
};
void mod_press(uint16_t hold_code, int id) {
tap_timers[id] = timer_read();
last_mod = id;
register_code(hold_code);
#+END_SRC
** Tap Keys
I don't like tap keys coming out on release. When modified, I often let go of
the modifier too early because the tap button doesn't come out untill release. I
guess you could save the state of the board on press and then apply it after the
timer, but what I really want is the keys to come out on press when they can and
when it is most useful. For me, that is when they are modified a single time. So
I kind "locked" the board into only doing single modifiers, making them faster.
Disadvantages are double modified keys must be done with one shot keys (its
actually not that bad, it feels like emacs!) and triple modified keys are
impossible at the moment.
#+BEGIN_SRC C :noweb yes
static uint16_t tap_timer = 0;
char last_mod = 10;
void mod_press(uint16_t tap_code, uint16_t hold_code, int id) {
// this first if body makes double modified keys impossible, but stops the
// delay when modifying a tap key which would result in the tap key not
// getting modified.
if (last_mod != id && last_mod != 10) {
tap_code16(tap_code);
last_mod = 10;
} else {
tap_timer = timer_read();
last_mod = id;
register_code(hold_code);
}
}
void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) {
unregister_code(hold_code);
if (last_mod == id && timer_elapsed(tap_timers[id]) < TAPPING_TERM) {
tap_code16(tap_code);
last_mod = -1;
if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) {
tap_code16(tap_code);
last_mod = 10;
}
}
#+END_SRC
*** Set DVORAK layout
The function that filter's user inputs and applies macros, the begginning is
pretty basic, setting our main layer and configuring our secondary layer.
** Process User Input
#+BEGIN_SRC C :noweb yes
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
switch (keycode) {
#+END_SRC
** Layouts
Set Dvorak layout
#+BEGIN_SRC C :noweb yes
case KC_DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return true;
break;
#+END_SRC
*** Alt and ()
Set Qwerty layout.
#+BEGIN_SRC C :noweb yes
case KC_QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return true;
break;
#+END_SRC
** Alt and ()
Left and right alt are ( and ) when tapped. I put them on alt instead of a more
conveniant key like control because parentheses do not need to be shift modified
@@ -204,24 +296,24 @@ ever, unlike some other tap keys seen in the next sections.
#+BEGIN_SRC C :noweb yes
case KC_T_LALT:
if (record->event.pressed) {
mod_press(KC_LALT, 0);
} else {
mod_lift(S(KC_9), KC_LALT, 0);
}
mod_press(S(KC_9), KC_LALT, 0);
} else {
mod_lift(S(KC_9), KC_LALT, 0);
}
return false;
break;
case KC_T_RALT:
if (record->event.pressed) {
mod_press(KC_RALT, 1);
} else {
mod_lift(S(KC_0), KC_RALT, 1);
}
mod_press(S(KC_0), KC_RALT, 1);
} else {
mod_lift(S(KC_0), KC_RALT, 1);
}
return false;
break;
#+END_SRC
*** Gui and `\
** Gui and `\
I place gui in the bottom corner because I believe it is the hardest key to
reach, so gui seemed like a good fit for a dedicated key that I never want to
@@ -231,24 +323,24 @@ number pad or shifted number keys.
#+BEGIN_SRC C :noweb yes
case KC_T_LGUI:
if (record->event.pressed) {
mod_press(KC_LGUI, 2);
} else {
mod_lift(KC_GRAVE, KC_LGUI, 2);
}
mod_press(KC_GRAVE, KC_LGUI, 2);
} else {
mod_lift(KC_GRAVE, KC_LGUI, 2);
}
return false;
break;
case KC_T_RGUI:
if (record->event.pressed) {
mod_press(KC_RGUI, 3);
} else {
mod_lift(KC_BSLASH, KC_RGUI, 3);
}
mod_press(KC_BSLASH, KC_RGUI, 3);
} else {
mod_lift(KC_BSLASH, KC_RGUI, 3);
}
return false;
break;
#+END_SRC
*** Ctrl and []
** Ctrl and []
Left and right control are [] respectively when they are tapped, making { and }
also very convenient.
@@ -256,24 +348,24 @@ also very convenient.
#+BEGIN_SRC C :noweb yes
case KC_T_LCTL:
if (record->event.pressed) {
mod_press(KC_LCTL, 4);
} else {
mod_lift(KC_LBRACKET, KC_LCTL, 4);
}
mod_press(KC_LBRACKET, KC_LCTL, 4);
} else {
mod_lift(KC_LBRACKET, KC_LCTL, 4);
}
return false;
break;
case KC_T_RCTL:
if (record->event.pressed) {
mod_press(KC_RCTL, 5);
} else {
mod_lift(KC_RBRACKET, KC_RCTL, 5);
}
mod_press(KC_RBRACKET, KC_RCTL, 5);
} else {
mod_lift(KC_RBRACKET, KC_RCTL, 5);
}
return false;
break;
#+END_SRC
*** Shft and =-
** Shft and =-
I place shift on the home row, so having '-' right of my pinkie is standard, and
it only felt natural to put its opposite, '=/+' on the other side. I put an
@@ -282,24 +374,24 @@ extra one on the right side in the secondary layer for the num pad.
#+BEGIN_SRC C :noweb yes
case KC_T_LSFT:
if (record->event.pressed) {
mod_press(KC_LSFT, 6);
} else {
mod_lift(KC_EQUAL, KC_LSFT, 6);
}
mod_press(KC_EQUAL, KC_LSFT, 6);
} else {
mod_lift(KC_EQUAL, KC_LSFT, 6);
}
return false;
break;
case KC_T_RSFT:
if (record->event.pressed) {
mod_press(KC_RSFT, 7);
} else {
mod_lift(KC_MINUS, KC_RSFT, 7);
}
mod_press(KC_MINUS, KC_RSFT, 7);
} else {
mod_lift(KC_MINUS, KC_RSFT, 7);
}
return false;
break;
#+END_SRC
*** Rise, DEL, and /
** Rise, DEL, and /
I use the top corners as rise because I decided that I do not like using layers
with my thumbs. It feels uncomfortable to hold keys down with the side of my
@@ -315,36 +407,78 @@ corner again mimicing a standard dvorak keyboard.
#+BEGIN_SRC C :noweb yes
case KC_T_LRSE:
if (record->event.pressed) {
tap_timers[8] = timer_read();
last_mod = 8;
layer_on(_RISE);
} else {
layer_off(_RISE);
if (last_mod == 8 && timer_elapsed(tap_timers[8]) < TAPPING_TERM) {
tap_code16(KC_DELETE);
last_mod = -1;
}
}
tap_timer = timer_read();
last_mod = 8;
layer_on(_RISE);
} else {
layer_off(_RISE);
if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) {
tap_code16(KC_DELETE);
last_mod = 10;
}
}
return false;
break;
case KC_T_RRSE:
if (record->event.pressed) {
tap_timers[9] = timer_read();
last_mod = 9;
layer_on(_RISE);
} else {
layer_off(_RISE);
if (last_mod == 9 && timer_elapsed(tap_timers[9]) < TAPPING_TERM) {
tap_code16(KC_SLASH);
last_mod = -1;
}
}
tap_timer = timer_read();
last_mod = 9;
layer_on(_RISE);
} else {
layer_off(_RISE);
if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) {
tap_code16(KC_SLASH);
last_mod = 10;
}
}
return false;
break;
#+END_SRC
*** EZ keys
** EZ Keys
EZ or "easy" keys do things that can already be done on the board, but I want an
easier way of doing them.
*** One Shot Keys
Since I made modified tap keys occur on press instead of release, I need one
shot keys to press any key with more than one modifier.
#+BEGIN_SRC C :noweb yes
case KC_EZSHFT:
if (record->event.pressed) {
set_oneshot_mods(MOD_LSFT);
last_mod = 10;
}
return false;
break;
case KC_EZCTRL:
if (record->event.pressed) {
set_oneshot_mods(MOD_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZALT:
if (record->event.pressed) {
set_oneshot_mods(MOD_LALT);
last_mod = 10;
}
return false;
break;
case KC_EZGUI:
if (record->event.pressed) {
set_oneshot_mods(MOD_LGUI);
last_mod = 10;
}
return false;
break;
#+END_SRC
*** Arrows
I use ctrl+shift+arrows keys a lot, so when the layer key is pressed they became
lazy versions of themselves with control and shift already pressed.
@@ -355,77 +489,134 @@ left hand like on a qwerty or colemek keyboard.
#+BEGIN_SRC C :noweb yes
case KC_EZRGHT:
if (record->event.pressed) {
register_code(KC_LCTL);
tap_code16(S(KC_RGHT));
unregister_code(KC_LCTL);
last_mod = -1;
}
register_code(KC_LCTL);
tap_code16(S(KC_RGHT));
unregister_code(KC_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZLEFT:
if (record->event.pressed) {
register_code(KC_LCTL);
tap_code16(S(KC_LEFT));
unregister_code(KC_LCTL);
last_mod = -1;
}
register_code(KC_LCTL);
tap_code16(S(KC_LEFT));
unregister_code(KC_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZDOWN:
if (record->event.pressed) {
register_code(KC_LCTL);
tap_code16(S(KC_DOWN));
unregister_code(KC_LCTL);
last_mod = -1;
}
register_code(KC_LCTL);
tap_code16(S(KC_DOWN));
unregister_code(KC_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZUP:
if (record->event.pressed) {
register_code(KC_LCTL);
tap_code16(S(KC_UP));
unregister_code(KC_LCTL);
last_mod = -1;
}
register_code(KC_LCTL);
tap_code16(S(KC_UP));
unregister_code(KC_LCTL);
last_mod = 10;
}
return false;
break;
#+END_SRC
*** Undo, Copy, Cut, Paste
#+BEGIN_SRC C :noweb yes
case KC_EZUNDO:
if (record->event.pressed) {
tap_code16(C(KC_Z));
last_mod = -1;
tap_code16(C(KC_Z));
last_mod = 10;
}
return false;
break;
case KC_EZCOPY:
if (record->event.pressed) {
tap_code16(C(KC_C));
last_mod = -1;
tap_code16(C(KC_C));
last_mod = 10;
}
return false;
break;
case KC_EZCUT:
if (record->event.pressed) {
tap_code16(C(KC_X));
last_mod = -1;
tap_code16(C(KC_X));
last_mod = 10;
}
return false;
break;
case KC_EZPSTE:
if (record->event.pressed) {
tap_code16(C(KC_P));
last_mod = -1;
tap_code16(C(KC_V));
last_mod = 10;
}
return false;
break;
#+END_SRC
*** Standard inputs interupt tap
** Commands
Finally, if just a standard key is tapped, set the interupted flag.
Start command layer one shot
#+BEGIN_SRC C :noweb yes
}
last_mod = -1;
return true;
case KC_COM:
if (record->event.pressed) {
layer_on(_COMMAND);
set_oneshot_layer(_COMMAND, ONESHOT_START);
last_mod = 10;
} else {
clear_oneshot_layer_state (ONESHOT_PRESSED);
}
return false;
break;
#+END_SRC
Just some strings I notice that I type a lot.
#+BEGIN_SRC C :noweb yes
case KC_USER:
if (record->event.pressed) {
send_string("mhostley");
last_mod = 10;
}
return true;
break;
case KC_EMAIL:
if (record->event.pressed) {
send_string("mhostley@gmail.com");
last_mod = 10;
}
return true;
break;
case KC_NAME:
if (record->event.pressed) {
send_string("Samuel Jahnke");
last_mod = 10;
}
return true;
break;
case KC_DIR:
if (record->event.pressed) {
send_string("home/mhostley/");
last_mod = 10;
}
return true;
break;
#+END_SRC
** Standard inputs interupt tap
Finally, if just a standard key is tapped, set the interupted flag.
Keep this last.
#+BEGIN_SRC C :noweb yes
}
last_mod = 10;
return true;
}
#+END_SRC

View File

@@ -2,36 +2,45 @@
extern keymap_config_t keymap_config;
static uint16_t tap_timers[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
char last_mod = -1;
enum planck_layers {
_DVORAK,
_RISE
};
// where the 'T_' communicates how the key does something different when tapped.
enum planck_keycodes {
DVORAK = SAFE_RANGE,
KC_T_LALT,
KC_T_RALT,
KC_T_LGUI,
KC_T_RGUI,
KC_T_LCTL,
KC_T_RCTL,
KC_T_LSFT,
KC_T_RSFT,
KC_T_LRSE,
KC_T_RRSE,
KC_EZRGHT,
KC_EZLEFT,
KC_EZUP,
KC_EZDOWN,
KC_EZUNDO,
KC_EZCOPY,
KC_EZCUT,
KC_EZPSTE
//DVORAK = SAFE_RANGE,
KC_T_LALT = SAFE_RANGE,
KC_T_RALT,
KC_T_LGUI,
KC_T_RGUI,
KC_T_LCTL,
KC_T_RCTL,
KC_T_LSFT,
KC_T_RSFT,
KC_T_LRSE,
KC_T_RRSE,
KC_EZRGHT,
KC_EZLEFT,
KC_EZUP,
KC_EZDOWN,
KC_EZUNDO,
KC_EZCOPY,
KC_EZCUT,
KC_EZPSTE,
KC_EZSHFT,
KC_EZCTRL,
KC_EZGUI,
KC_EZALT,
KC_DVORAK,
KC_QWERTY,
KC_USER,
KC_EMAIL,
KC_NAME,
KC_DIR,
KC_COM
};
enum planck_layers {
_DVORAK,
_QWERTY,
_RISE,
_COMMAND
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -44,202 +53,307 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_T_RGUI}
},
[_QWERTY] =
{{ KC_T_LRSE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_T_RRSE},
{ KC_T_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_T_RSFT},
{ KC_T_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_T_RCTL},
{ KC_T_LGUI, KC_T_LALT, KC_UP, KC_DOWN, KC_BSPC, KC_TAB, KC_ENT, KC_SPC, KC_LEFT, KC_RIGHT, KC_T_RALT, KC_DVORAK}
},
[_RISE] =
{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_F11, KC_TRANSPARENT},
{ KC_TRANSPARENT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_F4, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_TRANSPARENT},
{ KC_TRANSPARENT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_F12, KC_TRANSPARENT},
{ KC_TRANSPARENT, KC_TRANSPARENT, KC_EZUP, KC_EZDOWN, KC_TRANSPARENT, KC_AMPR, KC_PIPE, KC_TRANSPARENT, KC_EZLEFT, KC_EZRGHT, KC_TRANSPARENT, KC_TRANSPARENT}
{{ KC_TRANSPARENT, KC_EZUNDO, KC_EZCOPY, KC_EZCUT, KC_EZPSTE, KC_INS, KC_EQL, KC_7, KC_8, KC_9, KC_TRANSPARENT, KC_TRANSPARENT},
{ KC_EZSHFT, KC_ESC, KC_CAPS, KC_PGUP, KC_PGDN, KC_HOME, KC_ASTR, KC_4, KC_5, KC_6, KC_0, KC_EZSHFT},
{ KC_EZCTRL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_1, KC_2, KC_3, KC_COM, KC_EZCTRL},
{ KC_EZGUI, KC_EZALT, KC_EZUP, KC_EZDOWN, KC_SPC, KC_AMPR, KC_PIPE, KC_END, KC_EZLEFT, KC_EZRGHT, KC_EZALT, KC_EZGUI}
},
[_COMMAND] =
{{ KC_TRANSPARENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRANSPARENT},
{ KC_TRANSPARENT, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_TRANSPARENT},
{ KC_TRANSPARENT, KC_F21, KC_F22, KC_F23, KC_F24, KC_QWERTY, KC_DVORAK, KC_USER, KC_EMAIL, KC_NAME, KC_TRANSPARENT, KC_TRANSPARENT},
{ KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_DIR, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT}
},
};
void mod_press(uint16_t hold_code, int id) {
tap_timers[id] = timer_read();
last_mod = id;
register_code(hold_code);
static uint16_t tap_timer = 0;
char last_mod = 10;
void mod_press(uint16_t tap_code, uint16_t hold_code, int id) {
// this first if body makes double modified keys impossible, but stops the
// delay when modifying a tap key which would result in the tap key not
// getting modified.
if (last_mod != id && last_mod != 10) {
tap_code16(tap_code);
last_mod = 10;
} else {
tap_timer = timer_read();
last_mod = id;
register_code(hold_code);
}
}
void mod_lift(uint16_t tap_code, uint16_t hold_code, int id) {
unregister_code(hold_code);
if (last_mod == id && timer_elapsed(tap_timers[id]) < TAPPING_TERM) {
tap_code16(tap_code);
last_mod = -1;
if (last_mod == id && timer_elapsed(tap_timer) < TAPPING_TERM) {
tap_code16(tap_code);
last_mod = 10;
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
switch (keycode) {
case KC_DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return true;
break;
case KC_QWERTY:
if (record->event.pressed) {
set_single_persistent_default_layer(_QWERTY);
}
return true;
break;
case KC_T_LALT:
if (record->event.pressed) {
mod_press(KC_LALT, 0);
} else {
mod_lift(S(KC_9), KC_LALT, 0);
}
mod_press(S(KC_9), KC_LALT, 0);
} else {
mod_lift(S(KC_9), KC_LALT, 0);
}
return false;
break;
case KC_T_RALT:
if (record->event.pressed) {
mod_press(KC_RALT, 1);
} else {
mod_lift(S(KC_0), KC_RALT, 1);
}
mod_press(S(KC_0), KC_RALT, 1);
} else {
mod_lift(S(KC_0), KC_RALT, 1);
}
return false;
break;
case KC_T_LGUI:
if (record->event.pressed) {
mod_press(KC_LGUI, 2);
} else {
mod_lift(KC_GRAVE, KC_LGUI, 2);
}
mod_press(KC_GRAVE, KC_LGUI, 2);
} else {
mod_lift(KC_GRAVE, KC_LGUI, 2);
}
return false;
break;
case KC_T_RGUI:
if (record->event.pressed) {
mod_press(KC_RGUI, 3);
} else {
mod_lift(KC_BSLASH, KC_RGUI, 3);
}
mod_press(KC_BSLASH, KC_RGUI, 3);
} else {
mod_lift(KC_BSLASH, KC_RGUI, 3);
}
return false;
break;
case KC_T_LCTL:
if (record->event.pressed) {
mod_press(KC_LCTL, 4);
} else {
mod_lift(KC_LBRACKET, KC_LCTL, 4);
}
mod_press(KC_LBRACKET, KC_LCTL, 4);
} else {
mod_lift(KC_LBRACKET, KC_LCTL, 4);
}
return false;
break;
case KC_T_RCTL:
if (record->event.pressed) {
mod_press(KC_RCTL, 5);
} else {
mod_lift(KC_RBRACKET, KC_RCTL, 5);
}
mod_press(KC_RBRACKET, KC_RCTL, 5);
} else {
mod_lift(KC_RBRACKET, KC_RCTL, 5);
}
return false;
break;
case KC_T_LSFT:
if (record->event.pressed) {
mod_press(KC_LSFT, 6);
} else {
mod_lift(KC_EQUAL, KC_LSFT, 6);
}
mod_press(KC_EQUAL, KC_LSFT, 6);
} else {
mod_lift(KC_EQUAL, KC_LSFT, 6);
}
return false;
break;
case KC_T_RSFT:
if (record->event.pressed) {
mod_press(KC_RSFT, 7);
} else {
mod_lift(KC_MINUS, KC_RSFT, 7);
}
mod_press(KC_MINUS, KC_RSFT, 7);
} else {
mod_lift(KC_MINUS, KC_RSFT, 7);
}
return false;
break;
case KC_T_LRSE:
if (record->event.pressed) {
tap_timers[8] = timer_read();
last_mod = 8;
layer_on(_RISE);
} else {
layer_off(_RISE);
if (last_mod == 8 && timer_elapsed(tap_timers[8]) < TAPPING_TERM) {
tap_code16(KC_DELETE);
last_mod = -1;
}
}
tap_timer = timer_read();
last_mod = 8;
layer_on(_RISE);
} else {
layer_off(_RISE);
if (last_mod == 8 && timer_elapsed(tap_timer) < TAPPING_TERM) {
tap_code16(KC_DELETE);
last_mod = 10;
}
}
return false;
break;
case KC_T_RRSE:
if (record->event.pressed) {
tap_timers[9] = timer_read();
last_mod = 9;
layer_on(_RISE);
} else {
layer_off(_RISE);
if (last_mod == 9 && timer_elapsed(tap_timers[9]) < TAPPING_TERM) {
tap_code16(KC_SLASH);
last_mod = -1;
}
}
tap_timer = timer_read();
last_mod = 9;
layer_on(_RISE);
} else {
layer_off(_RISE);
if (last_mod == 9 && timer_elapsed(tap_timer) < TAPPING_TERM) {
tap_code16(KC_SLASH);
last_mod = 10;
}
}
return false;
break;
case KC_EZSHFT:
if (record->event.pressed) {
set_oneshot_mods(MOD_LSFT);
last_mod = 10;
}
return false;
break;
case KC_EZCTRL:
if (record->event.pressed) {
set_oneshot_mods(MOD_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZALT:
if (record->event.pressed) {
set_oneshot_mods(MOD_LALT);
last_mod = 10;
}
return false;
break;
case KC_EZGUI:
if (record->event.pressed) {
set_oneshot_mods(MOD_LGUI);
last_mod = 10;
}
return false;
break;
case KC_EZRGHT:
if (record->event.pressed) {
register_code(KC_LCTL);
tap_code16(S(KC_RGHT));
unregister_code(KC_LCTL);
last_mod = -1;
}
register_code(KC_LCTL);
tap_code16(S(KC_RGHT));
unregister_code(KC_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZLEFT:
if (record->event.pressed) {
register_code(KC_LCTL);
tap_code16(S(KC_LEFT));
unregister_code(KC_LCTL);
last_mod = -1;
}
register_code(KC_LCTL);
tap_code16(S(KC_LEFT));
unregister_code(KC_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZDOWN:
if (record->event.pressed) {
register_code(KC_LCTL);
tap_code16(S(KC_DOWN));
unregister_code(KC_LCTL);
last_mod = -1;
}
register_code(KC_LCTL);
tap_code16(S(KC_DOWN));
unregister_code(KC_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZUP:
if (record->event.pressed) {
register_code(KC_LCTL);
tap_code16(S(KC_UP));
unregister_code(KC_LCTL);
last_mod = -1;
}
register_code(KC_LCTL);
tap_code16(S(KC_UP));
unregister_code(KC_LCTL);
last_mod = 10;
}
return false;
break;
case KC_EZUNDO:
if (record->event.pressed) {
tap_code16(C(KC_Z));
last_mod = -1;
tap_code16(C(KC_Z));
last_mod = 10;
}
return false;
break;
case KC_EZCOPY:
if (record->event.pressed) {
tap_code16(C(KC_C));
last_mod = -1;
tap_code16(C(KC_C));
last_mod = 10;
}
return false;
break;
case KC_EZCUT:
if (record->event.pressed) {
tap_code16(C(KC_X));
last_mod = -1;
tap_code16(C(KC_X));
last_mod = 10;
}
return false;
break;
case KC_EZPSTE:
if (record->event.pressed) {
tap_code16(C(KC_P));
last_mod = -1;
tap_code16(C(KC_V));
last_mod = 10;
}
return false;
break;
}
last_mod = -1;
return true;
case KC_COM:
if (record->event.pressed) {
layer_on(_COMMAND);
set_oneshot_layer(_COMMAND, ONESHOT_START);
last_mod = 10;
} else {
clear_oneshot_layer_state (ONESHOT_PRESSED);
}
return false;
break;
case KC_USER:
if (record->event.pressed) {
send_string("mhostley");
last_mod = 10;
}
return true;
break;
case KC_EMAIL:
if (record->event.pressed) {
send_string("mhostley@gmail.com");
last_mod = 10;
}
return true;
break;
case KC_NAME:
if (record->event.pressed) {
send_string("Samuel Jahnke");
last_mod = 10;
}
return true;
break;
case KC_DIR:
if (record->event.pressed) {
send_string("home/mhostley/");
last_mod = 10;
}
return true;
break;
}
last_mod = 10;
return true;
}

View File

@@ -0,0 +1,34 @@
/*
Copyright 2018 Mattia Dal Ben <matthewdibi@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
/* Use I2C or Serial, not both */
#define USE_SERIAL
// #define USE_I2C
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 14
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8

View File

@@ -0,0 +1,92 @@
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _SYMB 1
#define _NAV 2
#define _ADJUST 3
enum custom_keycodes {
QWERTY = SAFE_RANGE,
SYMB,
NAV,
ADJUST,
};
// Shortcut to make keymap more readable
#define SYM_L MO(_SYMB)
#define KC_ALAS LALT_T(KC_PAST)
#define KC_CTES LCTL_T(KC_ESC)
#define KC_CTQU RCTL_T(KC_QUOT)
#define KC_NAGR LT(_NAV, KC_GRV)
#define KC_NAMI LT(_NAV, KC_MINS)
#define KC_ADEN LT(_ADJUST, KC_END)
#define KC_ADPU LT(_ADJUST, KC_PGUP)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_EQL ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_CTES ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_LBRC , KC_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_CTQU ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
KC_BSLS ,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_LGUI , KC_SPC ,KC_BSPC , KC_DEL ,KC_ENT , KC_RGUI , KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
[_SYMB] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
_______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_EXLM ,KC_AT ,KC_LCBR ,KC_RCBR ,KC_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,KC_F12 ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_HASH ,KC_DLR ,KC_LBRC ,KC_RBRC ,KC_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
_______ ,KC_PERC ,KC_CIRC ,KC_LPRN ,KC_RPRN ,KC_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
_______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
[_NAV] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,KC_MS_U ,XXXXXXX ,KC_WH_U ,XXXXXXX ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
XXXXXXX ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_WH_D ,XXXXXXX ,_______ , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RIGHT,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , KC_BTN1 , KC_BTN2 ,_______ , _______ ,_______ , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
),
[_ADJUST] = LAYOUT(
//┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐
XXXXXXX ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤
XXXXXXX ,RESET ,RGB_M_P ,RGB_TOG ,RGB_MOD ,RGB_HUD ,RGB_HUI , RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI ,XXXXXXX ,XXXXXXX ,KC_F12 ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,_______ ,XXXXXXX , XXXXXXX ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,
//├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤
XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX
//└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘
)
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

View File

@@ -0,0 +1,28 @@
# A tweaked keymap for Redox
This keymap modifies the [default keymap](https://github.com/qmk/qmk_firmware/tree/master/keyboards/redox) for the awesome [Redox keyboard](https://github.com/mattdibi/redox-keyboard) designed by Mattia Dal Ben.
![Modified Redox keymap](https://github.com/nrichers/qmk_firmware/blob/master/keyboards/redox/keymaps/nrichers/keymap.png)
## Changes to the default keymap ![#99fcbe](https://placehold.it/15/99fcbe/000000?text=+)
These keymap changes are meant to improve the usability of the layout in everyday use:
- Move `GUI` (`SUPER`) key to where default left `CTRL` and right `ALT` are - gives you two frequently used `CMD` keys on macOS where my brain expects them
- Move `/?` into usual location next to right `SHIFT` - the default flash from Falbatech put `\|` here (might not be the Redox default?), which felt unintuitive
- Put `\|` into bottom-left spot where `GUI` (`SUPER`) was - had to go somewhere and this bottom-left placement sort of balances with the almost bottom-right `/?`
- Change default `ESC` into `ESC` on tap, `CTRL` on hold - Love the UNIX-ey `CTRL` key location and wanted to keep `ESC` in the original position
- Change default `'` above right `SHIFT` into `'` on tap, `CTRL` on hold - Love the UNIX-ey CTRL key location, but it can give you 'left claw hand', which a second, mirrored `CTRL` key fixes
- Add `F11` and `F12` keys to two layers - needed on macOS if you want to control volume up and down from your keyboard (not shown, on a different layer)
- On thumb clusters:
- Left: Move `SPACE` closest to left thumb and move `BACKSPACE` to the right of that - put the key for 'getting it right' closest to your thumb and reduce usage of my right hand (purely personal preference)
- Right: Move `ENTER` closest to right thumb and move `DEL` to the left of that - put the key for 'getting it right' closest to your thumb
## Changes to the Redox layout ![#99e6fc](https://placehold.it/15/99e6fc/000000?text=+)
These are physical keycap changes on the board that make reaching the `Layer 1` keys easier and that, subjectively, look more balanced visually:
- Increase the `Layer 1` key sizes from 1U to 1.25U
- Decrease the 1.5 U key size for `[` and `]` to 1.25U
You could even make `[` and `]` 1U so that you can use keycaps from a standard ANSI key set and also increase the size of the `Layer 2` keys to 1.5U.

View File

@@ -0,0 +1,2 @@
RGBLIGHT_ENABLE = yes

View File

@@ -14,12 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// Disable backlight
#undef BACKLIGHT_ENABLE
#endif

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
// Fillers to make layering more clear
#define ___T___ KC_TRNS

View File

@@ -13,3 +13,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
BACKLIGHT_ENABLE = no

View File

@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// place overrides here
#endif

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
// Fillers to make layering more clear
#define ___T___ KC_TRNS

View File

@@ -1,6 +1,3 @@
#ifndef CONFIG_KEYMAP_H
#define CONFIG_KEYMAP_H
#pragma once
#include "../../config.h"
#endif
// place overrides here

View File

@@ -1,4 +1,4 @@
#include "xd75.h"
#include QMK_KEYBOARD_H
#include "bbaserdem.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

View File

@@ -16,4 +16,4 @@
# pragma once
#include "../../config.h"
// place overrides here

View File

@@ -14,9 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#pragma once
// place overrides here
#ifndef NO_DEBUG
#define NO_DEBUG
#endif
@@ -24,8 +24,6 @@
#define NO_PRINT
#endif
#include "../../config.h"
#define LEADER_TIMEOUT 300
#define BACKLIGHT_BREATHING
@@ -34,10 +32,3 @@
#define randadd 53
#define randmul 181
#define randmod 167
/* Filler to make layering a bit clearer *
* borrowed from basic keymap */
#define _____ KC_NO
#endif

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
/* Fillers to make layering more clear */
#define ___T___ KC_TRNS

View File

@@ -1,5 +1,5 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
@@ -18,7 +18,3 @@ API_SYSEX_ENABLE = no # Enable SYSEX API (+5390)
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@@ -14,15 +14,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#pragma once
#include "../../config.h"
// place overrides here
// QMK customization:
// - after 1.5s, turn off one-shot keys
#define ONESHOT_TIMEOUT 1500
// - TT(layer) only needs one press
#define TAPPING_TOGGLE 1
#endif

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
#ifdef IS_COLINTA
#include "secrets.h"
@@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--/RRND----/MUTE----/FFWD-------------------------------------------------------------------------------------------------------------'
*/
[LAYER_COLEMAK] = KEYMAP(
[LAYER_COLEMAK] = LAYOUT(
KC_GRV, TH_F1, TH_F2, TH_F3, TH_F4, TH_F5, MM_0, MM_1, KC_DEL, TH_F6, TH_F7, TH_F8, TH_F9, TH_F10, KC_MINS,
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, MM_2, GOTO_FN, KC_BSPC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_EQL,
OSCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LBRC, KC_RBRC, KC_ENT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
@@ -113,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_RECORD] = KEYMAP(
[LAYER_RECORD] = LAYOUT(
_____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____,
_____, _____, _____, _____, _____, _____, DYN_REC_STOP, DYN_REC_STOP, _____, _____, _____, _____, _____, _____, _____,
_____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____,
@@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_QWERTY] = KEYMAP(
[LAYER_QWERTY] = LAYOUT(
_____, _____, _____, _____, _____, _____, MM_0, MM_1, _____, _____, _____, _____, _____, _____, _____,
_____, KC_Q, KC_W, KC_E, KC_R, KC_T, MM_2, GOTO_FN, _____, KC_Y, KC_U, KC_I, KC_O, KC_P, _____,
MOD_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, _____, _____, _____, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _____,
@@ -157,7 +157,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[LAYER_FN] = KEYMAP(
[LAYER_FN] = LAYOUT(
GOTO_CM, GOTO_QW, KC_NO, KC_NO, KC_NO, KC_NO, DYN_REC_START1, DYN_REC_START2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,

View File

@@ -14,12 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#pragma once
#include "../../config.h"
// place overrides here
#define TAPPING_TERM 200
#define PERMISSIVE_HOLD
#endif

View File

@@ -1,4 +1,4 @@
#include "xd75.h"
#include QMK_KEYBOARD_H
#define A_BSPC LALT(KC_BSPC) // delete whole word in Mac
// #define C_BSPS LCTL(KC_BSPC) // delete whole word in PC; currently not in use

View File

@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// place overrides here
#endif

View File

@@ -13,12 +13,18 @@
* 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 "xd75.h"
#include QMK_KEYBOARD_H
// Layer shorthand
#define _QW 0
#define _FN 1
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
QMKBEST = SAFE_RANGE,
QMKURL
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
@@ -35,13 +41,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_QW] = { /* QWERTY */
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC },
{ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT },
{ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT },
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT },
{ KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL },
},
[_QW] = LAYOUT_ortho_5x15( /* QWERTY */
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_BSLS, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_DEL, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_END, KC_UP, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_RGUI, KC_RCTL
),
/* FUNCTION
* .--------------------------------------------------------------------------------------------------------------------------------------.
@@ -56,30 +62,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | RGB TG | FN | RGB RMD| RGB MD | P0 | | P. | PENT | PENT | FN | | | |
* '--------------------------------------------------------------------------------------------------------------------------------------'
*/
[_FN] = { /* FUNCTION */
{ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 },
{ KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS },
{ KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______ },
{ KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______ },
{ _______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______ },
}
[_FN] = LAYOUT_ortho_5x15( /* FUNCTION */
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NLCK, KC_SLSH, KC_ASTR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
KC_MSEL, KC_CALC, KC_MYCM, KC_MAIL, RGB_HUD, RGB_HUI, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS,
KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, RGB_SAD, RGB_SAI, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, RESET, _______, _______, _______,
KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, RGB_VAD, RGB_VAI, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, _______, _______, _______,
_______, _______, RGB_TOG, MO(_FN), RGB_RMOD,RGB_MOD, KC_P0, _______, KC_PDOT, KC_PENT, KC_PENT, MO(_FN), _______, _______, _______
)
};
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);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
} else {
unregister_code(KC_RSFT);
}
break;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QMKBEST:
if (record->event.pressed) {
// when keycode QMKBEST is pressed
SEND_STRING("QMK is the best thing ever!");
} else {
// when keycode QMKBEST is released
}
return MACRO_NONE;
};
break;
case QMKURL:
if (record->event.pressed) {
// when keycode QMKURL is pressed
SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
} else {
// when keycode QMKURL is released
}
break;
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@@ -16,4 +16,4 @@
#pragma once
#include "../../config.h"
// place overrides here

View File

@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// place overrides here
#endif

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
enum planck_keycodes {
DUMMY = SAFE_RANGE,

View File

@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// place overrides here
#endif

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
#include "backlight.h"
// Fillers to make layering more clear

View File

@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include QMK_KEYBOARD_CONFIG_H
#pragma once
// place overrides here
#endif

View File

@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// place overrides here
#endif

View File

@@ -1,5 +1,5 @@
#include "keymap_french.c"
#include "xd75.h"
#include QMK_KEYBOARD_H
// Layer shorthand

View File

@@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// place overrides here
@@ -118,4 +115,3 @@
// Launchy
#define ALT_SPC LALT(KC_SPC)
#endif

View File

@@ -1,6 +1,6 @@
/* Copyright 2017 Kolja Brauns
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
#ifndef KEYMAP_GERMAN
#define KEYMAP_GERMAN

View File

@@ -14,12 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include QMK_KEYBOARD_CONFIG_H
#pragma once
// place overrides here
#undef BACKLIGHT_BREATHING
#endif

View File

@@ -14,12 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include QMK_KEYBOARD_CONFIG_H
#pragma once
// place overrides here
#undef BACKLIGHT_BREATHING
#endif

View File

@@ -14,11 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// place overrides here
#endif

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
// Layer shorthand
#define _WO 0

View File

@@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include QMK_KEYBOARD_CONFIG_H
#pragma once
// place overrides here
@@ -30,5 +27,3 @@
#define MOUSEKEY_TIME_TO_MAX 0
#define MOUSEKEY_WHEEL_MAX_SPEED 1
#define MOUSEKEY_WHEEL_TIME_TO_MAX 0
#endif

View File

@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
#include "keymap_german.h"
#define ________ KC_TRNS

View File

@@ -14,10 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#pragma once
// place overrides here
#undef MANUFACTURER
@@ -25,5 +22,3 @@
#define MANUFACTURER mtdjr
#define PRODUCT XD75
#define DESCRIPTION XD75Re
#endif

View File

@@ -3,7 +3,7 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KC_KEYMAP(
[_QWERTY] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
EXC, 1 , 2 , 3 , 4 , 5 ,PGUP,MPNT,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
@@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
),
[_LOWER] = KC_KEYMAP(
[_LOWER] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
xxxx, F1 , F2 , F3 , F4 , F5 , F6 ,xxxx, F7 , F8 , F9 , F10, F11, F12, DEL,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|
@@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----'
),
[_RAISE] = KC_KEYMAP(
[_RAISE] = LAYOUT_kc(
// .--------------------------------------------------------------------------.
xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,
// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----|

View File

@@ -16,10 +16,9 @@
// additional config optoinsa vailable at https://docs.qmk.fm/reference/config-options#the-config.h-file
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#pragma once
#include "../../config.h"
// place overrides here
// place overrides here
//#define TAPPING_TERM 200
@@ -33,5 +32,3 @@
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
#endif

View File

@@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd75.h"
#include QMK_KEYBOARD_H
enum xd75_layers {
_QWERTY,

View File

@@ -1,32 +1,25 @@
xd75 keyboard firmware
======================
# XD75
![XD75](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1MzOISXXXXXXgXpXXq6xXFXXXO_1024x1024.jpg)
The XD75Re is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request!
## Quantum MK Firmware
Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
Hardware Supported: XD75Re
Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd75re-xd75am-xd75-xiudi-60-custom-keyboard-pcb), [AliExpress](https://www.aliexpress.com/item/xd75re-Custom-Mechanical-Keyboard-75-keys-TKG-TOOLS-Underglow-RGB-PCB-GH60-60-programmed-gh60-kle/32818745981.html)
For more info on this firmware (and how to make it your own), head over to [qmk.fm](http://qmk.fm).
Make example for this keyboard (after setting up your build environment):
## Building
make xd75:default
Download or clone the whole firmware and navigate to the
keyboards/xd75 folder. Once your dev env is setup, you'll be able to
type `make` to generate your .hex - you can then use the Teensy Loader
to install the resulting .hex file, or have the `make` process install
it using DFU.
Flashing example:
### Default
make xd75:default:dfu
To build with the default keymap, simply run `make xd75:default` from the root directory (i.e. two levels above this file), and to install via DFU, `make xd75:default:dfu`, also from the root directory.
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).
Note that DFU is likely to require root permissions, so installing the
firmware likely requires a command line like:
```
$ sudo make xd75:default:dfu
```
### LED control
## LED control
There are 3 individual LEDs that can be turned on and off, plus the keycap LEDs (which are all wired into the same pin). The functions are named according to how they're labeled on the PCB.
@@ -65,23 +58,3 @@ GP103_LED F4
KEYCAPS_LED F5
GP100_LED F7
```
### Other Keymaps
The "default" keymap included is basically the OLKB Atomic keymap with
a few buttons added for RGB underglow control. This should be usable
as a starting point, but most people will be best served creating
their own keymap and flashing it - more info on creating your own
keymap is available in [the official QMK
documentation](https://docs.qmk.fm).
Keymaps follow the format **__\<name\>.c__** and are stored in
subdirectories under `keyboards/xd75/keymaps`
To build the firmware binary hex file for a specific keymap, and
install it, using DFU, just do `make` with a keymap like this:
```
$ make xd75:[default|<name>]
```

View File

@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef XD75_H
#define XD75_H
#pragma once
#include "quantum.h"
@@ -22,7 +21,7 @@
// The following is an example using the Planck MIT layout
// The first section contains all of the arguments
// The second converts the arguments into a two-dimensional array
#define KEYMAP( \
#define LAYOUT( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\
@@ -36,7 +35,7 @@
{ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \
}
#define KC_KEYMAP( \
#define LAYOUT_kc( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E,\
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E,\
@@ -50,7 +49,7 @@
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \
}
#define LAYOUT_ortho_5x15 KEYMAP
#define LAYOUT_ortho_5x15 LAYOUT
void capslock_led_init(void);
void capslock_led_off(void);
@@ -67,5 +66,3 @@ void gp103_led_on(void);
void keycaps_led_init(void);
void keycaps_led_off(void);
void keycaps_led_on(void);
#endif

View File

@@ -0,0 +1,87 @@
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
// this is the style you want to emulate.
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _GAME 3
#define _ADJUST 4
#define LOWER MO(_LOWER)
#define RAISE MO(_RAISE)
#define GAME TG(_GAME)
/* Funct
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | F7 | F8 | F9 | F10 | F11 | F12 | ' | | | | |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | | | | | | | | | home | vol- | vol+ | end |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
*/
#define _FUNCT LAYOUT_ortho_4x12 (\
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,\
_______, 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_QUOT, _______, _______, _______, _______,\
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_VOLD, KC_VOLU, KC_END\
)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | esc | Q | W | E | R | T | Y | U | I | O | P | bksp |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | tab | A | S | D | F | G | H | J | K | L | ; | del |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | lshift | Z | X | C | V | B | N | M | , | . | / | enter |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
* | lctrl | lgui | lalt | ralt | funct | space | space | funct | left | down | up | right |
* +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
*/
[_QWERTY] = 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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_RALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
),
[_LOWER] = _FUNCT,
[_RAISE] = _FUNCT,
/* Game */
[_GAME] = LAYOUT_ortho_4x12 (
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______,
_______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT
),
/* Adjust */
[_ADJUST] = LAYOUT_ortho_4x12 (
_______, RESET, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
_______, _______, _______, _______, _______, GAME, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
};
uint32_t layer_state_set_user(uint32_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
}
void matrix_init_user(void) {
}

View File

@@ -0,0 +1,8 @@
# Jotix2 ortho 4x12 keymap
![keymap](https://i.imgur.com/WMfIpH3.jpg)
Tested on:
* Planck/rev4
* Jotanck

View File

@@ -576,4 +576,56 @@
Q__NOTE(_D4), Q__NOTE(_F4), Q__NOTE(_G4), Q__NOTE(_BF3), Q__NOTE(_BF3), H__NOTE(_D5), \
HD_NOTE(_A4), H__NOTE(_AF4), H__NOTE(_G4), H__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_F4), \
Q__NOTE(_G4),
#define MICHISHIRUBE \
W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), BD_NOTE(_CS6), W__NOTE(_E6), \
W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), \
W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), W__NOTE(_GS6), H__NOTE(_CS6), \
Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_A5), \
Q__NOTE(_B5), BD_NOTE(_A5), \
H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), \
W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), \
B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), \
H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), B__NOTE(_E6), H__NOTE(_E6), \
H__NOTE(_FS6), H__NOTE(_E6), H__NOTE(_B6), W__NOTE(_A6), H__NOTE(_E6), H__NOTE(_B6), \
W__NOTE(_A6), H__NOTE(_A6), H__NOTE(_B6), H__NOTE(_CS7), B__NOTE(_CS7), H__NOTE(_E6), H__NOTE(_E6), \
H__NOTE(_E6), H__NOTE(_E6), H__NOTE(_D6), H__NOTE(_D6), H__NOTE(_CS6), H__NOTE(_CS6), Q__NOTE(_B5), \
BD_NOTE(_B5), W__NOTE(_A5), H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), \
BD_NOTE(_CS6), W__NOTE(_E6), W__NOTE(_CS6), WD_NOTE(_B5), H__NOTE(_A5), BD_NOTE(_A5), W__NOTE(_A5), \
H__NOTE(_A5), H__NOTE(_A5), W__NOTE(_B5), H__NOTE(_A5), H__NOTE(_B5), W__NOTE(_A5), W__NOTE(_A6), \
W__NOTE(_GS6), H__NOTE(_CS6), Q__NOTE(_E6), Q__NOTE(_CS6), W__NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), \
W__NOTE(_B5), H__NOTE(_A5), Q__NOTE(_B5), BD_NOTE(_A5),
#define LIEBESLEID \
Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_E4), Q__NOTE(_FS4), Q__NOTE(_EF4), Q__NOTE(_G4), Q__NOTE(_D4), \
Q__NOTE(_GS4), Q__NOTE(_CS4), W__NOTE(_A4), H__NOTE(_E5), H__NOTE(_E5), HD_NOTE(_G4), Q__NOTE(_E5), E__NOTE(_E5), \
E__NOTE(_F5), ED_NOTE(_E5), HD_NOTE(_D5), Q__NOTE(_E5), H__NOTE(_F5), H__NOTE(_CS5), H__NOTE(_C5), W__NOTE(_G4), \
H__NOTE(_D5), H__NOTE(_D5), HD_NOTE(_D5), Q__NOTE(_D5), E__NOTE(_D5), E__NOTE(_E5), E__NOTE(_D5), HD_NOTE(_C5), \
Q__NOTE(_D5), H__NOTE(_E5), H__NOTE(_B4), H__NOTE(_BF4), W__NOTE(_F4), H__NOTE(_C5), H__NOTE(_C5), HD_NOTE(_EF4), \
Q__NOTE(_C5), E__NOTE(_C5), E__NOTE(_D5), E__NOTE(_C5), HD_NOTE(_BF4), Q__NOTE(_C5), H__NOTE(_D5), H__NOTE(_FS4), \
H__NOTE(_F4), HD_NOTE(_E4), Q__NOTE(_A4), HD_NOTE(_FS4), Q__NOTE(_A4), HD_NOTE(_GS4), Q__NOTE(_B4), Q__NOTE(_A4), \
Q__NOTE(_E4), Q__NOTE(_DS4), Q__NOTE(_E4), Q__NOTE(_F4), Q__NOTE(_D4), Q__NOTE(_FS4), Q__NOTE(_CS4), Q__NOTE(_G4), \
Q__NOTE(_C4), Q__NOTE(_GS4), Q__NOTE(_D4), WD_NOTE(_A4),
#define MELODIES_OF_LIFE \
H__NOTE(_B5), W__NOTE(_GS6), H__NOTE(_GS6), H__NOTE(_FS6), W__NOTE(_E6), H__NOTE(_E6), H__NOTE(_DS6), H__NOTE(_CS6), H__NOTE(_DS6), \
H__NOTE(_E6), H__NOTE(_FS6), WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_CS6), H__NOTE(_DS6), H__NOTE(_E6), H__NOTE(_CS6), \
H__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_E6), H__NOTE(_GS6), H__NOTE(_A6), H__NOTE(_GS6), H__NOTE(_E6), H__NOTE(_GS6), \
WD_NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_B6), H__NOTE(_CS7), H__NOTE(_B6), H__NOTE(_A6), H__NOTE(_A6), H__NOTE(_GS6), \
H__NOTE(_GS6), H__NOTE(_FS6), H__NOTE(_FS6), H__NOTE(_GS6), WD_NOTE(_A6), Q__NOTE(_GS6), Q__NOTE(_FS6), Q__NOTE(_FS6), \
Q__NOTE(_E6), W__NOTE(_E6), Q__NOTE(_B5), Q__NOTE(_CS6), WD_NOTE(_E6), Q__NOTE(_E6), Q__NOTE(_FS6), W__NOTE(_GS6), \
H__NOTE(_A6), B__NOTE(_FS6),
#define EYES_ON_ME \
Q__NOTE(_A6), Q__NOTE(_G6), Q__NOTE(_FS6), Q__NOTE(_D6), Q__NOTE(_A5), Q__NOTE(_G5), Q__NOTE(_FS5), Q__NOTE(_D5), \
W__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_A5), M__NOTE(_FS5, 256), H__NOTE(_E5), \
H__NOTE(_FS5), B__NOTE(_D5), H__NOTE(_B4), H__NOTE(_D5), BD_NOTE(_E5), H__NOTE(_A4), W__NOTE(_D5), W__NOTE(_E5), \
W__NOTE(_FS5), H__NOTE(_A5), BD_NOTE(_CS6), W__NOTE(_A5), H__NOTE(_CS6), H__NOTE(_D6), WD_NOTE(_B5), \
H__NOTE(_A5), H__NOTE(_B5), B__NOTE(_A5), WD_NOTE(_B4), W__NOTE(_CS5), WD_NOTE(_D6), H__NOTE(_D6), \
W__NOTE(_CS6), H__NOTE(_B5), H__NOTE(_B5), H__NOTE(_B5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_FS5), H__NOTE(_A5), \
WD_NOTE(_B5), H__NOTE(_B5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), W__NOTE(_FS5), WD_NOTE(_E5), \
H__NOTE(_CS4), H__NOTE(_E4), H__NOTE(_A4), H__NOTE(_CS5), W__NOTE(_D5), W__NOTE(_E5), W__NOTE(_FS5), H__NOTE(_G5), \
H__NOTE(_A5), B__NOTE(_A5), H__NOTE(_A5), H__NOTE(_G5), H__NOTE(_D5), BD_NOTE(_FS5), W__NOTE(_E5), B__NOTE(_D5), \
H__NOTE(_G4), H__NOTE(_FS4), W__NOTE(_E4), BD_NOTE(_D4),
#endif

View File

@@ -118,6 +118,9 @@ void unicode_input_finish(void) {
case UC_WIN:
unregister_code(KC_LALT);
break;
case UC_WINC:
tap_code(KC_ENTER);
break;
}
set_mods(saved_mods); // Reregister previously set mods