Compare commits

...

23 Commits

Author SHA1 Message Date
MakotoKurauchi
3313473004 Usb max power (#2502)
* add some comment about Helix customize and auto-setup RGBLIGHT_LIMIT_VAL

* add define USB_MAX_POWER_CONSUMPTION
2018-03-09 13:15:37 -05:00
Drashna Jael're
3f1d147529 Add SS_RALT for AltGR usage in macros 2018-03-09 13:15:10 -05:00
edwardbrowncross
eba4b08a4a Add the OK60 keyboard (#2488)
* Add the OK60 keyboard

* Fix ok60 incorrect ANSI keymap signature
Add support for default ansi and iso 60 keymaps
2018-03-09 13:14:50 -05:00
Oscillope
7d9dc61504 Fixes for JJ40 and Oscillope keymap (#2496)
* Add navigation layer for hjkl arrow keys

* Fix Oscillope keymap after jj40.h changes. Also fix jj40.c so that it can build without rgblight if you don't want that enabled.
2018-03-08 21:31:08 -05:00
skullydazed
566399794a Disable the glossary linking to fix #2498 (#2499) 2018-03-08 10:31:08 -08:00
That-Canadian
2bdf1731c3 Canadian planck (#2463)
* Line ending stuff again

* Added my personal Planck layout (finally)
2018-03-08 10:31:27 -05:00
MakotoKurauchi
955b17189a Move rows config to keymap (#2464)
* Fork from Let's Split

* Organizing files

* Delete some keymaps

* I2C and serial enabled at the same time

* Change readme

* add #define HELIX_ROWS for multiple rows

* Delete avrdude flashing script

* Delete makefiles

* Subproject elimination

* Fix lufa path

* Remove PLAY_NOTE_ARRAY usages to get rid of warning.

Fix conflicting function name

* Mousekey change default to off

* Fix to oled display adjust

* make rev2

change pin assign
change keymap

* use master_buffer

* Timing adjustment

* Organizing files

* Change Keymap

* Change Keymap

Add EISU and KANA
Correct 4rows

* NKRO default to disable

* EXTRAKEY_ENABLE default to disable

* add rgb reset key

* rgb custom function enable

*  Extend font

* add RGBLED_POWER

default folder to helix/rev2
RGB_ENABLE to no

* renamed directory

* Disable RGBLIGHT_CUSTOM_DRIVER

* Disable LOCKING_SUPPORT_ENABLE

* Update bootloader setting

* Change readme

* Fixed argument error

* Move rows config to keymap
2018-03-07 17:34:42 -05:00
crazyiop
3d7e9425c7 quantum: keympa_extra: add sendstring_bepo.h 2018-03-07 17:09:41 -05:00
crazyiop
483e3cd1cb quantum: keymap_bepo.h: fix typo in BP_COMMMA 2018-03-07 17:09:41 -05:00
Lukas Klingsbo
821b492667 Swedish layout for iris 2018-03-07 17:07:05 -05:00
Cole Markham
bd1ad405bf Update Meira for revision 1.1 to enable backlighting by default (#2468)
* Update Meira for revision 1.1 to enable backlighting by default

* Updates to fix other keymaps
2018-03-07 17:06:41 -05:00
Maarten Dekkers
03df19d3f6 Fixed keymap, added capslock led for maartenwut's kbd66 keymap (#2473)
* Fixed keymap, added capslock led

* Removed macro
2018-03-07 17:06:04 -05:00
U-LANDSRAAD\drashna
42e85d2b92 Add layer_state_set_* to custom function lists 2018-03-07 17:05:38 -05:00
U-LANDSRAAD\drashna
d27d854913 Examples should all use _user functions for consistency 2018-03-07 17:05:38 -05:00
Sebastian Kaim
bec8d58ad8 Fixed compilation of the ps2avrGB keyboard/firmware (resolving #2425) (#2478)
* Fixed compilation of the ps2avrGB keyboard/firmware

This commit fixes the silent compilation error for the ps2avrGB
keyboard/firmware. This error was caused by a lacking default
keymap which it did not have because all keyboards based on it were
moved to another directory. I also added the required config.h
options so it's possible to compile it again and (probably)
flash it on a b.mini.

Lastly, I updated the README to reflect the current state.

This commit fixes #2425

* Referenced the pearl in the ps2avrGB REAMDE

Added a reference to the pearl keyboard in the README of the ps2avrGB keyboard as it is originally based on the firmware as well.
2018-03-07 17:05:02 -05:00
Blake Newman
6c473c5f38 layout(preonic): blake-newman's layout (#2483)
* layout(preonic): blake-newman's layout

- Add keymap
  - Add Number Pad layout
  - Reconfigure other layouts to my opinionated style
- Add `readme.md` with layout information

* layout(preonic): blake-newman's layout

- Move enter to `raise + space` / `lower + space`
- Replace `enter` to `right shift`
- Explicitly map modifier keys
2018-03-07 17:00:44 -05:00
Campbell Barton
aadb386de6 qwerty_code_friendly: various updates
- Remove action_get_macro in favor of process_record_user
- Support user defined words on layer 3 (pass via flags)
- Support backspace & del on left thumb cluster.
  (optionally override top right backspace).
2018-03-07 17:00:21 -05:00
Corey T Kump
b688c2c0b3 Corvec's Planck layout 2018-03-07 16:58:51 -05:00
Joe Wasson
7b80aea8b2 Add back docs for hand-swapping feature. 2018-03-07 16:56:57 -05:00
Kenny Hung
586aa15cef A small tidy up (#2490)
* Add extra RGUI key to make keyboard more MAC friendly

* Remove enumerators for no longer used layers in layout Skewwhiffy for XD75

* Make layer numbers even better
2018-03-07 16:56:31 -05:00
skullY
48e11240a6 Move the linux tutorials to an info box on newbs_getting_started 2018-03-06 20:51:26 -08:00
skullY
75354f12d7 warn->danger 2018-03-06 15:39:46 -08:00
skullY
6a4e08938e Flesh out the newbs guide 2018-03-06 15:22:47 -08:00
57 changed files with 2360 additions and 381 deletions

View File

@@ -45,6 +45,7 @@
* [RGB Lighting](feature_rgblight.md)
* [Space Cadet](feature_space_cadet.md)
* [Stenography](feature_stenography.md)
* [Swap Hands](feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md)
* [Terminal](feature_terminal.md)
* [Thermal Printer](feature_thermal_printer.md)
@@ -72,7 +73,7 @@
* [Customizing Functionality](custom_quantum_functions.md)
* [Documentation Best Practices](documentation_best_practices.md)
* [Documentation Templates](documentation_templates.md)
* [Glossary](glossary.md)
* [Glossary](reference_glossary.md)
* [Keymap Overview](keymap.md)
* [Unit Testing](unit_testing.md)

View File

@@ -98,10 +98,10 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec.
* `USB_LED_COMPOSE`
* `USB_LED_KANA`
### Example `led_set_kb()` Implementation
### Example `led_set_user()` Implementation
```
void led_set_kb(uint8_t usb_led) {
void led_set_user(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
PORTB |= (1<<0);
} else {
@@ -139,14 +139,13 @@ void led_set_kb(uint8_t usb_led) {
Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LED's or i&#xb2;c controllers you will need to set up that hardware before it can be used.
### Example `matrix_init_kb()` Implementation
### Example `matrix_init_user()` Implementation
This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
```
void matrix_init_kb(void) {
void matrix_init_user(void) {
// Call the keymap level matrix init.
matrix_init_user();
// Set our LED pins as output
DDRB |= (1<<1);
@@ -176,3 +175,41 @@ This example has been deliberately omitted. You should understand enough about Q
This function gets called at every matrix scan, which is basically as often as the MCU can handle. Be careful what you put here, as it will get run a lot.
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LED's or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
# Layer Change Code
Thir runs code every time that the layers get changed. This can be useful for layer indication, or custom layer handling.
### Example `layer_state_set_*` Implementation
This example shows how to set the [RGB Underglow](feature_rgblight.md) lights based on the layer, using the Planck as an example
```
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case _RAISE:
rgblight_setrgb (0x00, 0x00, 0xFF);
break;
case _LOWER:
rgblight_setrgb (0xFF, 0x00, 0x00);
break;
case _PLOVER:
rgblight_setrgb (0x00, 0xFF, 0x00);
break;
case _ADJUST:
rgblight_setrgb (0x7A, 0x00, 0xFF);
break;
default: // for any other layers, or the default layer
rgblight_setrgb (0x00, 0xFF, 0xFF);
break;
}
return state;
}
```
### `matrix_init_*` Function Documentation
* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)`
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)

View File

@@ -97,6 +97,7 @@ There's also a couple of mod shortcuts you can use:
* `SS_LGUI(string)`
* `SS_LALT(string)`
* `SS_LSFT(string)`
* `SS_RALT(string)`
These press the respective modifier, send the supplied string and then release the modifier.
They can be used like this:

View File

@@ -0,0 +1,31 @@
# Swap-Hands Action
The swap-hands action allows support for one-handed typing without requiring a separate layer. Set `ONEHAND_ENABLE` in the Makefile and define a `hand_swap_config` entry in your keymap. Now whenever the `ACTION_SWAP_HANDS` command key is pressed the keyboard is mirrored. For instance, to type "Hello, World" on QWERTY you would type `^Ge^s^s^w^c W^wr^sd`
## Configuration
The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck:
```C
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}},
{{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}},
{{11, 2}, {10, 2}, {9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}},
{{11, 3}, {10, 3}, {9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}},
};
```
Note that the array indices are reversed same as the matrix and the values are of type `keypos_t` which is `{col, row}` and all values are zero-based. In the example above, `hand_swap_config[2][4]` (third row, fifth column) would return `{7, 2}` (third row, eighth column). Yes, this is confusing.
## Advanced Swap Commands
|Macro | Description |
|------|-------------|
| `ACTION_SWAP_HANDS()` | Swaps hands when pressed, returns to normal when released (momentary). |
| `ACTION_SWAP_HANDS_TOGGLE()` | Toggles swap on and off with every key press. |
| `ACTION_SWAP_HANDS_TAP_TOGGLE()` | Toggles with a tap; momentary when held. |
| `ACTION_SWAP_HANDS_TAP_KEY(key)`| Sends `key` with a tap; momentary swap when held. |
| `ACTION_SWAP_HANDS_ON_OFF()` | Alias for `ACTION_SWAP_HANDS()` |
| `ACTION_SWAP_HANDS_OFF_ON()` | Momentarily turns off swap. |
| `ACTION_SWAP_HANDS_ON()` | Turns on swapping and leaves it on. |
| `ACTION_SWAP_HANDS_OFF()` | Turn off swapping and leaves it off. Good for returning to a known state. |

View File

@@ -4,11 +4,6 @@ QMK is a powerful Open Source firmware for your mechanical keyboard. You can use
Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](http://qmk.fm/keyboards/), so even if your current keyboard can't run QMK you shouldn't have trouble finding one to suit your needs.
We assume you are familiar with the basics of working in a Linux/Unix command line environment. If you are not these resources will teach you enough to work with QMK:
* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
## Overview
There are 4 main sections to this guide:

View File

@@ -9,7 +9,7 @@ If you have closed and reopened your terminal window since following the first p
Start by navigating to the `keymaps` folder for your keyboard.
{% hint style='info' %}
If you are on macOS or Windows there are commands you can use to easily open the `keymaps` folder.
If you are on macOS or Windows there are commands you can use to easily open the keymaps folder.
macOS:
@@ -22,17 +22,17 @@ Windows:
## Create a Copy Of The `default` Keymap
Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your github username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character.
Once you have the `keymaps` folder open you will want to create a copy of the `default` folder. We highly recommend you name your folder the same as your GitHub username, but you can use any name you want as long as it contains only lower case letters, numbers, and the underscore character.
## Open `keymap.c` In Your Favorite Text Editor
Inside the `keymap.c` file you'll find the structure that controls how your keyboard behaves. At the top there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
Open up your `keymap.c`. Inside this file you'll find the structure that controls how your keyboard behaves. At the top of `keymap.c` there may be some defines and enums that make the keymap easier to read. Farther down you'll find a line that looks like this:
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
This line indicates the start of the list of Layers. Below that you'll find lines containing either `LAYOUT` or `KEYMAP`, and these lines indicate the start of a layer. Below that line is the list of keys that comprise a that particular layer.
{% hint style='warning' %}
{% hint style='danger' %}
When editing your keymap file be careful not to add or remove any commas. If you do you will prevent your firmware from compiling and it may not be easy to figure out where the extra, or missing, comma is.
{% endhint %}
@@ -47,3 +47,27 @@ How to complete this step is entirely up to you. Make the one change that's been
{% hint style='info' %}
While you get a feel for how keymaps work, keep each change small. Bigger changes make it harder to debug any problems that arise.
{% endhint %}
## Build Your Firmware
When your changes to the keymap are complete you will need to build the firmware. To do so go back to your terminal window and run the build command:
make <my_keyboard>:<my_keymap>
For example, if your keymap is named "xyverz" and you're building a keymap for a rev5 planck, you'll use this command:
make planck/rev5:xyverz
While this compiles you will have a lot of output going to the screen informing you of what files are being compiled. It should end with output that looks similar to this:
```
Linking: .build/planck_rev5_xyverz.elf [OK]
Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
Checking file size of planck_rev5_xyverz.hex [OK]
* File size is fine - 18392/28672
```
## Flash Your Firmware
Move on to [Flashing Firmware](newbs_flashing.md) to learn how to write your new firmware to your keyboard.

View File

@@ -6,9 +6,19 @@ QMK tries to put a lot of power into your hands by making easy things easy, and
# Getting Started
Before you can build keymaps you need to setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for.
Before you can build keymaps you need to install some software and setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for.
## Download QMK Toolbox
## Download Software
### Text Editor
You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS you can not use TextEdit.app, it will not save plain text files. You will need to install another program such as Sublime Text.
{% hint style='info' %}
Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject.
{% endhint %}
### QMK Toolbox
QMK Toolbox is a Windows and macOS program that allows you to both program and debug your custom keyboard. You will want to install it so that you can easily flash your keyboard and receive the debugging messages that your keyboard will print.
@@ -19,6 +29,13 @@ QMK Toolbox is a Windows and macOS program that allows you to both program and d
We've tried to make QMK as easy to setup as possible. You only have to prepare your Linux or Unix environment and let QMK install the rest.
{% hint style="info" %}
If you haven't worked with the Linux/Unix command line before there are a few basic concepts and commands you should learn. These resources will teach you enough to work with QMK:
* [Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)
* [Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
{% endhint %}
### Windows
You will need to install msys2 and git.
@@ -43,8 +60,8 @@ You will need to install git. It's extremely likely you already have it, but if
Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands:
* `git clone https://github.com/qmk/qmk_firmware.git`
* `cd qmk_firmware`
git clone https://github.com/qmk/qmk_firmware.git
cd qmk_firmware
{% hint style='info' %}
If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message.
@@ -52,19 +69,19 @@ If you already know [how to use GitHub](getting_started_github.md) we recommend
## Setup QMK
QMK comes with a script to help you setup the rest of what you'll need. You should run it now:
QMK comes with a script to help you setup the rest of what you'll need. You should run it now by typing in this command:
* `./util/qmk_install.sh`
./util/qmk_install.sh
## Test Your Build Environment
Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format:
* `make <keyboard>:default`
make <keyboard>:default
For example, to build a firmware for a Clueboard 66% use:
* `make clueboard/66:default`
make clueboard/66/rev3:default
When it is done you should have a lot of output that ends similar to this:
@@ -75,3 +92,7 @@ Copying clueboard_66_rev2_default.hex to qmk_firmware folder
Checking file size of clueboard_66_rev2_default.hex [OK]
* File size is fine - 25174/28672
```
## Creating Your Layout
Now you are ready to create your own personal layout. Move on to [Building Your First Firmware](newbs_building_firmware.md) for that.

View File

@@ -17,8 +17,8 @@
"to": "feature_advanced_keycodes.html"
},
{
"from": "flashing.html",
"to": "newbs_flashing.html"
"from": "glossary.html",
"to": "reference_glossary.html"
},
{
"from": "key_lock.html",

View File

@@ -29,21 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT Helix Beta
#define DESCRIPTION A split keyboard for the cheap makers
#define HELIX_ROWS 5
/* key matrix size */
// Rows are doubled-up
#if HELIX_ROWS == 4
#define MATRIX_ROWS 8
#define MATRIX_COLS 7
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
#elif HELIX_ROWS == 5
#define MATRIX_ROWS 10
#define MATRIX_COLS 7
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
#else
#error "expected HELIX_ROWS 4 or 5"
#endif
// wiring of each half
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }

View File

@@ -35,8 +35,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define MASTER_RIGHT
// #define EE_HANDS
// Helix keyboard OLED support
//#define SSD1306OLED
/* Select rows configuration */
// Rows are 4 or 5
#define HELIX_ROWS 5
/* key matrix size */
// Rows are doubled-up
#if HELIX_ROWS == 4
#define MATRIX_ROWS 8
#define MATRIX_COLS 7
#define MATRIX_ROW_PINS { D4, C6, D7, E6 }
#elif HELIX_ROWS == 5
#define MATRIX_ROWS 10
#define MATRIX_COLS 7
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 }
#else
#error "expected HELIX_ROWS 4 or 5"
#endif
#define USE_SERIAL_PD2
#define PREVENT_STUCK_MODIFIERS
@@ -46,9 +65,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
// Helix keyboard : see ./rules.mk: RGBLIGHT_ENABLE = yes or no
// Helix keyboard : RGBLED_NUM 6 or 32
#define RGBLED_NUM 6
#define RGBLIGHT_LIMIT_VAL 255
#if RGBLED_NUM <= 6
#define RGBLIGHT_LIMIT_VAL 255
#else
#if HELIX_ROWS == 5
#define RGBLIGHT_LIMIT_VAL 120
#else
#define RGBLIGHT_LIMIT_VAL 130
#endif
#endif
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
#endif
#ifdef RGBLIGHT_ENABLE
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
// 120 RGBoff, OLEDoff
// 120 OLED
// 330 RGB 6
// 300 RGB 32
// 310 OLED & RGB 32
#define USB_MAX_POWER_CONSUMPTION 330
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif

View File

@@ -14,6 +14,8 @@ 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
# Helix keyboard : see ./config.h: RGBLED_NUM 6 or 32
# Helix keyboard : RGBLIGHT_ENABLE = no or yes
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
ONEHAND_ENABLE = no # Enable one-hand typing

View File

@@ -0,0 +1,41 @@
/*
Copyright 2017 Danny Nguyen <danny@keeb.io>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "config_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
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

View File

@@ -0,0 +1,110 @@
#include "iris.h"
#include "keymap_swedish.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _EMPTY 16
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE
};
#define KC_ KC_TRNS
#define _______ KC_TRNS
#define KC_LOWR LOWER
#define KC_RASE RAISE
#define KC_RST RESET
#define KC_AA NO_AA
#define KC_AE NO_AE
#define KC_OE NO_OSLH
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = KC_KEYMAP(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
TAB , Q , W , E , R , T , Y , U , I , O , P , AA ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
LSFT, A , S , D , F , G , H , J , K , L , OE , AE ,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
LCTL, Z , X , C , V , B ,DEL , BSPC, N , M ,COMM,DOT ,SLSH,MINS,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
LGUI,LOWR,SPC , ENT ,RASE,LALT
// `----+----+----' `----+----+----'
),
[_LOWER] = KEYMAP(
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
NO_TILD,KC_EXLM,NO_AT ,KC_HASH,NO_DLR ,KC_PERC, NO_CIRC,NO_AMPR,NO_ASTR,NO_SLSH,NO_LPRN,NO_RPRN,
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
NO_ACUT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,NO_PIPE,NO_LCBR,NO_RCBR,
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_BSLS, KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,NO_LBRC,NO_RBRC,
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_LESS,NO_GRTR,
//`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------'
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS
// `-------+-------+-------' `-------+-------+-------'
),
[_RAISE] = KEYMAP(
//,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------.
KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 ,
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
NO_GRV ,KC_7 ,KC_8 ,KC_9 ,NO_MINS,NO_ASTR, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,NO_PIPE,
//|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------|
KC_TRNS,KC_4 ,KC_5 ,KC_6 ,NO_PLUS,NO_SLSH, KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_TRNS,NO_BSLS,
//|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------|
KC_TRNS,KC_1 ,KC_2 ,KC_3 ,KC_0 ,NO_EQL ,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
// `-------+-------+-------' `-------+-------+-------'
)
};
void persistent_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
persistent_default_layer_set(1UL<<_QWERTY);
}
return false;
break;
case LOWER:
if (record->event.pressed) {
layer_on(_LOWER);
update_tri_layer(_LOWER, _RAISE, _EMPTY);
} else {
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _EMPTY);
}
return false;
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
update_tri_layer(_LOWER, _RAISE, _EMPTY);
} else {
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _EMPTY);
}
return false;
break;
}
return true;
}

View File

@@ -0,0 +1,6 @@
RGBLIGHT_ENABLE = yes
BACKLIGHT_ENABLE = yes
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

View File

@@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "backlight.h"
#include "backlight_custom.h"
extern rgblight_config_t rgblight_config;
// for keyboard subdirectory level init functions
// @Override
void matrix_init_kb(void) {
@@ -52,6 +50,9 @@ void backlight_set(uint8_t level) {
}
#endif
#ifdef RGBLIGHT_ENABLE
extern rgblight_config_t rgblight_config;
// custom RGB driver
void rgblight_set(void) {
if (!rgblight_config.enable) {
@@ -77,7 +78,9 @@ void matrix_scan_kb(void) {
}
rgblight_task();
#else
void matrix_scan_kb(void) {
#endif
matrix_scan_user();
/* Nothing else for now. */
}

View File

@@ -0,0 +1,9 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
#define PREVENT_STUCK_MODIFIERS
#define TAPPING_TERM 300
#endif

View File

@@ -18,9 +18,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "jj40.h"
#include "action_layer.h"
#ifdef KEYMAP
#undef KEYMAP
#endif
#define KEYMAP KEYMAP_OFFSET
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _NAV 3
#define NAV_TAP LT(_NAV, KC_SPC)
enum custom_keycodes {
QWERTY = SAFE_RANGE,
@@ -48,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_ENT, \
KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \
KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_LSFT, TT(_RAISE), KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_LSFT, TT(_RAISE), NAV_TAP, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
),
/* Lower
@@ -66,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
KC_PSCR, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
),
/* Raise
@@ -84,7 +92,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, KC_BSPC, KC_DEL, \
KC_TAB, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, _______, \
CC_ARRW, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, KC_PIPE, \
_______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
_______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
),
[_NAV] = KEYMAP( \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
)
};

View File

@@ -0,0 +1,14 @@
# build options
BOOTMAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = no
COMMAND_ENABLE = yes
BACKLIGHT_ENABLE = no
BACKLIGHT_CUSTOM_DRIVER = no
RGBLIGHT_ENABLE = no
RGBLIGHT_CUSTOM_DRIVER = no
KEY_LOCK_ENABLE = yes

View File

@@ -4,9 +4,6 @@
#define _GA 1
#define _FL 2
#define _AR 3
#define _LE 4
#define _LO 5
#define _UL 6
#define TRNS KC_TRNS
#define ______ KC_NO
@@ -14,56 +11,52 @@
#define LSHIFT OSM(MOD_LSFT)
#define SPACE LT(_AR, KC_SPC)
#define CAPS LT(_LE, KC_CAPS)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Main Layer
[_MA] = KEYMAP_ANSI(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_MPLY, KC_BSPC, KC_PSCR,
[_MA] = KEYMAP(
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, ______, KC_BSPC, KC_MPLY,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL,
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_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,
LSHIFT, TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, TRNS, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, SPACE, SPACE, KC_RALT, KC_RCTRL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT),
//Function Layer
[_FL] = KEYMAP_ANSI(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TRNS, RESET, KC_PGUP,
TRNS, KC_BTN1, KC_MS_U, KC_BTN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_PGDN,
TRNS, KC_MS_L, KC_MS_D, KC_MS_R, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, TRNS, KC_WH_U,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_WH_L, KC_WH_D, KC_WH_R),
[_FL] = KEYMAP(
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, TRNS, RESET, KC_PSCR,
TRNS, ______, ______, ______, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______,
TRNS, ______, ______, ______, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, KC_VOLD, KC_VOLU, KC_MUTE, TRNS, TRNS, KC_PGUP,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______, KC_PGDN, ______),
//Arrow keys layer (space bar)
[_AR] = KEYMAP_ANSI(
[_AR] = KEYMAP(
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, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, M(0), TRNS, TRNS, TRNS),
//LED control layer (caps)
[_LE] = KEYMAP_ANSI(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, BL_TOGG, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, BL_INC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, BL_DEC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
//Game layer (fn + g)
[_GA] = KEYMAP_ANSI(
[_GA] = KEYMAP(
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
KC_CAPS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
KC_LSFT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, KC_SPC, KC_SPC, TRNS, TRNS, MO(_FL), TRNS, TRNS, TRNS),
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch (id) {
case 0:
if (record->event.pressed) {
SEND_STRING("AdminF123!");
}
break;
void matrix_init_user() {
//Set led port to output
DDRB |= (1<<2);
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
// Turn capslock on
PORTB &= ~(1<<2);
} else {
// Turn capslock off
PORTB |= (1<<2);
}
return MACRO_NONE;
};
}

View File

@@ -37,7 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 10
#define BACKLIGHT_PWM_MAP {2, 4, 8, 16, 40, 55, 70, 128, 200, 255}
#define BACKLIGHT_BREATHING
#define RGB_DI_PIN D3
#define RGBLIGHT_TIMER

View File

@@ -1,4 +1,3 @@
BLUETOOTH_ENABLE = yes
BACKLIGHT_ENABLE = no
F_CPU = 8000000

View File

@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "meira.h"
#include "issi.h"
#include "lighting.h"
#ifdef RGBLIGHT_ENABLE
@@ -277,10 +276,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false;
break;
case BL_TOGG:
#ifdef ISSI_ENABLE
#ifdef BACKLIGHT_ENABLE
if (record->event.pressed) {
print("Enabling backlight\n");
issi_init();
backlight_init_ports();
}
#endif
return false;

View File

@@ -1,3 +1,5 @@
AUDIO_ENABLE = yes # Audio output on port C6
EXTRAFLAGS+=-flto # -4-7k
MOUSEKEY_ENABLE = no # Mouse keys(-47kb)
ISSI_ENABLE = no
BACKLIGHT_ENABLE = no

View File

@@ -49,6 +49,8 @@ void backlight_set(uint8_t level){
#endif
}
void set_backlight_by_keymap(uint8_t col, uint8_t row){
// dprintf("LED: %02X, %d %d %d\n", lookup_value, matrix, led_col, led_row);
// activateLED(matrix, led_col, led_row, 255);

View File

@@ -17,6 +17,7 @@
#define MEIRA_H
#include "quantum.h"
#include "issi.h"
void reset_keyboard_kb(void);
@@ -37,6 +38,22 @@ void reset_keyboard_kb(void);
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
#endif
// Used to create a keymap using only KC_ prefixed keys
#define KC_KEYMAP( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
) \
KEYMAP( \
KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
)
#define LAYOUT_ortho_4x12 KEYMAP
#define KC_LAYOUT_ortho_4x12 KC_KEYMAP
#endif

View File

@@ -1,2 +1 @@
BLUETOOTH_ENABLE = no
BACKLIGHT_ENABLE = no

View File

@@ -62,16 +62,15 @@ COMMAND_ENABLE = yes # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
#WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
BACKLIGHT_CUSTOM_DRIVER = yes
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
CUSTOM_MATRIX = yes

84
keyboards/ok60/config.h Normal file
View File

@@ -0,0 +1,84 @@
/*
Copyright 2018 Edward Browncross
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER OK60
#define PRODUCT OK60
#define DESCRIPTION qmk keyboard firmware for OK60
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 15
/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
#define MATRIX_ROW_PINS { B5, B4, D7, D6, D4 }
#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, B6, C6, C7, F1, F0, E6, B3, B2, B1, B0 }
#define UNUSED_PINS
#define BACKLIGHT_PIN B7
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
#define BACKLIGHT_LEVELS 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* prevent stuck modifiers */
#define PREVENT_STUCK_MODIFIERS
#define RGB_DI_PIN F6
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 10
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

View File

@@ -0,0 +1,18 @@
#include "ok60.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_ANSI(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL),
KEYMAP_ANSI(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL,
KC_TRNS, RGB_TOG, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, 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, 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),
};

View File

@@ -0,0 +1,29 @@
#include "ok60.h"
// An ISO UK keymap
#define _______ KC_TRNS
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP_ISO(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LGUI, KC_MENU, KC_LCTL),
KEYMAP_ISO(
KC_GRAVE, 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_PGUP, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP,
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_PSCR,
_______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU,
_______, _______, _______, _______, _______, MO(2), _______, _______),
KEYMAP_ISO(
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_F9, KC_F10, KC_F11, KC_F12, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______),
};

1
keyboards/ok60/ok60.c Normal file
View File

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

37
keyboards/ok60/ok60.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef OK60_H
#define OK60_H
#include "quantum.h"
#define KEYMAP_ANSI( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K401, K402, K406, K410, K411, K412, K413 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \
}
#define KEYMAP_ISO( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \
K400, K401, K402, K406, K410, K411, K412, K413 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \
}
#define LAYOUT_60_ansi KEYMAP_ANSI
#define LAYOUT_60_iso KEYMAP_ISO
#endif

12
keyboards/ok60/pinout.txt Normal file
View File

@@ -0,0 +1,12 @@
/* Column pin configuration
* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
* pin: D0 D1 D2 D3 D5 B6 C6 C7 F1 F0 E6 B3 B2 B1 B0
*/
/* Row pin configuration
* row: 0 1 2 3 4
* pin: B5 B4 D7 D6 D4
*/
B7 LED backlight
F6 WS2812 Strip

16
keyboards/ok60/readme.md Normal file
View File

@@ -0,0 +1,16 @@
# OK60
![OK60](https://i.imgur.com/X1rISXS.png)
A 60% keyboard PCB sold on AliExpress by Shenzhen YMD Tech Co.,Ltd.
It supports the same layouts and cases as the GH60 but comes with WS2812 RGB underglow.
Keyboard Maintainer: [Edward Browncross](https://github.com/edwardbrowncross)
Hardware Supported: OK60 PCB, OK60XRGB, Diamond 60 Keyboard
Hardware Availability: [AliExpress](https://www.aliexpress.com/store/product/Free-shipping-Pre-soldered-Diode-Resistance-Satan-GH60-PCB-Board-Programmable-DIY-Mechanical-Keyboard-Poker-2/429151_32809893696.html)
Make example for this keyboard (after setting up your build environment):
make ok60: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.

66
keyboards/ok60/rules.mk Normal file
View File

@@ -0,0 +1,66 @@
# MCU name
MCU = atmega32u4
# Processor frequency.
# This will define a symbol, F_CPU, in all source code files equal to the
# processor frequency in Hz. You can then use this symbol in your source code to
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
# automatically to create a 32-bit value in your source code.
#
# This will be an integer division of F_USB below, as it is sourced by
# F_USB after it has run through any CPU prescalers. Note that this value
# does not *change* the processor frequency - it should merely be updated to
# reflect the processor speed set externally so that the code can use accurate
# software delays.
F_CPU = 16000000
#
# LUFA specific
#
# Target architecture (see library "Board Types" documentation).
ARCH = AVR8
# Input clock frequency.
# This will define a symbol, F_USB, in all source code files equal to the
# input clock frequency (before any prescaling is performed) in Hz. This value may
# differ from F_CPU if prescaling is used on the latter, and is required as the
# raw input clock is fed directly to the PLL sections of the AVR for high speed
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
# at the end, this will be done automatically to create a 32-bit value in your
# source code.
#
# If no clock division is performed on the input clock inside the AVR (via the
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
# CONSOLE_ENABLE = yes # Console for debug(+400)
# COMMAND_ENABLE = yes # Commands for debug and configuration
KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable the RGB backlight
# MIDI_ENABLE = YES # MIDI controls
# UNICODE_ENABLE = YES # Unicode
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
LAYOUTS = 60_ansi 60_iso

View File

@@ -0,0 +1,53 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "config_common.h"
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PLANCK_SOUND)
// #define STARTUP_SONG SONG(NO_SOUND)
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
SONG(COLEMAK_SOUND), \
SONG(DVORAK_SOUND) \
}
#endif
#define MUSIC_MASK (keycode != KC_NO)
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2
#define PERMISSIVE_HOLD
// AutoShift config
#define AUTO_SHIFT_TIMEOUT 135
#define NO_AUTO_SHIFT_SPECIAL
// #define NO_AUTO_SHIFT_NUMERIC
// #define NO_AUTO_SHIFT_ALPHA
// TapDance config
#define TAPPING_TERM 150
#endif

View File

@@ -0,0 +1,207 @@
/* Copyright 2015-2018 Jack Humbert, Corey Kump
*
* 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 "planck.h"
#include "action_layer.h"
extern keymap_config_t keymap_config;
enum planck_layers {
_COLEMAK,
_QWERTY,
_LOWER,
_LEANDOWN,
_RAISE,
_WOBBLE,
_PLOVER,
_ADJUST
};
/* This include relies on the layer constants above and so must be declared after them */
#include "tapdance.c"
enum planck_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
LOWER,
RAISE,
BACKLIT
};
#define KC_ KC_TRNS
#define KC_____ KC_TRNS
#define KC_XXXX KC_NO
#define KC_LOWR LOWER
#define KC_RASE RAISE
/**
* Custom Corvec Bindings
*
* Previously used but currently unused bindings are commented out.
**/
// Activate the Wobble layer
#define KC_WOBL MO(_WOBBLE)
// Dual function with Raise
#define KC_RESC LT(_RAISE, KC_ESC)
// Dual functions with Lower
#define KC_LENT LT(_LOWER, KC_ENT)
#define KC_LQUT LT(_LEANDOWN, KC_QUOT)
// Dual functions with Shift
#define KC_SDEL MT(MOD_LSFT, KC_DEL)
#define KC_SAPP MT(MOD_LSFT, KC_APP)
/**
* Functions taking advantage of tap dance:
**/
// Tap once: quote. Hold: LEANDOWN layer. Tap twice: minus.
#define KC_TQTD TD(TD_QUOT_LEAN_MINS)
// Tap once: [. Hold: RALT. Tap twice: {
#define KC_TALT TD(TD_LBRC_RALT_LCBR)
// Tap once: ]. Hold: RGUI. Tap twice: }
#define KC_TGUI TD(TD_RBRC_RGUI_RCBR)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_COLEMAK] = KC_KEYMAP(
//-----+----+----+----+----+----+----+----+----+----+----+----
TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC,
//-----+----+----+----+----+----+----+----+----+----+----+----
RESC, A , R , S , T , D , H , N , E , I , O ,TQTD,
//-----+----+----+----+----+----+----+----+----+----+----+----
LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,RSFT,
//-----+----+----+----+----+----+----+----+----+----+----+----
LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,SDEL,TALT,TGUI,RCTL
),
[_QWERTY] = KC_KEYMAP(
//-----+----+----+----+----+----+----+----+----+----+----+----
TAB , Q , W , E , R , T , Y , U , I , O , P ,BSPC,
//-----+----+----+----+----+----+----+----+----+----+----+----
RESC, A , S , D , F , G , H , J , K , L ,SCLN,TQTD,
//-----+----+----+----+----+----+----+----+----+----+----+----
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,
//-----+----+----+----+----+----+----+----+----+----+----+----
LCTL,LGUI,WOBL,LALT,LENT, SPC, SPC,RASE,RALT,SAPP,RGUI,RCTL
),
[_LOWER] = KC_KEYMAP(
GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
____,LPRN,RPRN,LBRC,RBRC,XXXX,LEFT,DOWN, UP ,RGHT,XXXX,MINS,
____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,PGDN,PGUP,END ,BSLS,____,
____,____,____,____,____,____,____,____,____,____,____,____
),
[_LEANDOWN] = KC_KEYMAP(
GRV ,EXLM, AT ,HASH, DLR,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,____,
____,LPRN,RPRN,LBRC,RBRC,LCBR,LCBR,DLR ,PERC,CIRC,____,____,
____,BSLS,TILD,PIPE,EQL ,UNDS,HOME,EXLM, AT ,HASH,BSLS,____,
____,____,____,____,____,____,____,____,LEFT,DOWN, UP ,RGHT
),
[_RAISE] = KC_KEYMAP(
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,____,
____,LPRN,RPRN,LCBR,RCBR,XXXX,XXXX, 4 , 5 , 6 ,PPLS,MINS,
____,BSLS,TILD,PIPE,EQL ,UNDS,XXXX, 1 , 2 , 3 ,PAST,____,
____,____,____,____,____,____,____,____,____,____,____,____
),
[_WOBBLE] = KC_KEYMAP(
GRV , F1 , F2 , F3 , F4 , NO ,MUTE,VOLD,VOLU, NO , NO , DEL,
, F5 , F6 , F7 , F8 , NO ,MPRV,MPLY,MSTP,MNXT, NO ,BSLS,
, F9 , F10, F11, F12, NO , NO , NO , NO , INS,PSCR, ,
, , , , , , , , , , ,
),
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* |Colemk| | Debug|RGB Tg|RGB Md|RGB H+|RGB H-|RGB S+|RGB S-|RGB V+|RGB V-|Qwerty|
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk| |AS On | AS + |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf|AS Rep|AS Off| AS - |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | Reset|
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = {
{COLEMAK, _______, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, QWERTY },
{_______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, _______, KC_ASON, KC_ASUP},
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF,KC_ASRP, KC_ASOFF,KC_ASDN},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
}
};
#ifdef AUDIO_ENABLE
float plover_song[][2] = SONG(PLOVER_SOUND);
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
print("mode just switched to qwerty and this is a huge string\n");
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) {
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 BACKLIT:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
PORTE &= ~(1<<6);
} else {
unregister_code(KC_RSFT);
PORTE |= (1<<6);
}
return false;
break;
}
return true;
}

View File

@@ -0,0 +1,28 @@
# Corvec's Planck Layout
This layout is a development-focused layout with an emphasis on ergonomics. It is intended to be used in Colemak mode,
but has a full-QWERTY mode for gaming compatibility.
It utilizes redundancy for common keys so that they are more easily accessible in every task. For example, the common
layers, Raise and Lower, both can be activated with two different keys, each pressed with either hand. Certain symbols
( \~|+_ ) are on both layers, since the keys they take up are a bit out of the way. The minus symbol is available on the
quote key in a variety of ways - both layers, as well as via tap dance.
The right-hand Lower activation key activates a slightly different layer. The keys accessed by the opposite hand are the
same as the Lower layer, but the keys on the right hand differ. For this reason, we refer to this instead as the
Leandown layer.
Auto-shift is enabled, but there are also three shift keys, since typing with auto-shift is by necessity slow.
Movement is done Vim-style, on the hjkl / hnei keys, on the Lower layer so that it is easiest to activate it.
The arrow keys are mimicked by Home/PgDn/PgUp/End on the next row.
The arrow keys and broad navigation keys are replaced by a symbol-pad on the Leandown layer. However, in order to allow
single-hand navigation, the bottom right corner cluster becomes arrow keys.
Media keys are in the same location as the arrow keys, but are on the Wobble layer instead.
Toggle layers are minimized so that the state of the keyboard is more predictable. Shift Toggle is in the works, but
will not be included until it can be set to deactivate automatically.
Delete is accessible from the third Shift key.

View File

@@ -0,0 +1,5 @@
AUTO_SHIFT_ENABLE = yes
TAP_DANCE_ENABLE = yes
API_SYSEX_ENABLE = no
CONSOLE_ENABLE = no
EXTRAKEY_ENABLE = no

View File

@@ -0,0 +1,156 @@
/**
* Tap Dance config and functions
**/
/* Copyright 2018 Corey Kump
*
* 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/>.
*/
enum {
SINGLE_TAP = 1,
SINGLE_HOLD = 2,
DOUBLE_TAP = 3,
DOUBLE_SINGLE_TAP = 4,
UNKNOWN_TAPS = 5
};
typedef struct {
bool is_press_action;
int state;
} tap;
int cur_dance (qk_tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted || !state->pressed) {
return SINGLE_TAP;
} else {
return SINGLE_HOLD;
}
}
if (state->count == 2) {
if (state->interrupted) {
return DOUBLE_SINGLE_TAP;
} else if (!state->pressed) {
return DOUBLE_TAP;
}
}
return UNKNOWN_TAPS;
}
/**
* quote
**/
static tap quote_state = {
.is_press_action = true,
.state = 0
};
void quote_finished(qk_tap_dance_state_t *state, void *user_data) {
quote_state.state = cur_dance(state);
switch(quote_state.state) {
case SINGLE_TAP: register_code(KC_QUOT); break;
case SINGLE_HOLD: layer_on(_LEANDOWN); break;
case DOUBLE_TAP: register_code(KC_MINS); break;
case DOUBLE_SINGLE_TAP: register_code(KC_QUOT); unregister_code(KC_QUOT); register_code(KC_QUOT); break;
}
}
void quote_reset(qk_tap_dance_state_t *state, void *user_data) {
switch(quote_state.state) {
case SINGLE_TAP: unregister_code(KC_QUOT); break;
case SINGLE_HOLD: layer_off(_LEANDOWN); break;
case DOUBLE_TAP: unregister_code(KC_MINS); break;
case DOUBLE_SINGLE_TAP: unregister_code(KC_QUOT); break;
}
quote_state.state = 0;
}
/**
* ralt / left bracket / left curly brace
**/
static tap ralt_state = {
.is_press_action = true,
.state = 0
};
void ralt_finished(qk_tap_dance_state_t *state, void *user_data) {
ralt_state.state = cur_dance(state);
switch(ralt_state.state) {
case SINGLE_TAP: register_code(KC_LBRC); break;
case SINGLE_HOLD: register_code(KC_RALT); break;
case DOUBLE_TAP: register_code(KC_LSFT); register_code(KC_LBRC); break;
// fallback to alt because it's the primary purpose of this key
case DOUBLE_SINGLE_TAP: register_code(KC_RALT); break;
}
}
void ralt_reset(qk_tap_dance_state_t *state, void *user_data) {
switch(ralt_state.state) {
case SINGLE_TAP: unregister_code(KC_LBRC); break;
case SINGLE_HOLD: unregister_code(KC_RALT); break;
case DOUBLE_TAP: unregister_code(KC_LBRC); unregister_code(KC_LSFT); break;
case DOUBLE_SINGLE_TAP: unregister_code(KC_RALT); break;
}
ralt_state.state = 0;
}
/**
* rgui / right bracket / right curly brace
**/
static tap rgui_state = {
.is_press_action = true,
.state = 0
};
void rgui_finished(qk_tap_dance_state_t *state, void *user_data) {
rgui_state.state = cur_dance(state);
switch(rgui_state.state) {
case SINGLE_TAP: register_code(KC_RBRC); break;
case SINGLE_HOLD: register_code(KC_RGUI); break;
case DOUBLE_TAP: register_code(KC_LSFT); register_code(KC_RBRC); break;
// fallback to alt because it's the primary purpose of this key
case DOUBLE_SINGLE_TAP: register_code(KC_RGUI); break;
}
}
void rgui_reset(qk_tap_dance_state_t *state, void *user_data) {
switch(rgui_state.state) {
case SINGLE_TAP: unregister_code(KC_RBRC); break;
case SINGLE_HOLD: unregister_code(KC_RGUI); break;
case DOUBLE_TAP: unregister_code(KC_RBRC); unregister_code(KC_LSFT); break;
case DOUBLE_SINGLE_TAP: unregister_code(KC_RGUI); break;
}
rgui_state.state = 0;
}
/**
* Define the available tap dance keys
**/
enum {
TD_ALT_SHIFT = 0,
TD_LQUT_MINS,
TD_QUOT_LEAN_MINS,
TD_LBRC_RALT_LCBR,
TD_RBRC_RGUI_RCBR
};
qk_tap_dance_action_t tap_dance_actions[] = {
// Tap once for Alt, twice for Shift
[TD_ALT_SHIFT] = ACTION_TAP_DANCE_DOUBLE(KC_RALT, KC_RSFT),
[TD_QUOT_LEAN_MINS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, quote_finished, quote_reset),
[TD_LBRC_RALT_LCBR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ralt_finished, ralt_reset),
[TD_RBRC_RGUI_RCBR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, rgui_finished, rgui_reset)
};

View File

@@ -0,0 +1,217 @@
// 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 "planck.h"
#include "action_layer.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _QWERTY 0
#define _LOWER 2
#define _RAISE 3
#define _FUNCTION 15
#define _ADJUST 16
enum planck_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
// Defines for task manager and such
#define CALTDEL LCTL(LALT(KC_DEL))
#define TSKMGR LCTL(LSFT(KC_ESC))
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Func | A | S | D | F | G | H | J | K | L | ; | Enter|
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / | ' |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Ctrl | ` | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = {
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{MO(_FUNCTION), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
{OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT},
{KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
/* Lower
* ,-----------------------------------------------------------------------------------.
* | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | Mute | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = {
{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______},
{_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE},
{_______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
/* Raise
* ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | 4 | 5 | 6 | + | F5 | F6 | - | = | [ | ] |Enter |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* |Enter | 7 | 8 | 9 | - | F11 | F12 |ISO # |ISO / | Mute | | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | , | 0 | . |Lower | Bksp | Bksp |Raise | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = {
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL},
{_______, KC_4, KC_5, KC_6, KC_PLUS, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______},
{KC_ENT, KC_7, KC_8, KC_9, KC_MINS, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS},
{_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* |Taskmg| | | | | | | | | | |caltde|
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | RESET|
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = {
{TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL},
{_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______},
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}
},
/* Function
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | | Up | | | |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | | | | | | | Left | Down |Right | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Caps | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_FUNCTION] = {
{_______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______},
{KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
}
};
#ifdef AUDIO_ENABLE
float tone_startup[][2] = SONG(STARTUP_SOUND);
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
float tone_dvorak[][2] = SONG(DVORAK_SOUND);
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
#endif
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case QWERTY:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
#endif
persistant_default_layer_set(1UL<<_QWERTY);
}
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;
}
return true;
}
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
startup_user();
#endif
}
#ifdef AUDIO_ENABLE
void startup_user()
{
_delay_ms(20); // gets rid of tick
PLAY_NOTE_ARRAY(tone_startup, false, 0);
}
void shutdown_user()
{
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
_delay_ms(150);
stop_all_notes();
}
void music_on_user(void)
{
music_scale_user();
}
void music_scale_user(void)
{
PLAY_NOTE_ARRAY(music_scale, false, 0);
}
#endif

View File

@@ -0,0 +1,2 @@
# That-Canadian personal planck layout

View File

@@ -0,0 +1,42 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "config_common.h"
#ifdef AUDIO_ENABLE
#define STARTUP_SONG SONG(PREONIC_SOUND)
// #define STARTUP_SONG SONG(NO_SOUND)
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
SONG(COLEMAK_SOUND), \
SONG(DVORAK_SOUND) \
}
#endif
#define MUSIC_MASK (keycode != KC_NO)
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 2
#endif

View File

@@ -0,0 +1,253 @@
/* Copyright 2015-2017 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/>.
*/
#include "preonic.h"
#include "action_layer.h"
enum preonic_layers {
_QWERTY,
_COLEMAK,
_DVORAK,
_NUMPAD,
_LOWER,
_RAISE,
_ADJUST
};
enum preonic_keycodes {
QWERTY = SAFE_RANGE,
COLEMAK,
DVORAK,
NUMPAD,
LOWER,
RAISE,
BACKLIT
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp | A | S | D | F | G | H | J | K | L | ; | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
* `-----------------------------------------------------------------------------------'
*/
[_QWERTY] = {
{KC_GRV, KC_1, KC_2, KC_5, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSPC},
{KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
},
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = {
{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_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
},
/* Dvorak
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp | A | O | E | U | I | D | H | T | N | S | / |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
* `-----------------------------------------------------------------------------------'
*/
[_DVORAK] = {
{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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
{KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT},
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
},
/* Numpad
* ,-----------------------------------------------------------------------------------.
* | Esc | | | PgDn | PgUp | Home | End | | / | * | - | Del |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Tab | | Up | | | | | 7 | 8 | 9 | + | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp | Left | Down | Right| | | | 4 | 5 | 6 | | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| | | | | | , | 1 | 2 | 3 | | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift|
* `-----------------------------------------------------------------------------------'
*/
[_NUMPAD] = {
{KC_ESC, _______, _______, KC_PGDN, KC_PGUP, KC_END, KC_HOME, _______, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL},
{KC_TAB, _______, KC_UP, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_BSPC},
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, KC_QUOT},
{KC_LSFT, _______, _______, _______, _______, _______, KC_COMM, KC_P1, KC_P2, KC_P3, _______, KC_RSFT},
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_P0, KC_PDOT, KC_RCTL, KC_RSFT}
},
/* Lower
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | | Up | | | | | -_ | - | + | = | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp| Left | Down | Right| | | | { | } | [ | ] | \ |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| | | | | | | | | | ¢ | € | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
* `-----------------------------------------------------------------------------------'
*/
[_LOWER] = {
{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_ESC, _______, KC_UP, _______, _______, _______, _______, KC_UNDS, KC_MINS, KC_PLUS, KC_EQL, KC_BSPC},
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_BSLS},
{KC_LSFT, KC_PIPE, _______, _______, _______, _______, _______, _______, ALGR_T(KC_4), ALGR_T(KC_5), _______, KC_RSFT},
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
},
/* Raise
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Esc | | Up | | | | | - | _ | = | + | Bksp |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp | Left | Down | Right| | | | [ | ] | { | } | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| \ | | | | | | | | £ | $ | Shift|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = {
{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_ESC, _______, KC_UP, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, KC_BSPC},
{KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_PIPE},
{KC_LSFT, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, ALGR_T(KC_DLR), KC_DLR, KC_RSFT},
{BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_ENT, RAISE, _______, KC_RALT, KC_RCTL, KC_RSFT}
},
/* Adjust (Lower + Raise)
* ,-----------------------------------------------------------------------------------.
* | | | | | | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | Reset| Debug| | | | | | | aPscr| sPscr| Pscr |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Caps | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Numpad|Insert|
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* `-----------------------------------------------------------------------------------'
*/
[_ADJUST] = {
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______},
{_______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,LALT(KC_PSCR), LCTL(KC_PSCR), KC_PSCR},
{KC_CAPS, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, NUMPAD, KC_INS},
{_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
}
};
bool process_record_user(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 DVORAK:
if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK);
}
return false;
break;
case NUMPAD:
if (record->event.pressed) {
set_single_persistent_default_layer(_NUMPAD);
}
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 BACKLIT:
if (record->event.pressed) {
register_code(KC_RSFT);
#ifdef BACKLIGHT_ENABLE
backlight_step();
#endif
PORTE &= ~(1<<6);
} else {
unregister_code(KC_RSFT);
PORTE |= (1<<6);
}
return false;
break;
}
return true;
};

View File

@@ -0,0 +1,108 @@
# Preonic layout by [Blake Newman](https://github.com/blake-newman)
## Layouts
### Qwerty
```
,-----------------------------------------------------------------------------------.
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|------+------+------+------+------+------+------+------+------+------+------+------|
| Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Bksp | A | S | D | F | G | H | J | K | L | ; | " |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| Z | X | C | V | B | N | M | , | . | / | Shift|
|------+------+------+------+------+------+------+------+------+------+------+------|
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
`-----------------------------------------------------------------------------------'
```
### Colemak
```
,-----------------------------------------------------------------------------------.
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|------+------+------+------+------+------+------+------+------+------+------+------|
| Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Bksp | A | R | S | T | D | H | N | E | I | O | " |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| Z | X | C | V | B | K | M | , | . | / | Shift|
|------+------+------+------+------+------+------+------+------+------+------+------|
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
`-----------------------------------------------------------------------------------'
```
### Dvorak
```
,-----------------------------------------------------------------------------------.
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
|------+------+------+------+------+------+------+------+------+------+------+------|
| Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Bksp | A | O | E | U | I | D | H | T | N | S | / |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift|
|------+------+------+------+------+------+------+------+------+------+------+------|
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | | Alt | Ctrl | Shift|
`-----------------------------------------------------------------------------------'
```
### Numpad
```
,-----------------------------------------------------------------------------------.
| Esc | | | PgDn | PgUp | Home | End | | / | * | - | Del |
|------+------+------+------+------+------+------+------+------+------+------+------|
| Tab | | Up | | | | | 7 | 8 | 9 | + | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Bksp | Left | Down | Right| | | | 4 | 5 | 6 | | " |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| | | | | | , | 1 | 2 | 3 | | Shift|
|------+------+------+------+------+------+------+------+------+------+------+------|
| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | 0 | . | Ctrl | Shift|
`-----------------------------------------------------------------------------------'
```
### Lower
```
,-----------------------------------------------------------------------------------.
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Esc | | Up | | | | | -_ | - | + | = | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Bksp| Left | Down | Right| | | | { | } | [ | ] | \ |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| | | | | | | | | | ¢ | € | Shift|
|------+------+------+------+------+------+------+------+------+------+------+------|
| Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
`-----------------------------------------------------------------------------------'
```
### Raise
```
,-----------------------------------------------------------------------------------.
| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Esc | | Up | | | | | - | _ | = | + | Bksp |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Bksp | Left | Down | Right| | | | [ | ] | { | } | | |
|------+------+------+------+------+------|------+------+------+------+------+------|
| Shift| \ | | | | | | | | £ | $ | Shift|
|------+------+------+------+------+------+------+------+------+------+------+------|
| Brite| Ctrl | Alt | GUI |Lower | Enter |Raise | | Alt | Ctrl | Shift|
`-----------------------------------------------------------------------------------'
```
### Adjust (Lower + Raise)
```
,-----------------------------------------------------------------------------------.
| | | | | | | | | | | | |
|------+------+------+------+------+------+------+------+------+------+------+------|
| | Reset| Debug| | | | | | | aPscr| sPscr| Pscr |
|------+------+------+------+------+-------------+------+------+------+------+------|
| Caps | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Numpad|Insert|
|------+------+------+------+------+------|------+------+------+------+------+------|
| |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | |
|------+------+------+------+------+------+------+------+------+------+------+------|
| | | | | | | | Next | Vol- | Vol+ | Play |
`-----------------------------------------------------------------------------------'
```

View File

@@ -10,11 +10,14 @@ Note that this is a complete replacement for the firmware, so you won't be
using Bootmapper Client to change any keyboard settings, since not all the
USB report options are supported.
This is an example based on the b.mini keyboard for making other keyboards
compatible with QMK; fully supported boards have their own directory.
## Supported Boards
Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been
tested so far (since it's the only one I own). But other boards that use
the ps2avrGB firmware should work as well.
- [b.fake](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bfake)
- [b.mini](https://github.com/qmk/qmk_firmware/tree/master/keyboards/bmini)
- [pearl](https://github.com/qmk/qmk_firmware/tree/master/keyboards/pearl)
## Installing

View File

@@ -0,0 +1,60 @@
/*
Copyright 2017 Luiz Ribeiro <luizribeiro@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/>.
*/
#ifndef BMINI_H
#define BMINI_H
#include "quantum.h"
#define KEYMAP( \
K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
){ \
{ K00, K10, K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB0, KC0, KD0, KE0 }, \
{ K01, K11, K21, K31, K41, K51, KC_NO, KC_NO, KC_NO, KC_NO, KA1, KB1, KC_NO, KD1, KE1 }, \
{ K02, K12, K22, K32, K42, K52, KC_NO, KC_NO, KC_NO, KC_NO, KA2, KB2, KC_NO, KD2, KE2 }, \
{ K03, K13, K23, K33, K43, K53, KC_NO, KC_NO, KC_NO, KC_NO, KA3, KB3, KC3, KD3, KC_NO }, \
{ K04, K14, K24, K34, K44, K54, KC_NO, KC_NO, KC_NO, KC_NO, KA4, KB4, KC4, KC_NO, KE4 }, \
{ K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \
{ K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \
{ K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \
}
#define KC_KEYMAP( \
K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \
K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \
K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \
K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \
K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \
K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \
) \
{ \
{ KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \
{ KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \
{ KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \
{ KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \
{ KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \
{ KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \
{ KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \
{ KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \
}
#endif

View File

@@ -18,15 +18,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
#define VENDOR_ID 0x20A0
#define PRODUCT_ID 0x422D
// TODO: share these strings with usbconfig.h
// Edit usbconfig.h to change these.
#define MANUFACTURER winkeyless.kr
#define PRODUCT ps2avrGB
/* matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 15
#define RGBLED_NUM 16
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
#define BOOTLOADHID_BOOTLOADER 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))

View File

@@ -0,0 +1,37 @@
/*
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bmini.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_HOME,KC_END,
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_INS,
MO(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, KC_PGUP,
KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT
),
[1] = KEYMAP(
KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END,
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_DEL,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_INS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_RGHT
),
};

View File

@@ -22,13 +22,11 @@
// Layer shorthand
#define _CM 0 // Colemak
#define _QW 1 // Qwerty
#define _DV 2 // Dvorak
#define _NB 3 // Numbers
#define _FN 4 // Function
#define _SYL 5 // Symbols left
#define _SYR 6 // Symbols right
#define _NAV 7 // Navigation
#define _NB 1 // Numbers
#define _FN 2 // Function
#define _SYL 3 // Symbols left
#define _SYR 4 // Symbols right
#define _NAV 5 // Navigation
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -42,15 +40,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------|
* | | sft or Z | nb or X | sym or C | V | nav or B | | | | nav or K | M | sym or , | nb or . | sft or / | |
* |--------+--------------+--------------+---------------+--------------+--------------+--------+--------+--------+----------------+--------+------------------+----------------+------------------------|
* | LSHIFT | LCTRL | LALT | LGUI | | SPACE | LCTRL | DEL | LALT | BACKSP | | RGUI | RALT | RCTRL | RSHIFT |
* | LSHIFT | LCTRL | LALT | LGUI | CTRL ' | SPACE | LCTRL | DEL | LALT | BACKSP | RGUI | RGUI | RALT | RCTRL | RSHIFT |
* '------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------'
*/
*/
[_CM] = {
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______ },
{ _______, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT },
{ _______, SFT_T(KC_Z), LT(_NB, KC_X), LT(_SYL, KC_C), KC_V, LT(_NAV, KC_B), _______, _______, _______, LT(_NAV, KC_K), KC_M, LT(_SYR, KC_COMM), LT(_FN, KC_DOT), SFT_T(KC_SLSH), _______ },
{ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_QUOT), KC_SPC, KC_LCTL, KC_DEL , KC_LALT, KC_BSPC, _______, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT },
{ KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_QUOT), KC_SPC, KC_LCTL, KC_DEL , KC_LALT, KC_BSPC, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT },
},
/* Numbers _NB / Functions _FN
@@ -93,14 +91,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |--------+--------+--------+---------------+--------+--------+--------+--------+--------+--------+--------+------------------+--------+--------+--------|
* | | | | | | | | | | | | | | | |
* '-------------------------------------------------------------------------------------------------------------------------------------------------------'
*/
*/
[_SYL] = {
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, KC_EXLM, UK_PND, KC_UNDS, KC_MINS, KC_TILD, _______, _______, _______, UK_BSLS, KC_LCBR, KC_RCBR, KC_SLSH, UK_HASH, _______ },
{ _______, KC_DLR, KC_PERC, KC_PLUS, KC_EQL, _______, _______, _______, _______, UK_QUOT, KC_LPRN, KC_RPRN, KC_QUOT, UK_AT, _______ },
{ _______, KC_CIRC, KC_AMPR, LT(_SYL, KC_C), UK_PIPE, _______, _______, _______, _______, KC_LABK, KC_LBRC, KC_RBRC, KC_RABK, KC_GRV, _______ },
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
},
},
[_SYR] = {
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{ _______, KC_EXLM, UK_PND, KC_UNDS, KC_MINS, KC_TILD, _______, _______, _______, KC_BSLS, KC_LCBR, KC_RCBR, KC_SLSH, UK_HASH, _______ },

View File

@@ -1,3 +1,5 @@
/* -*- Mode:C; c-basic-offset:2; tab-width:2; indent-tabs-mode:nil; evil-indent-convert-tabs:t; -*- */
#include QMK_KEYBOARD_H
#include "debug.h"
#include "action_layer.h"
@@ -7,51 +9,153 @@
* See `readme.md` for notes on each define.
*/
// Personal preference (enable by passing EXTRAFLAGS=... to make).
// #define CFQ_USE_MOMENTARY_LAYER_KEYS
// #define CFQ_USE_EXPEREMENTAL_LAYER
/* Personal preference (enable by passing EXTRAFLAGS=... to make). */
/* #define CFQ_USE_MOMENTARY_LAYER_KEYS */
// keep enabled for now
#define CFQ_USE_DYNAMIC_MACRO
#if !defined(CFQ_USER_KEY0)
# define CFQ_USER_KEY0 KC_BSPC
#endif
#if !defined(CFQ_USER_KEY1)
# define CFQ_USER_KEY1 CFQ_KC_FN1
#endif
#if !defined(CFQ_USER_KEY2)
# define CFQ_USER_KEY2 KC_INS
# define CFQ_USER_KEY2 KC_LT
#endif
#if !defined(CFQ_USER_KEY3)
# ifdef CFQ_USE_EXPEREMENTAL_LAYER
# define CFQ_USER_KEY3 CFQ_KC_FN3
# else
# define CFQ_USER_KEY3 KC_CAPS
# endif
# define CFQ_USER_KEY3 KC_GT
#endif
#if !defined(CFQ_USER_KEY4)
# define CFQ_USER_KEY4 KC_SPC
# define CFQ_USER_KEY4 KC_BSPC
#endif
#if !defined(CFQ_USER_KEY5)
# define CFQ_USER_KEY5 KC_ENT
# define CFQ_USER_KEY5 KC_DELT
#endif
#if !defined(CFQ_USER_KEY6)
# define CFQ_USER_KEY6 CFQ_KC_FN2
# define CFQ_USER_KEY6 KC_CAPS
#endif
#if !defined(CFQ_USER_KEY7)
# define CFQ_USER_KEY7 CFQ_KC_FN1
# define CFQ_USER_KEY7 CFQ_KC_FN3
#endif
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define MDIA 2 // media keys
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
# define EXPR 3 // experimental keys
#ifndef CFQ_WORD_A
#define CFQ_WORD_A ""
#endif
#ifndef CFQ_WORD_B
#define CFQ_WORD_B ""
#endif
#ifndef CFQ_WORD_C
#define CFQ_WORD_C ""
#endif
#ifndef CFQ_WORD_D
#define CFQ_WORD_D ""
#endif
#ifndef CFQ_WORD_E
#define CFQ_WORD_E ""
#endif
#ifndef CFQ_WORD_F
#define CFQ_WORD_F ""
#endif
#ifndef CFQ_WORD_G
#define CFQ_WORD_G ""
#endif
#ifndef CFQ_WORD_H
#define CFQ_WORD_H ""
#endif
#ifndef CFQ_WORD_I
#define CFQ_WORD_I ""
#endif
#ifndef CFQ_WORD_J
#define CFQ_WORD_J ""
#endif
#ifndef CFQ_WORD_K
#define CFQ_WORD_K ""
#endif
#ifndef CFQ_WORD_L
#define CFQ_WORD_L ""
#endif
#ifndef CFQ_WORD_M
#define CFQ_WORD_M ""
#endif
#ifndef CFQ_WORD_N
#define CFQ_WORD_N ""
#endif
#ifndef CFQ_WORD_O
#define CFQ_WORD_O ""
#endif
#ifndef CFQ_WORD_P
#define CFQ_WORD_P ""
#endif
#ifndef CFQ_WORD_Q
#define CFQ_WORD_Q ""
#endif
#ifndef CFQ_WORD_R
#define CFQ_WORD_R ""
#endif
#ifndef CFQ_WORD_S
#define CFQ_WORD_S ""
#endif
#ifndef CFQ_WORD_T
#define CFQ_WORD_T ""
#endif
#ifndef CFQ_WORD_U
#define CFQ_WORD_U ""
#endif
#ifndef CFQ_WORD_V
#define CFQ_WORD_V ""
#endif
#ifndef CFQ_WORD_W
#define CFQ_WORD_W ""
#endif
#ifndef CFQ_WORD_X
#define CFQ_WORD_X ""
#endif
#ifndef CFQ_WORD_Y
#define CFQ_WORD_Y ""
#endif
#ifndef CFQ_WORD_Z
#define CFQ_WORD_Z ""
#endif
static const char *cfq_word_lut[26] = {
CFQ_WORD_A, CFQ_WORD_B, CFQ_WORD_C, CFQ_WORD_D, CFQ_WORD_E, CFQ_WORD_F,
CFQ_WORD_G, CFQ_WORD_H, CFQ_WORD_I, CFQ_WORD_J, CFQ_WORD_K, CFQ_WORD_L,
CFQ_WORD_M, CFQ_WORD_N, CFQ_WORD_O, CFQ_WORD_P, CFQ_WORD_Q, CFQ_WORD_R,
CFQ_WORD_S, CFQ_WORD_T, CFQ_WORD_U, CFQ_WORD_V, CFQ_WORD_W, CFQ_WORD_X,
CFQ_WORD_Y, CFQ_WORD_Z,
};
#define BASE 0 /* default layer */
#define SYMB 1 /* symbols */
#define MDIA 2 /* media keys */
#define WORD 3 /* experimental keys */
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
EPRM,
VRSN,
PLACEHOLDER = SAFE_RANGE, /* can always be here */
RGB_SLD,
M_BRACKET_IN_CBR,
M_BRACKET_IN_PRN,
M_BRACKET_IN_BRC,
M_BRACKET_IN_ANG,
M_BRACKET_OUT_CBR,
M_BRACKET_OUT_PRN,
M_BRACKET_OUT_BRC,
M_BRACKET_OUT_ANG,
M_ARROW_RMINUS,
M_ARROW_LMINUS,
M_ARROW_REQL,
M_ARROW_LEQL,
/* allow user defined words for each character:
* use CFQ_WORD_[A-Z] defines. */
M_WORD_A, M_WORD_B, M_WORD_C, M_WORD_D, M_WORD_E, M_WORD_F,
M_WORD_G, M_WORD_H, M_WORD_I, M_WORD_J, M_WORD_K, M_WORD_L,
M_WORD_M, M_WORD_N, M_WORD_O, M_WORD_P, M_WORD_Q, M_WORD_R,
M_WORD_S, M_WORD_T, M_WORD_U, M_WORD_V, M_WORD_W, M_WORD_X,
M_WORD_Y, M_WORD_Z,
#ifdef CFQ_USE_DYNAMIC_MACRO
DYNAMIC_MACRO_RANGE,
#endif
@@ -61,30 +165,6 @@ enum custom_keycodes {
#include "dynamic_macro.h"
#endif
// macros
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
#define M_SPACES_1 2
#define M_SPACES_2 3
#define M_SPACES_3 4
#define M_SPACES_4 5
#define M_SPACES_5 6
#define M_SPACES_6 7
#define M_SPACES_7 8
#define M_SPACES_8 9
#endif
#define M_BRACKET_IN_CBR 10
#define M_BRACKET_IN_PRN 11
#define M_BRACKET_IN_BRC 12
#define M_BRACKET_IN_ANG 13
#define M_BRACKET_OUT_CBR 14
#define M_BRACKET_OUT_PRN 15
#define M_BRACKET_OUT_BRC 16
#define M_BRACKET_OUT_ANG 17
#define M_ARROW_RMINUS 18
#define M_ARROW_LMINUS 19
#define M_ARROW_REQL 20
#define M_ARROW_LEQL 21
#ifdef CFQ_USE_MOMENTARY_LAYER_KEYS
#define CFQ_KC_FN1 MO(1)
#define CFQ_KC_FN2 MO(2)
@@ -99,42 +179,49 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
* ,--------------------------------------------------. ,--------------------------------------------------.
* | Grave | ! | @ | # | $ | % | { | | } | ^ | & | * | - | = | BSpace |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | ( | | ) | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
* |--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del |
* | LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Ins |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | Ins |CapsLk| | Home | End |
* ,------|------|------| |------+------+------.
* | | | ~L2 | | PgUp | | |
* |Space |Enter |------| |------|Enter |Space |
* | | | ~L1 | | PgDn | | |
* | < | > | | Home | End |
* ,------+------+------| |------+------+------.
* | | |CapsLk| | PgUp | | |
* |BSpace| Del |------| |------| ~L2 |Space |
* | | | ~L3 | | PgDn | | |
* `--------------------' `--------------------'
*
* Optional overrides: see CFQ_USER_KEY# defines.
*
* -------+------+------+------+------+
* | | | | USR1 | |
* `----------------------------------'
*
* ,-------------.
* | USR2 | USR3 |
* ,------|------|------|
* | | | USR6 |
* | USR4 | USR5 |------|
* | | | USR7 |
* `--------------------'
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | USR0 |
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | USR1 | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | USR2 | USR3 | | | |
* ,------+------+------| |------+------+------.
* | | | USR6 | | | | |
* | USR4 | USR5 |------| |------| | |
* | | | USR7 | | | | |
* `--------------------' `--------------------'
*/
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = LAYOUT_ergodox( // layer 0 : default
// left hand
/* If it accepts an argument (i.e, is a function), it doesn't need KC_.
* Otherwise, it needs KC_* */
[BASE] = LAYOUT_ergodox( /* layer 0 : default */
/* left hand */
KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LCBR,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN,
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
@@ -143,48 +230,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
CFQ_USER_KEY2, CFQ_USER_KEY3,
CFQ_USER_KEY6,
CFQ_USER_KEY4, CFQ_USER_KEY5, CFQ_USER_KEY7,
// right hand
KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, KC_BSPC,
/* right hand */
KC_RCBR, KC_CIRC, KC_AMPR, KC_ASTR,KC_MINS, KC_EQL, CFQ_USER_KEY0,
KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
KC_LEFT, KC_DOWN,KC_UP, KC_RGHT, KC_DELT,
KC_LEFT, KC_DOWN,KC_UP, KC_RGHT, KC_INS,
KC_HOME, KC_END,
KC_PGUP,
#ifdef CFQ_USE_SWAP_RIGHT_SPACE_ENTER
KC_PGDN, KC_SPC, KC_ENT
#else
KC_PGDN, KC_ENT, KC_SPC
#endif
),
/* Keymap 1: Symbol layer
KC_PGDN, CFQ_KC_FN2, KC_ENT
),/* Keymap 1: KeyPad, Macro Record
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | {} | | }{ | F6 | F7 | F8 | F9 | F10 | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | => | () | | )( | <= | 7 | 8 | 9 | \ | F11 |
* | | | | | | | {} | | }{ | |NumLck| / | * | - | |
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | | | | | => | () | | )( | <= | 7 | 8 | 9 | + | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | -> |------| |------| <- | 4 | 5 | 6 | * | F12 |
* | | | | | | -> |------| |------| <- | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------| [] | | ][ |------+------+------+------+------+--------|
* | | | | | | <> | | | | >< | 1 | 2 | 3 | - | |
* | | | | | | <> | | | | >< | 1 | 2 | 3 | Enter| |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | 0 | | . | + | |
* | | | | | | | 0 | | . | Enter| |
* `----------------------------------' `----------------------------------'
* ,-------------. ,---------------.
* |Start1|Start2| | | |
* ,------|------|------| |------+--------+------.
* | | | Stop | | | | |
* |Play1 |Play2 |------| |------| | |
* | | | | | | | |
* `--------------------' `----------------------'
* ,-------------. ,--------------.
* |Start1|Start2| | | |
* ,------+------+------| |------+-------+------.
* | | | Stop | | | | |
* |Play1 |Play2 |------| |------| | |
* | | | | | | | |
* `--------------------' `---------------------'
*/
// SYMBOLS
/* SYMBOLS */
[SYMB] = LAYOUT_ergodox(
// left hand
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, M(M_BRACKET_IN_CBR),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_ARROW_REQL), M(M_BRACKET_IN_PRN),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_ARROW_RMINUS),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_BRACKET_IN_ANG), M(M_BRACKET_IN_BRC),
/* left hand */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_CBR,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_ARROW_REQL, M_BRACKET_IN_PRN,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_ARROW_RMINUS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_BRACKET_IN_ANG, M_BRACKET_IN_BRC,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
#ifdef CFQ_USE_DYNAMIC_MACRO
DYN_REC_START1, DYN_REC_START2,
@@ -195,21 +277,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
#endif
// right hand
M(M_BRACKET_OUT_CBR), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
M(M_BRACKET_OUT_PRN), M(M_ARROW_LEQL), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH, KC_F11,
M(M_ARROW_LMINUS), KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK, KC_F12,
M(M_BRACKET_OUT_BRC), M(M_BRACKET_OUT_ANG), KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS, KC_TRNS,
KC_KP_0, KC_TRNS, KC_KP_DOT, KC_KP_PLUS, KC_TRNS,
/* right hand */
M_BRACKET_OUT_CBR, KC_TRNS, KC_NLCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS,
M_BRACKET_OUT_PRN, M_ARROW_LEQL, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS,
M_ARROW_LMINUS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS,
M_BRACKET_OUT_BRC, M_BRACKET_OUT_ANG, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_TRNS,
KC_KP_0, KC_TRNS, KC_KP_DOT, KC_KP_ENTER, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Media and mouse keys
/* Keymap 2: F-Keys, media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | |MWhlUp| | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| Left | Down | Up |Right | | |
@@ -220,15 +302,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | MRwd | MFwd | | MPrv | MNxt |
* ,------|------|------| |------+------+------.
* ,------+------+------| |------+------+------.
* | | | | |VolUp | | |
* | | |------| |------| Mute | Play |
* | Mute | |------| |------| | Play |
* | | | | |VolDn | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
/* MEDIA AND MOUSE */
[MDIA] = LAYOUT_ergodox(
// left hand
/* left hand */
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_WH_U,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
@@ -236,131 +318,66 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MRWD, KC_MFFD,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_MUTE, KC_TRNS, KC_TRNS,
/* right hand */
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_LEFT, KC_DOWN, KC_UP, KC_RGHT, 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_MPRV, KC_MNXT,
KC_VOLU,
KC_VOLD, KC_MUTE, KC_MPLY
KC_VOLD, KC_TRNS, KC_MPLY
),
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
/* Keymap 3: My own testing keys!
/* Keymap 3: Entire Words (one for each key)
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | { | } | | } | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | ( | ) | | ) | | | Spc7 | Spc8 | | | | |
* | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
* |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
* | | Q | W | E | R | T | | | | Y | U | I | O | P | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | [ | ] | |------| |------| Spc4 | Spc5 | Spc6 | | | |
* |--------+------+------+------+------+------| ] | | |------+------+------+------+------+--------|
* | | | | < | > | | | | | Spc1 | Spc2 | Spc3 | | | |
* | | A | S | D | F | G |------| |------| H | J | K | L | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | Z | X | C | V | B | | | | N | M | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* ,------+------+------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// EXPERIMENT
[EXPR] = LAYOUT_ergodox(
// left hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_TRNS, KC_RCBR,
KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_RPRN,
KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, S(KC_COMM), S(KC_DOT), KC_TRNS, KC_RBRC,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, M(M_SPACES_7), M(M_SPACES_8), KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, M(M_SPACES_4), M(M_SPACES_5), M(M_SPACES_6), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, M(M_SPACES_1), M(M_SPACES_2), M(M_SPACES_3), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
/* WORDS */
[WORD] = LAYOUT_ergodox(
/* left hand */
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11,
KC_TRNS, M_WORD_Q, M_WORD_W, M_WORD_E, M_WORD_R, M_WORD_T, KC_TRNS,
KC_TRNS, M_WORD_A, M_WORD_S, M_WORD_D, M_WORD_F, M_WORD_G,
KC_TRNS, M_WORD_Z, M_WORD_X, M_WORD_C, M_WORD_V, M_WORD_B, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
/* right hand */
KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS,
KC_TRNS, M_WORD_Y, M_WORD_U, M_WORD_I, M_WORD_O, M_WORD_P, KC_TRNS,
M_WORD_H, M_WORD_J, M_WORD_K, M_WORD_L, KC_TRNS, KC_TRNS,
KC_TRNS, M_WORD_N, M_WORD_M, 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
),
#endif // CFQ_USE_EXPEREMENTAL_LAYER
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Momentary Layer 1 (Symbols)
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA), // FN2 - Momentary Layer 2 (Media)
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
[3] = ACTION_LAYER_TAP_TOGGLE(EXPR), // FN3 - Momentary Layer 3 (Expremental)
#endif
};
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) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
break;
case 1:
if (record->event.pressed) { // For resetting EEPROM
eeconfig_init();
}
break;
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
case M_SPACES_1:
if (record->event.pressed) { return MACRO(T(SPC), END); }
case M_SPACES_2:
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), END); }
case M_SPACES_3:
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), END); }
case M_SPACES_4:
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), END); }
case M_SPACES_5:
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), END); }
case M_SPACES_6:
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), END); }
case M_SPACES_7:
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), END); }
case M_SPACES_8:
if (record->event.pressed) { return MACRO(T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), T(SPC), END); }
#endif // CFQ_USE_EXPEREMENTAL_LAYER
case M_BRACKET_IN_CBR: // {}
if (record->event.pressed) { return MACRO(D(LSFT), T(LBRC), T(RBRC), U(LSFT), T(LEFT), END); }
case M_BRACKET_IN_PRN: // ()
if (record->event.pressed) { return MACRO(D(LSFT), T(9), T(0), U(LSFT), T(LEFT), END); }
case M_BRACKET_IN_BRC: // []
if (record->event.pressed) { return MACRO(T(LBRC), T(RBRC), T(LEFT), END); }
case M_BRACKET_IN_ANG: // <>
if (record->event.pressed) { return MACRO(D(LSFT), T(COMM), T(DOT), U(LSFT), T(LEFT), END); }
case M_BRACKET_OUT_CBR: // }{
if (record->event.pressed) { return MACRO(D(LSFT), T(RBRC), T(LBRC), U(LSFT), T(LEFT), END); }
case M_BRACKET_OUT_PRN: // )(
if (record->event.pressed) { return MACRO(D(LSFT), T(0), T(9), U(LSFT), T(LEFT), END); }
case M_BRACKET_OUT_BRC: // ][
if (record->event.pressed) { return MACRO(T(RBRC), T(LBRC), T(LEFT), END); }
case M_BRACKET_OUT_ANG: // ><
if (record->event.pressed) { return MACRO(D(LSFT), T(DOT), T(COMM), U(LSFT), T(LEFT), END); }
case M_ARROW_RMINUS:
if (record->event.pressed) { return MACRO(T(MINUS), D(LSFT), T(DOT), U(LSFT), END); }
case M_ARROW_LMINUS:
if (record->event.pressed) { return MACRO(D(LSFT), T(COMM), U(LSFT), T(MINUS), END); }
case M_ARROW_REQL:
if (record->event.pressed) { return MACRO(T(EQL), D(LSFT), T(DOT), U(LSFT), END); }
case M_ARROW_LEQL:
if (record->event.pressed) { return MACRO(D(LSFT), T(COMM), U(LSFT), T(EQL), END); }
}
return MACRO_NONE;
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB), /* FN1 - Momentary Layer 1 (Symbols) */
[2] = ACTION_LAYER_TAP_TOGGLE(MDIA), /* FN2 - Momentary Layer 2 (Media) */
[3] = ACTION_LAYER_TAP_TOGGLE(WORD), /* FN3 - Momentary Layer 3 (Words) */
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
@@ -370,19 +387,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
#endif
switch (keycode) {
// dynamically generate these.
case EPRM:
if (record->event.pressed) {
eeconfig_init();
}
return false;
break;
case VRSN:
if (record->event.pressed) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
}
return false;
break;
/* dynamically generate these. */
case RGB_SLD:
if (record->event.pressed) {
#ifdef RGBLIGHT_ENABLE
@@ -391,16 +396,115 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
break;
case M_BRACKET_IN_CBR: /* {} */
if (record->event.pressed) {
SEND_STRING("{}" SS_TAP(X_LEFT));
return false;
}
break;
case M_BRACKET_IN_PRN: /* () */
if (record->event.pressed) {
SEND_STRING("()" SS_TAP(X_LEFT));
return false;
}
break;
case M_BRACKET_IN_BRC: /* [] */
if (record->event.pressed) {
SEND_STRING("[]" SS_TAP(X_LEFT));
return false;
}
break;
case M_BRACKET_IN_ANG: /* <> */
if (record->event.pressed) {
SEND_STRING("<>" SS_TAP(X_LEFT));
return false;
}
break;
case M_BRACKET_OUT_CBR: /* }{ */
if (record->event.pressed) {
SEND_STRING("}{" SS_TAP(X_LEFT));
return false;
}
break;
case M_BRACKET_OUT_PRN: /* )( */
if (record->event.pressed) {
SEND_STRING(")(" SS_TAP(X_LEFT));
return false;
}
break;
case M_BRACKET_OUT_BRC: /* ][ */
if (record->event.pressed) {
SEND_STRING("][" SS_TAP(X_LEFT));
return false;
}
break;
case M_BRACKET_OUT_ANG: /* >< */
if (record->event.pressed) {
SEND_STRING("><" SS_TAP(X_LEFT));
return false;
}
break;
case M_ARROW_LMINUS: /* <- */
if (record->event.pressed) {
SEND_STRING("<-");
return false;
}
break;
case M_ARROW_RMINUS: /* -> */
if (record->event.pressed) {
SEND_STRING("->");
return false;
}
break;
case M_ARROW_LEQL: /* <= */
if (record->event.pressed) {
SEND_STRING("<=");
return false;
}
break;
case M_ARROW_REQL: /* => */
if (record->event.pressed) {
SEND_STRING("=>");
return false;
}
break;
case KC_LSHIFT: /* '' */
if (record->event.pressed && (keyboard_report->mods & (MOD_BIT(KC_RSFT)))) {
clear_mods();
SEND_STRING("''" SS_TAP(X_LEFT) SS_DOWN(X_RSHIFT) SS_DOWN(X_LSHIFT));
return false;
}
break;
case KC_RSHIFT: /* "" */
if (record->event.pressed && (keyboard_report->mods & (MOD_BIT(KC_LSFT)))) {
clear_mods();
SEND_STRING("\x22\x22" SS_TAP(X_LEFT) SS_DOWN(X_LSHIFT) SS_DOWN(X_RSHIFT));
return false;
}
break;
case M_WORD_A...M_WORD_Z:
{
const char *word = cfq_word_lut[keycode - M_WORD_A];
if (record->event.pressed) {
if (*word) {
send_string(word);
}
return false;
}
break;
}
}
return true;
}
// Runs just one time when the keyboard initializes.
/* Runs just one time when the keyboard initializes. */
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
/* Runs constantly in the background, in a loop. */
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
@@ -416,13 +520,11 @@ void matrix_scan_user(void) {
case 2:
ergodox_right_led_2_on();
break;
#ifdef CFQ_USE_EXPEREMENTAL_LAYER
case 3:
ergodox_right_led_3_on();
break;
#endif
default:
// none
/* none */
break;
}

View File

@@ -3,7 +3,8 @@
- This layout aims to balance muscle memory from a typical QWERTY layout
with having keys used for software development easily accessible.
- Arrow keys follow VIM convention (the media layer even uses arrow keys for HJKL).
- Arrow keys follow VIM convention
(the media layer even uses arrow keys for HJKL).
- On the top row only symbols are used (not numbers),
it's expected the symbol layer's number-pad layout will be used for numbers.
@@ -17,65 +18,75 @@
at the same key locations to type matching pairs.
- The extra space-bar on the lower-left looks like it's in an obscure location,
however using the larger thumb cluster ended up being more of a reach while typing.
however using the larger thumb cluster
ended up being more of a reach while typing.
- L3 is currently only used if `CFQ_USE_EXPEREMENTAL_LAYER` is defined,
this is a layer to place extra functionality and test new keys.
- There is a handy shortcut for writing quotes that inserts the cursor
between the quotation marks.
Holding LShift, then RShift types: "" (then presses left).
Holding RShift, then LShift types: '' (then presses left).
## Configuration
Some optional behavior is configurable without editing the code
using `CFQ_` prefixed defines which can be set by passing `EXTRAFLAGS` to make.
- `CFQ_USER_KEY1` (1..7) are used for custom-keys
- `CFQ_USE_MOMENTARY_LAYER_KEYS` is used to prevent layer keys from toggling when tapped.
- `CFQ_USE_SWAP_RIGHT_SPACE_ENTER` swap Enter and Space on the right hand thumb cluster.
While asymmetric, it makes Enter more easily accessible.
- `CFQ_USE_EXPEREMENTAL_LAYER` defines an extra layer for misc extra keys/macros.
When set, Caps-Lock is replace by Layer3.
Currently it's mostly empty.
- `CFQ_USER_KEY0`
(0..7) are used for custom-keys
- `CFQ_USE_MOMENTARY_LAYER_KEYS`
is used to prevent layer keys from toggling when tapped.
- `CFQ_WORD_[A-Z]`
defines can bind a key to an entire user defined word.
## Keymap 0: Basic layer
```
Keymap 0: Basic layer
,--------------------------------------------------. ,--------------------------------------------------.
| Grave | ! | @ | # | $ | % | { | | } | ^ | & | * | - | = | BSpace |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
| Tab | Q | W | E | R | T | ( | | ) | Y | U | I | O | P | \ |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|--------+------+------+------+------+------| [ | | ] |------+------+------+------+------+--------|
| LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Del |
| LCtl |Super | Alt | ~L1 |Space | | Left | Down | Up |Right | Ins |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| Ins |CapsLk| | Home | End |
,------|------|------| |------+------+------.
| | | ~L2 | | PgUp | | |
|Space |Enter |------| |------|Enter |Space |
| | | ~L1 | | PgDn | | |
| < | > | | Home | End |
,------+------+------| |------+------+------.
| | |CapsLk| | PgUp | | |
|BSpace| Del |------| |------| ~L2 |Space |
| | | ~L3 | | PgDn | | |
`--------------------' `--------------------'
Optional overrides: see CFQ_USER_KEY# defines
Optional overrides: see CFQ_USER_KEY# defines.
-------+------+------+------+------+
| | | | USR1 | |
`----------------------------------'
,-------------.
| USR2 | USR3 |
,------|------|------|
| | | USR6 |
| USR4 | USR5 |------|
| | | USR7 |
`--------------------'
,--------------------------------------------------. ,--------------------------------------------------.
| | | | | | | | | | | | | | | USR0 |
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
| | | | | | | | | | | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | |------| |------| | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | | | | | | | | | | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | USR1 | | | | | | | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| USR2 | USR3 | | | |
,------+------+------| |------+------+------.
| | | USR6 | | | | |
| USR4 | USR5 |------| |------| | |
| | | USR7 | | | | |
`--------------------' `--------------------'
```
## Keymap 1: Symbol layer
## Keymap 1: KeyPad, Macro Record
Notes:
@@ -84,31 +95,31 @@ Notes:
```
,--------------------------------------------------. ,--------------------------------------------------.
| | F1 | F2 | F3 | F4 | F5 | {} | | }{ | F6 | F7 | F8 | F9 | F10 | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | | | | | => | () | | )( | <= | 7 | 8 | 9 | \ | F11 |
| | | | | | | {} | | }{ | |NumLck| / | * | - | |
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
| | | | | | => | () | | )( | <= | 7 | 8 | 9 | + | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | -> |------| |------| <- | 4 | 5 | 6 | * | F12 |
| | | | | | -> |------| |------| <- | 4 | 5 | 6 | + | |
|--------+------+------+------+------+------| [] | | ][ |------+------+------+------+------+--------|
| | | | | | <> | | | | >< | 1 | 2 | 3 | - | |
| | | | | | <> | | | | >< | 1 | 2 | 3 | Enter| |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | | | | 0 | | . | + | |
| | | | | | | 0 | | . | Enter| |
`----------------------------------' `----------------------------------'
,-------------. ,---------------.
|Start1|Start2| | | |
,------|------|------| |------+--------+------.
| | | Stop | | | | |
|Play1 |Play2 |------| |------| | |
| | | | | | | |
`--------------------' `----------------------'
,-------------. ,--------------.
|Start1|Start2| | | |
,------+------+------| |------+-------+------.
| | | Stop | | | | |
|Play1 |Play2 |------| |------| | |
| | | | | | | |
`--------------------' `---------------------'
```
## Keymap 2: Media and mouse keys
## Keymap 2: Keymap 2: Media and mouse keys
```
,--------------------------------------------------. ,--------------------------------------------------.
| | | | | | | | | | | | | | | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
| | | | MsUp | | |MWhlUp| | | | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | |MsLeft|MsDown|MsRght| |------| |------| Left | Down | Up |Right | | |
@@ -119,15 +130,53 @@ Notes:
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| MRwd | MFwd | | MPrv | MNxt |
,------|------|------| |------+------+------.
,------+------+------| |------+------+------.
| | | | |VolUp | | |
| | |------| |------| Mute | Play |
| Mute | |------| |------| | Play |
| | | | |VolDn | | |
`--------------------' `--------------------'
```
## Keymap 3: K-Keys & User defined words
This is for assigning whole words to single keys.
You can define the arguments (which must be quoted) using: `CFQ_WORD_[A-Z]`
eg: `-DCFQ_WORD_E=\"my@email.com\"`
```
,--------------------------------------------------. ,--------------------------------------------------.
| | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | |
|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
| | Q | W | E | R | T | | | | Y | U | I | O | P | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | A | S | D | F | G |------| |------| H | J | K | L | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | Z | X | C | V | B | | | | N | M | | | | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | | | | | | | | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | | | | |
,------+------+------| |------+------+------.
| | | | | | | |
| | |------| |------| | |
| | | | | | | |
`--------------------' `--------------------'
```
## Changelog
- 2018/03/06
Add layer for user defined words (replaces `CFQ_USE_EXPEREMENTAL_LAYER`).
Minor changes to thumb cluster.
Move backspace to left thumb, optionally remap the top right backspace.
Make keypad layout match a typical numpad.
Move F-Keys to layer 3.
- 2017/11/09
Use Caps-Lock when `CFQ_USE_EXPEREMENTAL_LAYER` isn't defined.

View File

@@ -203,7 +203,7 @@
#define BP_DEAD_TREMA ALTGR(BP_I) // dead ¨ (trema/umlaut/diaresis)
#define BP_DTRM BP_DEAD_TREMA
#define BP_EURO ALTGR(BP_E) // €
#define BP_TYPOGRAPHICAL_APOSTROPHE ALTGR(BP_COMMMA) //
#define BP_TYPOGRAPHICAL_APOSTROPHE ALTGR(BP_COMMA) //
#define BP_TAPO BP_TYPOGRAPHICAL_APOSTROPHE
#define BP_COPYRIGHT ALTGR(BP_C) // ©
#define BP_CPRT BP_COPYRIGHT

View File

@@ -0,0 +1,41 @@
/* Copyright 2018 Jonathan Nifenecker
*
* 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/>.
*/
/* Sendstring definitions for the bépo layout */
#ifndef SENDSTRING_BEPO
#define SENDSTRING_BEPO
#include "keymap_bepo.h"
const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = {
0, 0, 0, 0, 0, 0, 0, 0,
KC_BSPC, KC_TAB, KC_ENT, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, KC_ESC, 0, 0, 0, 0,
KC_SPC, BP_DCRC, BP_DQOT, BP_DOLLAR, BP_DOLLAR, BP_PERCENT, BP_P, BP_APOS,
BP_LPRN, BP_RPRN, BP_ASTR, BP_PLUS, BP_COMM, BP_MINUS, BP_DOT, BP_SLSH,
KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7,
KC_8, KC_9, BP_DOT, BP_DOT, KC_2, BP_EQUAL, KC_2, BP_APOS,
BP_AT, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G,
BP_H, BP_I, BP_J, BP_K, BP_L, BP_M, BP_N, BP_O,
BP_P, BP_Q, BP_R, BP_S, BP_T, BP_U, BP_V, BP_W,
BP_X, BP_Y, BP_Z, KC_4, BP_AGRV, KC_5, KC_5, KC_MINS,
KC_2, BP_A, BP_B, BP_C, BP_D, BP_E, BP_F, BP_G,
BP_H, BP_I, BP_J, BP_K, BP_L, BP_M, BP_N, BP_O,
BP_P, BP_Q, BP_R, BP_S, BP_T, BP_U, BP_V, BP_W,
BP_X, BP_Y, BP_Z, BP_Y, BP_B, BP_X, BP_K, KC_DEL,
};
#endif

View File

@@ -124,6 +124,7 @@ extern uint32_t default_layer_state;
#define SS_LGUI(string) SS_DOWN(X_LGUI) string SS_UP(X_LGUI)
#define SS_LALT(string) SS_DOWN(X_LALT) string SS_UP(X_LALT)
#define SS_LSFT(string) SS_DOWN(X_LSHIFT) string SS_UP(X_LSHIFT)
#define SS_RALT(string) SS_DOWN(X_RALT) string SS_UP(X_RALT)
#define SEND_STRING(str) send_string_P(PSTR(str))
extern const bool ascii_to_shift_lut[0x80];