Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81756d7b21 | ||
|
|
c5c112ae29 | ||
|
|
3d7bfae232 | ||
|
|
b666921e25 | ||
|
|
b4f4576631 | ||
|
|
60797c8439 | ||
|
|
3d9fda3629 | ||
|
|
ffa119941c | ||
|
|
ffa5c48430 | ||
|
|
a69b610456 | ||
|
|
2ba6b9ab69 | ||
|
|
5d5fa0dc8c | ||
|
|
2fe2c323c6 | ||
|
|
72fa2cf2fc | ||
|
|
3468f2f4c7 | ||
|
|
4de809535a | ||
|
|
e954dfcf8c | ||
|
|
c7b8e45ba1 | ||
|
|
d9619be499 | ||
|
|
b7cbae8d1f | ||
|
|
f5ebfdabcd | ||
|
|
ed98250e62 |
@@ -6,12 +6,16 @@ This page attempts to explain the basic information you need to know to work wit
|
||||
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
### Userspace Structure
|
||||
|
||||
Within the folder `users` is a directory for each user. This is a place for users to put code that they might use between keyboards. See the docs for [Userspace feature](feature_userspace.md) for more information.
|
||||
|
||||
### Keyboard Project Structure
|
||||
|
||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `rules.mk`.
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
|
||||
### Keymap Structure
|
||||
@@ -25,23 +29,26 @@ In every keymap folder, the following files may be found. Only `keymap.c` is req
|
||||
|
||||
# The `config.h` File
|
||||
|
||||
There are 2 `config.h` locations:
|
||||
There are 3 possible `config.h` locations:
|
||||
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* userspace (`/users/<user>/config.h`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
If the keymap `config.h` exists, that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
The build system automatically picks up the config files in the above order. If you wish to override any setting set by a previous `config.h` you will need to first include some boilerplate code for the settings you wish to change.
|
||||
|
||||
```
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
#pragma once
|
||||
```
|
||||
|
||||
If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
|
||||
Then to override a setting from the previous `config.h` file you must `#undef` and then `#define` the setting again.
|
||||
|
||||
```c
|
||||
The boilerplate code and setting look like this together:
|
||||
|
||||
```
|
||||
#pragma once
|
||||
|
||||
// overrides go here!
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# The Compelete Newbs Guide To QMK
|
||||
# The Complete Newbs Guide To QMK
|
||||
|
||||
QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level.
|
||||
|
||||
@@ -12,5 +12,7 @@ There are 4 main sections to this guide:
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||
* [Learn More with these Resources](newbs_learn_more_resources.md)
|
||||
|
||||
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
||||
|
||||
|
||||
13
docs/newbs_learn_more_resources.md
Normal file
13
docs/newbs_learn_more_resources.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Learning Resources
|
||||
These resources are aimed at giving new members in the qmk community more understanding to the information provided in the newbs docs.
|
||||
|
||||
Git resources:
|
||||
*
|
||||
*[Great General Tutorial](https://www.codecademy.com/learn/learn-git)
|
||||
*[Git Game To Learn From Examples](https://learngitbranching.js.org/)
|
||||
*[Git Resources to Learn More About Github](getting_started_github.md)
|
||||
*[Git Resources Aimed Specificly toward QMK](contributing.md)
|
||||
|
||||
|
||||
Command Line resources:
|
||||
*[Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
||||
100
drivers/avr/i2c_slave.c
Executable file
100
drivers/avr/i2c_slave.c
Executable file
@@ -0,0 +1,100 @@
|
||||
/* Library made by: g4lvanix
|
||||
* Github repository: https://github.com/g4lvanix/I2C-slave-lib
|
||||
*/
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <util/twi.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#include "i2c_slave.h"
|
||||
|
||||
void i2c_init(uint8_t address){
|
||||
// load address into TWI address register
|
||||
TWAR = (address << 1);
|
||||
// set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt
|
||||
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
|
||||
void i2c_stop(void){
|
||||
// clear acknowledge and enable bits
|
||||
TWCR &= ~( (1<<TWEA) | (1<<TWEN) );
|
||||
}
|
||||
|
||||
ISR(TWI_vect){
|
||||
|
||||
// temporary stores the received data
|
||||
uint8_t data;
|
||||
|
||||
// own address has been acknowledged
|
||||
if( (TWSR & 0xF8) == TW_SR_SLA_ACK ){
|
||||
buffer_address = 0xFF;
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else if( (TWSR & 0xF8) == TW_SR_DATA_ACK ){ // data has been received in slave receiver mode
|
||||
|
||||
// save the received byte inside data
|
||||
data = TWDR;
|
||||
|
||||
// check wether an address has already been transmitted or not
|
||||
if(buffer_address == 0xFF){
|
||||
|
||||
buffer_address = data;
|
||||
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{ // if a databyte has already been received
|
||||
|
||||
// store the data at the current address
|
||||
rxbuffer[buffer_address] = data;
|
||||
|
||||
// increment the buffer address
|
||||
buffer_address++;
|
||||
|
||||
// if there is still enough space inside the buffer
|
||||
if(buffer_address < 0xFF){
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{
|
||||
// Don't acknowledge
|
||||
TWCR &= ~(1<<TWEA);
|
||||
// clear TWI interrupt flag, prepare to receive last byte.
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( (TWSR & 0xF8) == TW_ST_DATA_ACK ){ // device has been addressed to be a transmitter
|
||||
|
||||
// copy data from TWDR to the temporary memory
|
||||
data = TWDR;
|
||||
|
||||
// if no buffer read address has been sent yet
|
||||
if( buffer_address == 0xFF ){
|
||||
buffer_address = data;
|
||||
}
|
||||
|
||||
// copy the specified buffer address into the TWDR register for transmission
|
||||
TWDR = txbuffer[buffer_address];
|
||||
// increment buffer read address
|
||||
buffer_address++;
|
||||
|
||||
// if there is another buffer address that can be sent
|
||||
if(buffer_address < 0xFF){
|
||||
// clear TWI interrupt flag, prepare to send next byte and receive acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{
|
||||
// Don't acknowledge
|
||||
TWCR &= ~(1<<TWEA);
|
||||
// clear TWI interrupt flag, prepare to receive last byte.
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
// if none of the above apply prepare TWI to be addressed again
|
||||
TWCR |= (1<<TWIE) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
}
|
||||
19
drivers/avr/i2c_slave.h
Executable file
19
drivers/avr/i2c_slave.h
Executable file
@@ -0,0 +1,19 @@
|
||||
/* Library made by: g4lvanix
|
||||
* Github repository: https://github.com/g4lvanix/I2C-slave-lib
|
||||
|
||||
Info: Inititate the library by giving the required address.
|
||||
Read or write to the necessary buffer according to the opperation.
|
||||
*/
|
||||
|
||||
#ifndef I2C_SLAVE_H
|
||||
#define I2C_SLAVE_H
|
||||
|
||||
volatile uint8_t buffer_address;
|
||||
volatile uint8_t txbuffer[0xFF];
|
||||
volatile uint8_t rxbuffer[0xFF];
|
||||
|
||||
void i2c_init(uint8_t address);
|
||||
void i2c_stop(void);
|
||||
ISR(TWI_vect);
|
||||
|
||||
#endif // I2C_SLAVE_H
|
||||
43
keyboards/bfo9000/keymaps/andylikescandy6x18/config.h
Normal file
43
keyboards/bfo9000/keymaps/andylikescandy6x18/config.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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
|
||||
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
|
||||
#endif
|
||||
64
keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c
Normal file
64
keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c
Normal file
@@ -0,0 +1,64 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#include "action_layer.h"
|
||||
|
||||
|
||||
|
||||
#define _BASE 0
|
||||
#define _RAISE 1
|
||||
#define _NAVIGATION 3
|
||||
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// layer access
|
||||
#define RSESPC LT( 1, KC_SPC)
|
||||
#define NAVSPC LT( 3, KC_SPC)
|
||||
|
||||
// Key Combos
|
||||
#define CTRLSFT LCTL(KC_LSFT)
|
||||
#define CTLALTSFT LALT(LCTL(KC_LSFT))
|
||||
#define CTLALTDEL LALT(LCTL(KC_DEL))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[_BASE] = LAYOUT( \
|
||||
KC_KP_SLASH, KC_KP_ASTERISK, KC_PMNS, KC_PPLS, KC_PSCREEN, KC_CAPS, 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_P7, KC_P8, KC_P9, KC_LBRC, KC_RBRC, 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_P4, KC_P5, KC_P6, KC_HOME, KC_END, 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_BSLS, \
|
||||
KC_P1, KC_P2, KC_P3, KC_SLCK, KC_PGUP, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
|
||||
KC_P0, KC_PDOT, KC_PENT, KC_UP, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), KC_PGUP, \
|
||||
CTLALTDEL, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, NAVSPC, RSESPC, KC_RGUI, KC_RALT, KC_APPLICATION, KC_RCTL, KC_PGDN \
|
||||
),
|
||||
[_RAISE] = LAYOUT( \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUSE, KC_NUMLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX \
|
||||
),
|
||||
[_NAVIGATION] = LAYOUT( \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUSE, KC_NUMLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_DEL, _______, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX \
|
||||
)
|
||||
// ),
|
||||
/// [_NAVIGATION] = {
|
||||
// {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) },
|
||||
// {KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL},
|
||||
// {LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT},
|
||||
// {LCTL(LALT(KC_LSFT)),LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT)}
|
||||
// }
|
||||
|
||||
};
|
||||
@@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL),
|
||||
KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RALT, KC_RCTL),
|
||||
|
||||
|
||||
|
||||
|
||||
31
keyboards/e6v2/le/keymaps/eric/keymap.c
Normal file
31
keyboards/e6v2/le/keymaps/eric/keymap.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*rBase layer */
|
||||
[0] = LAYOUT(
|
||||
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_BSLS, KC_GRV,
|
||||
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_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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_RSFT, MO(1),
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, KC_SPACE, KC_SPACE, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, KC_RCTL
|
||||
),
|
||||
|
||||
/* Function layer */
|
||||
[1] = LAYOUT(
|
||||
KC_CAPS, 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, KC_DEL,
|
||||
KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, KC_AMPR, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_DEL, KC_BSPC,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_ASTR, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_LEFT, KC_RGHT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), MO(2), KC_TRNS
|
||||
),
|
||||
|
||||
/* Reset layer */
|
||||
[2] = LAYOUT(
|
||||
RESET, KC_A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
|
||||
};
|
||||
14
keyboards/handwired/atreus50/keymaps/ajp10304/config.h
Normal file
14
keyboards/handwired/atreus50/keymaps/ajp10304/config.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#undef MATRIX_ROW_PINS
|
||||
#undef MATRIX_COL_PINS
|
||||
|
||||
#define MATRIX_ROW_PINS { D4, D5, C7, C6 }
|
||||
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, D7, D1, B7, D0, B3, B2, B1, B0 }
|
||||
|
||||
#endif
|
||||
348
keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c
Normal file
348
keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c
Normal file
@@ -0,0 +1,348 @@
|
||||
#include "atreus50.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#include "keymap_uk.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_MAC,
|
||||
_LOWER,
|
||||
_MLWR,
|
||||
_RAISE,
|
||||
_MRSE,
|
||||
_FUNC,
|
||||
_MFNC,
|
||||
_FUNC2,
|
||||
_MFNC2,
|
||||
_ADJUST,
|
||||
_MOUSE
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
MAC,
|
||||
FUNC,
|
||||
MFNC,
|
||||
FUNC2,
|
||||
MFNC2,
|
||||
LOWER,
|
||||
MLWR,
|
||||
RAISE,
|
||||
MRSE,
|
||||
MOUSE,
|
||||
DYNAMIC_MACRO_RANGE
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------| |-----------------------------------------.
|
||||
* | Esc | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | A | S | D | F | G | | H | J | K | L | ;: | Enter|
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shft | Z | X | C | V | B | | N | M | ,< | .> | /? | Shft |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
|
||||
MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,
|
||||
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,
|
||||
MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2)
|
||||
),
|
||||
|
||||
/* Function
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | 1! | 2" | 3£ | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | ~ |INSERT|
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| \| | `¬ | #~ | * | -_ | | =+ | \| | [{ | ]} | '@ |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Mouse | MENU | Alt | Ctrl | Fn |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = KEYMAP(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 ,
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, UK_TILD, KC_INSERT ,
|
||||
KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | 1! | 2" | 3£ | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | DEL | Bksp |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | ! | " | £ | $ | % | ^ | | & | * | ( | ) |WrdDel|WrdBks|
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| \| | `¬ | #~ | '@ | -_ | | =+ | #~ | [{ | ]} | '@ |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC ,
|
||||
LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) ,
|
||||
KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,
|
||||
_______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | ` | |WRDSEL| [ | ] | | | | PGUP | HOME |PGDOWN| |PRNTSC|
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | ` | | | ( | ) | | | | HOME | UP | END | |ZOOM +|
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | { | } | | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||
* | Mouse| | | | | Alt | Ctrl | Alt |Enter |Raise | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = KEYMAP(
|
||||
KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,
|
||||
KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,
|
||||
_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,
|
||||
MO(_MOUSE), _______, _______, _______, _______, KC_LALT, _______, _______, KC_ENT, _______, XXXXXXX, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | ???? | Reset|Qwerty| | | REC1 | | REC2 | | | | | Del |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | CAPS | | | | | PLAY1| | PLAY2| Mute | Vol+ | Play | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | PC/MC| | | | | STOP | | STOP | Prev | Vol- | Next | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = KEYMAP(
|
||||
M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,
|
||||
KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,
|
||||
TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Mouse
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | ESC | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | ACC0 | ACC1 | ACC2 | | | | | | BTN1 | UP | BTN2 | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | ACC0 | ACC1 | ACC2 | | | | | | LEFT | DOWN |RIGHT | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MOUSE] = KEYMAP(
|
||||
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ ,
|
||||
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Function 2 (Right hand side)
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | | |WRDSEL| | | | | LNDEL| | | | | |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | | | LNSEL| DUP | | | | | |LNJOIN| | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | UNDO | CUT | COPY | PASTE| | | | | | | | MODE |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC2] = KEYMAP(
|
||||
_______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,
|
||||
_______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||
_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MAC] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
MFNC, _______, _______, _______, MLWR, _______, _______, _______, _______, MRSE, _______, _______, _______, MFNC2
|
||||
),
|
||||
|
||||
[_MLWR] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MRSE] = KEYMAP(
|
||||
_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,
|
||||
_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MFNC] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MFNC2] = KEYMAP(
|
||||
_______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,
|
||||
_______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||
_______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
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) {
|
||||
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
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;
|
||||
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;
|
||||
case MLWR:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
layer_on(_MLWR);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
layer_off(_MLWR);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case MRSE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
layer_on(_MRSE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
layer_off(_MRSE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case MFNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
layer_on(_MFNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
layer_off(_MFNC);
|
||||
}
|
||||
return false;
|
||||
case MFNC2:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC2);
|
||||
layer_on(_MFNC2);
|
||||
} else {
|
||||
layer_off(_FUNC2);
|
||||
layer_off(_MFNC2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) {
|
||||
// These would trigger when you hit a key mapped as M(0)
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case 0: // Some custom string here
|
||||
SEND_STRING("");
|
||||
return false;
|
||||
|
||||
case 1: // Word Select
|
||||
SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL));
|
||||
return false;
|
||||
|
||||
case 2: // Word Select Mac
|
||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||
return false;
|
||||
|
||||
case 3: // Line Select
|
||||
SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
|
||||
return false;
|
||||
|
||||
case 4: // Line Select Mac
|
||||
SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
|
||||
return false;
|
||||
|
||||
case 5: // Line Delete
|
||||
SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
|
||||
SEND_STRING(SS_TAP(X_BSPACE));
|
||||
return false;
|
||||
|
||||
case 6: // Line Delete Mac
|
||||
SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
|
||||
SEND_STRING(SS_TAP(X_BSPACE));
|
||||
return false;
|
||||
|
||||
case 7: // Duplicate Selection
|
||||
SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v"));
|
||||
return false;
|
||||
|
||||
case 8: // Duplicate Selection Mac
|
||||
SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v"));
|
||||
return false;
|
||||
|
||||
case 9: // Join line
|
||||
SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE));
|
||||
return false;
|
||||
|
||||
case 10: // Join line Mac
|
||||
SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE));
|
||||
return false;
|
||||
|
||||
case 98: // Print mode
|
||||
SEND_STRING("PC");
|
||||
return false;
|
||||
|
||||
case 99: // Print mode
|
||||
SEND_STRING("OSX");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
108
keyboards/handwired/atreus50/keymaps/ajp10304/readme.md
Normal file
108
keyboards/handwired/atreus50/keymaps/ajp10304/readme.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# AJP10304 Custom Atreus50 Layout
|
||||
# Also available for the Planck and JJ40
|
||||
|
||||
**Note:** In the tables below where there are two characters on a key,
|
||||
the second is the output when shift is applied.
|
||||
|
||||
**Note:** The below tables assume a UK layout.
|
||||
|
||||
##### Main Qwerty Layer
|
||||
|
||||
* Tab: when held, operates as shift.
|
||||
* Enter: when held, operates as shift.
|
||||
* MENU: perform right-click
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| ---- |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| ----:|
|
||||
| Esc | Q | W | E | R | T | | | Y | U | I | O | P | Bksp |
|
||||
| Tab | A | S | D | F | G | | | H | J | K | L | ;: | Enter|
|
||||
| Shft | Z | X | C | V | B | | | N | M | ,< | .> | /? | Shft |
|
||||
| Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||
|
||||
##### Function Layer
|
||||
Activated when `fn` held in the above `qwerty` layer.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
| 1! | 2" | 3£ | 4$ | 5% | 6^ | | | 7& | 8* | 9( | 0) | ~ |INSERT|
|
||||
| Shift | \| | `¬ | #~ | * | -_ | | | =+ | \| | [{ | ]} | '@ |Shift |
|
||||
| Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Mouse | MENU | Alt | Ctrl | Fn2 |
|
||||
|
||||
##### Lower Layer
|
||||
Activated when `Lower` is held in the above `qwerty` layer.
|
||||
|
||||
* Numbers are along the top row, their shifted counterparts are on row 2.
|
||||
* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word.
|
||||
* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| 1! | 2" | 3£ | 4$ | 5% | 6^ | | | 7& | 8* | 9( | 0) | DEL | Bksp |
|
||||
| ! | " | £ | $ | % | ^ | | | & | * | ( | ) |WrdDel|WrdBks|
|
||||
| Shift | \| | `¬ | #~ | '@ | -_ | | | =+ | #~ | [{ | ]} | '@ |Shift |
|
||||
| | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play |
|
||||
|
||||
##### Raise Layer
|
||||
Activated when `Raise` is held in the above `qwerty` layer.
|
||||
|
||||
* Preferred layer for typing brackets.
|
||||
* Allows for cursor navigation to be used solely with the right hand.
|
||||
* WRDSEL: Select the word where the cursor is.
|
||||
* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
|
||||
| ` | |WRDSEL| [ | ] | | | | | PGUP | HOME |PGDOWN| |PRNTSC|
|
||||
| ` | | | ( | ) | | | | | HOME | UP | END | |ZOOM +|
|
||||
| | | | { | } | | | ||<| LEFT | DOWN |RIGHT |>||ZOOM -|
|
||||
| Mouse | | | | | Alt | Ctrl | Alt | Enter |Raise | | | | |
|
||||
|
||||
##### Lower + Raise
|
||||
Activated when `Lower` and `Raise` are held together in the above `qwerty` layer.
|
||||
|
||||
* Audio controls in the same position as cursor keys from the `Raise` layer.
|
||||
* ????: Runs a macro for outputting a text string. Do not use this store passwords.
|
||||
* Reset: Enter bootloader for flashing firmware to the keyboard.
|
||||
* CAPS: Toggle caps lock.
|
||||
* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2.
|
||||
To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2.
|
||||
* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
|
||||
MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| ???? | Reset|Qwerty| | | REC1 | | | REC2 | | | | | Del |
|
||||
| CAPS | | | | | PLAY1| | |PLAY2 | Mute | Vol+ | Play | | |
|
||||
| MAC | | | | | STOP1| | |STOP2 | Prev | Vol- | Next | | |
|
||||
| | | | | | | Ctrl | Alt | | | DYN | | | |
|
||||
|
||||
##### Function 2 Layer
|
||||
Activated when `fn` held in the above `qwerty` layer.
|
||||
* WRDSEL: Select the word where the cursor is.
|
||||
* LNDEL: Delete the line where the cursor is.
|
||||
* LNSEL: Select the line where the cursor is.
|
||||
* DUP: Duplicate the selected text.
|
||||
* LNJOIN: Join the line where the cursor is with the following line.
|
||||
* MODE: Print either `PC` or `OSX` depending on what layer mode is active.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| | |WRDSEL| | | | | | LNDEL| | | | | |
|
||||
| | | LNSEL| DUP | | | | | | |LNJOIN| | | |
|
||||
| | UNDO | CUT | COPY | PASTE| | | | | | | | | MODE |
|
||||
| | | | | | | Ctrl | Alt | | | | | | |
|
||||
|
||||
##### Mouse Layer
|
||||
Activated when `fn` and `raise` held together.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| ESC | | | | | | | | | | | | | |
|
||||
| ACC0 | ACC1 | ACC2 | | | | | | | BTN1 | UP | BTN2 | | |
|
||||
| ACC0 | ACC1 | ACC2 | | | | | | | LEFT | DOWN | RIGHT| | |
|
||||
| | | | | | | Ctrl | Alt | | | | | | |
|
||||
|
||||
|
||||
##Program Command
|
||||
teensy_loader_cli -w -mmcu=atmega32u4 handwired_atreus50_ajp10304.hex
|
||||
12
keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk
Normal file
12
keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
||||
AUDIO_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
||||
|
||||
TEMP := $(OPT_DEFS)
|
||||
OPT_DEFS = $(filter-out -DBOOTLOADER_SIZE=4096,$(TEMP))
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
BOOTLOADER = halfkay
|
||||
@@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB),
|
||||
KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RGUI),
|
||||
KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
|
||||
|
||||
/* Layer HHKB: HHKB mode (HHKB Fn)
|
||||
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# AJP10304 Custom JJ40 Layout
|
||||
###Based on my Planck layout of the same name.
|
||||
# Also available for the Atreus50 and Planck
|
||||
|
||||
**Note:** In the tables below where there are two characters on a key,
|
||||
the second is the output when shift is applied.
|
||||
|
||||
58
keyboards/kmini/config.h
Executable file
58
keyboards/kmini/config.h
Executable file
@@ -0,0 +1,58 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6050
|
||||
#define DEVICE_VER 0x0104
|
||||
#define MANUFACTURER Revo
|
||||
#define PRODUCT KMAC Kmini
|
||||
#define DESCRIPTION QMK keyboard firmware for Revo KMAC Mini
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 17
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
* The KMAC uses a demultiplexer for some of the cols.
|
||||
* See matrix.c for more details.
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
|
||||
#define MATRIX_COL_PINS { }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION CUSTOM_MATRIX
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
#endif
|
||||
12
keyboards/kmini/info.json
Executable file
12
keyboards/kmini/info.json
Executable file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "KMAC Mini",
|
||||
"url": "http://kbdmodadmin.cafe24.com/product/detail.html?product_no=12&cate_no=4&display_group=1",
|
||||
"maintainer": "maartenwut",
|
||||
"width": 18.25,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.25, "y":0}, {"label":"!", "x":3.25, "y":0}, {"label":"@", "x":4.25, "y":0}, {"label":"#", "x":5.25, "y":0}, {"label":"$", "x":6.25, "y":0}, {"label":"%", "x":7.25, "y":0}, {"label":"^", "x":8.25, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"Insert", "x":17.25, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"|", "x":15.75, "y":1, "w":1.5}, {"label":"Delete", "x":17.25, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"PgUp", "x":17.25, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":2.25}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"PgDn", "x":17.25, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2.25, "y":4, "w":1.5}, {"label":"GUI", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.5}, {"x":6.25, "y":4, "w":7}, {"label":"Fn", "x":13.25, "y":4, "w":1.5}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
||||
57
keyboards/kmini/keymaps/default/keymap.c
Executable file
57
keyboards/kmini/keymaps/default/keymap.c
Executable file
@@ -0,0 +1,57 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@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 QMK_KEYBOARD_H
|
||||
|
||||
// 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 _MA 0
|
||||
#define _FN 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MA] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, \
|
||||
KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \
|
||||
KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
|
||||
KC_F7, KC_F8, 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_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
),
|
||||
[_FN] = LAYOUT(
|
||||
_______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
PORTB &= ~(1<<1); // LO
|
||||
} else {
|
||||
PORTB |= (1<<1); // HI
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
53
keyboards/kmini/kmini.c
Executable file
53
keyboards/kmini/kmini.c
Executable file
@@ -0,0 +1,53 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@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 "kmini.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
led_init_ports();
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
DDRB |= (1<<1); // OUT
|
||||
DDRB |= (1<<2); // OUT
|
||||
DDRB |= (1<<3); // OUT
|
||||
}
|
||||
|
||||
/* LED pin configuration
|
||||
* Caps Lock: Low B1
|
||||
* Side1: Low B3
|
||||
* Side2: Low B2
|
||||
*/
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
36
keyboards/kmini/kmini.h
Executable file
36
keyboards/kmini/kmini.h
Executable file
@@ -0,0 +1,36 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@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 KMINI_H
|
||||
#define KMINI_H
|
||||
#define ___ KC_NO
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, K3G, \
|
||||
K40, K41, K42, K43, K44, K47, K4C, K4E, K4F, K4G \
|
||||
) { \
|
||||
{K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \
|
||||
{K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \
|
||||
{K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F, K2G}, \
|
||||
{K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3E, K3F, K3G}, \
|
||||
{K40, K41, K42, K43, K44, ___, ___, K47, ___, ___, ___, ___, K4C, ___, K4E, K4F, K4G}, \
|
||||
}
|
||||
|
||||
#endif
|
||||
319
keyboards/kmini/matrix.c
Executable file
319
keyboards/kmini/matrix.c
Executable file
@@ -0,0 +1,319 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#if defined(__AVR__)
|
||||
#include <avr/io.h>
|
||||
#endif
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "timer.h"
|
||||
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#ifndef DEBOUNCING_DELAY
|
||||
# define DEBOUNCING_DELAY 5
|
||||
#endif
|
||||
|
||||
#define COL_SHIFTER ((uint32_t)1)
|
||||
|
||||
static uint16_t debouncing_time;
|
||||
static bool debouncing = false;
|
||||
|
||||
|
||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
static void init_rows(void);
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||
static void unselect_cols(void);
|
||||
static void select_col(uint8_t col);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void) {
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void) {
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
unselect_cols();
|
||||
init_rows();
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
// Set col, read rows
|
||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||
bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col);
|
||||
if (matrix_changed) {
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
}
|
||||
|
||||
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = matrix_debouncing[i];
|
||||
}
|
||||
debouncing = false;
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print("\nr/c 0123456789ABCDEFGHIJKLMNOPQRSTUV \n");
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
print_bin_reverse32(matrix_get_row(row));
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += bitpop32(matrix[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||
{
|
||||
bool matrix_changed = false;
|
||||
|
||||
// Select col and wait for col selecton to stabilize
|
||||
select_col(current_col);
|
||||
wait_us(30);
|
||||
|
||||
// For each row...
|
||||
for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++)
|
||||
{
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[row_index];
|
||||
|
||||
// Check row pin state
|
||||
// Use the otherwise unused row: 3, col: 0 for caps lock
|
||||
if (row_index == 2 && current_col == 2) {
|
||||
// Pin E2 uses active low
|
||||
if ((_SFR_IO8(E2 >> 4) & _BV(E2 & 0xF)) == 0)
|
||||
{
|
||||
// Pin LO, set col bit
|
||||
current_matrix[row_index] |= (COL_SHIFTER << current_col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)))
|
||||
{
|
||||
// Pin HI, set col bit
|
||||
current_matrix[row_index] |= (COL_SHIFTER << current_col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pin LO, clear col bit
|
||||
current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
|
||||
}
|
||||
}
|
||||
|
||||
// Determine if the matrix changed state
|
||||
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
|
||||
{
|
||||
matrix_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect cols
|
||||
unselect_cols();
|
||||
|
||||
return matrix_changed;
|
||||
}
|
||||
|
||||
/* Row pin configuration
|
||||
* row: 0 1 2 3 4
|
||||
* pin: D0 D1 D2 D3 D5
|
||||
*
|
||||
* Caps lock uses its own pin E2
|
||||
*/
|
||||
static void init_rows(void) {
|
||||
DDRD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // IN
|
||||
PORTD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // LO
|
||||
|
||||
DDRE &= ~(1<<2); // IN
|
||||
PORTE |= (1<<2); // HI
|
||||
}
|
||||
|
||||
/* Columns 0 - 16
|
||||
* col 0: B5
|
||||
* col 1: B6
|
||||
* These columns use a 74HC237D 3 to 8 bit demultiplexer.
|
||||
* A B C GL1
|
||||
* col / pin: PF0 PF1 PC7 PC6
|
||||
* 2: 0 0 0 1
|
||||
* 3: 1 0 0 1
|
||||
* 4: 0 1 0 1
|
||||
* 5: 1 1 0 1
|
||||
* 6: 0 0 1 1
|
||||
* 7: 1 0 1 1
|
||||
* 8: 0 1 1 1
|
||||
* 9: 1 1 1 1
|
||||
* col 10: E6
|
||||
* col 11: B0
|
||||
* col 12: B7
|
||||
* col 13: D4
|
||||
* col 14: D6
|
||||
* col 15: D7
|
||||
* col 16: B4
|
||||
*/
|
||||
static void unselect_cols(void) {
|
||||
DDRB |= (1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4); // OUT
|
||||
PORTB &= ~((1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4)); // LO
|
||||
|
||||
DDRD |= (1<<4) | (1<<6) | (1<<7); // OUT
|
||||
PORTD &= ~((1<<4) | (1<<6) | (1<<7)); // LO
|
||||
|
||||
DDRE |= (1<<6); // OUT
|
||||
PORTE &= ~((1<<6)); // LO
|
||||
|
||||
DDRF |= (1<<0) | (1<<1); // OUT
|
||||
PORTF &= ~((1<<0) | (1<<1)); // LO
|
||||
|
||||
DDRC |= (1<<7) | (1<<6); // OUT
|
||||
PORTC &= ~((1<<7) | (1<<6)); // LO
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col)
|
||||
{
|
||||
switch (col) {
|
||||
case 0:
|
||||
PORTB |= (1<<5); // HI
|
||||
break;
|
||||
case 1:
|
||||
PORTB |= (1<<6); // HI
|
||||
break;
|
||||
case 2:
|
||||
PORTC |= (1<<6); // HI
|
||||
break;
|
||||
case 3:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<0); // HI
|
||||
break;
|
||||
case 4:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<1); // HI
|
||||
break;
|
||||
case 5:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<0); // HI
|
||||
PORTF |= (1<<1); // HI
|
||||
break;
|
||||
case 6:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTC |= (1<<7); // HI
|
||||
break;
|
||||
case 7:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<0); // HI
|
||||
PORTC |= (1<<7); // HI
|
||||
break;
|
||||
case 8:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<1); // HI
|
||||
PORTC |= (1<<7); // HI
|
||||
break;
|
||||
case 9:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<0); // HI
|
||||
PORTF |= (1<<1); // HI
|
||||
PORTC |= (1<<7); // HI
|
||||
break;
|
||||
case 10:
|
||||
PORTE |= (1<<6); // HI
|
||||
break;
|
||||
case 11:
|
||||
PORTB |= (1<<0); // HI
|
||||
break;
|
||||
case 12:
|
||||
PORTB |= (1<<7); // HI
|
||||
break;
|
||||
case 13:
|
||||
PORTD |= (1<<4); // HI
|
||||
break;
|
||||
case 14:
|
||||
PORTD |= (1<<6); // HI
|
||||
break;
|
||||
case 15:
|
||||
PORTD |= (1<<7); // HI
|
||||
break;
|
||||
case 16:
|
||||
PORTB |= (1<<4); // HI
|
||||
break;
|
||||
}
|
||||
}
|
||||
13
keyboards/kmini/readme.md
Executable file
13
keyboards/kmini/readme.md
Executable file
@@ -0,0 +1,13 @@
|
||||
Kmini keyboard firmware
|
||||
======================
|
||||
|
||||
The Revo Kmini is a 65% keyboard with an additional two columns on the left. It is programmed with the 'KMAC key map', which only works on Windows and according to a [user](https://www.keebtalk.com/t/programming-revo-kmini/2107/7) it cannot map media controls or change the capslock key.
|
||||
|
||||
## Hardware
|
||||
Columns 0, 1 and 10-16 and rows 0-4 are wired directly to the ATmega32u4, and columns 2-9 are wired to the [74HC237D demultiplexer](https://www.mouser.de/datasheet/2/916/74HC237-1319445.pdf). Capslock is on E2 and also triggers a reset if held when plugging the cable in. There are three possible places for leds, which are the capslock key and the two keys above the right arrow key. All three of them are individually controllable. The ATmega32u4 runs on an external crystal on 8mhz, so you'll have to change the bitclock on the ISP programmer if you're unable to read or write the chip.
|
||||
|
||||
## How to build
|
||||
Please read the [documentation](https://docs.qmk.fm).
|
||||
|
||||
## How to flash
|
||||
Hold the capslock key while plugging in the USB and flash the .hex file using QMK Toolbox or Atmel FLIP.
|
||||
71
keyboards/kmini/rules.mk
Executable file
71
keyboards/kmini/rules.mk
Executable file
@@ -0,0 +1,71 @@
|
||||
# Project specific files
|
||||
SRC = matrix.c
|
||||
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 8000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
@@ -47,37 +47,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRC |= (1 << 6); PORTC &= ~(1 << 6);
|
||||
} else {
|
||||
DDRC &= ~(1 << 6); PORTC &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRC |= (1 << 7); PORTC &= ~(1 << 7);
|
||||
} else {
|
||||
DDRC &= ~(1 << 7); PORTC &= ~(1 << 7);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Layer 0, default layer
|
||||
@@ -84,37 +82,3 @@ void matrix_scan_user(void) {
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRC |= (1 << 6); PORTC &= ~(1 << 6);
|
||||
} else {
|
||||
DDRC &= ~(1 << 6); PORTC &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRC |= (1 << 7); PORTC &= ~(1 << 7);
|
||||
} else {
|
||||
DDRC &= ~(1 << 7); PORTC &= ~(1 << 7);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1 +1,22 @@
|
||||
#include "melody96.h"
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRC |= (1 << 6); PORTC &= ~(1 << 6);
|
||||
} else {
|
||||
DDRC &= ~(1 << 6); PORTC &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRC |= (1 << 7); PORTC &= ~(1 << 7);
|
||||
} else {
|
||||
DDRC &= ~(1 << 7); PORTC &= ~(1 << 7);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,12 @@
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// I use a pro micro clocked at 8Mhz. It can't reach 1M baud, so this is the
|
||||
// next fastest possible baud without errors. I don't notice any difference in
|
||||
// behavior at this slower speed. (So I think it should maybe be the default,
|
||||
// to allow a single codebase to support both available flavors of pro micro.)
|
||||
// This requires a corresponding change to the wireless module firmware; see
|
||||
// https://github.com/reversebias/mitosis/pull/10
|
||||
#undef SERIAL_UART_BAUD // avoids redefinition warning
|
||||
#define SERIAL_UART_BAUD 250000
|
||||
// I want to place an underscore as tap behavior on the right shift key. But
|
||||
// RSFT_T(KC_UNDS) doesn't work; mod-tap doesn't work with pre-shifted keys. So
|
||||
// instead we take advantage of Space Cadet Shift that does something similar
|
||||
// and just tweak it to use the -_ key instead of 0) See
|
||||
// https://github.com/qmk/qmk_firmware/pull/2055
|
||||
#define RSPC_KEY KC_MINS
|
||||
|
||||
// TODO: figure out which of these I can safely enable to reduce firmware size.
|
||||
//#define NO_ACTION_LAYER
|
||||
@@ -19,4 +17,16 @@
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#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) \
|
||||
}
|
||||
#define AUDIO_VOICES
|
||||
#define AUDIO_CLICKY
|
||||
#define C6_AUDIO
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
|
||||
enum mitosis_layers
|
||||
{
|
||||
@@ -10,57 +13,53 @@ enum mitosis_layers
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define XXXXXXX KC_NO // No-op (no key in this location on Mitosis' fake matrix)
|
||||
#define _______ KC_TRNS // Transparent, because I haven't decided a mapping yet
|
||||
#define KC_LMTA KC_LALT // For fun, name the mods like the space cadet keyboard does
|
||||
#define KC_RMTA KC_RALT // META
|
||||
#define KC_LSUP KC_LGUI // SUPER
|
||||
#define KC_RSUP KC_RGUI //
|
||||
#define KC_RHYP KC_INT4 // HYPER (actually muhenkan 無変換 and henkan 変換)
|
||||
#define KC_LHYP KC_INT5 // or NFER/XFER.
|
||||
#define _______ KC_TRNS // Transparent
|
||||
|
||||
// I don't use Japanese myself, but I've placed henkan 変換 and muhenkan 無変換
|
||||
// in my layout to act as left and right HYPER
|
||||
|
||||
// Momentary tri-state layers. Mitosis default keymap does this too but employs
|
||||
// new keymappings and a bunch of conditional code. This simpler keymap
|
||||
// accomplishes it, but with a small quirk: triggering both layers then
|
||||
// releasing one out-of-order will leave the tri-state triggered until the
|
||||
// other is released. Which doesn't bother me.
|
||||
// accomplishes it but with a small quirk: triggering both layers then releasing
|
||||
// one out-of-order will leave the tri-state triggered until the other is
|
||||
// released. Which doesn't bother me.
|
||||
|
||||
// The weird /*,*/ comments are a hack to get slightly better automatic
|
||||
// tabulation in my editor.
|
||||
|
||||
// We use Space Cadet KC_RSPC to get _ on right shift. See config.h for details.
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_xQ] = LAYOUT(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT,
|
||||
KC_LSUP, KC_LCTL, MO(_xN), SFT_T(KC_TAB), KC_RSFT, MO(_xN), KC_RCTL, KC_RSUP,
|
||||
KC_LHYP, KC_LMTA, MO(_xS), KC_BSPC, KC_SPC, MO(_xS), KC_RMTA, KC_RHYP
|
||||
),
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ KC_LGUI, KC_LCTL, MO(_xS), KC_TAB, KC_SPC, MO(_xS), KC_RCTL, KC_RGUI,
|
||||
/*, */ KC_HENK, KC_LALT, MO(_xN), KC_LSFT, KC_RSPC, MO(_xN), KC_RALT, KC_MHEN),
|
||||
[_xW] = LAYOUT(
|
||||
KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,
|
||||
KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I,
|
||||
KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,
|
||||
KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I,
|
||||
KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_xS] = LAYOUT(
|
||||
KC_ESC, _______, KC_UP, _______, _______, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TILD,
|
||||
KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CIRC, KC_AMPR, KC_PIPE, KC_GRV, KC_UNDS,
|
||||
KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_RABK, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH,
|
||||
_______, _______, MO(_xF), _______, _______, MO(_xF), _______, _______,
|
||||
_______, _______, _______, KC_DEL, KC_ENT, _______, _______, _______
|
||||
),
|
||||
KC_ESC, KC_GRV , KC_UP, KC_EQL , KC_TILD, KC_PLUS, KC_CIRC, KC_AMPR, KC_PERC, KC_MINS,
|
||||
KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PIPE, KC_AT, KC_DLR, KC_HASH, KC_ENT,
|
||||
KC_BSLS, KC_LABK, KC_LCBR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RCBR, KC_RPRN, KC_RABK, KC_SLSH,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, MO(_xF), _______, _______, MO(_xF), _______, _______),
|
||||
[_xN] = LAYOUT(
|
||||
_______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_P0,
|
||||
_______, _______, _______, _______, _______, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
_______, _______, _______, _______, _______, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PEQL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, MO(_xF), _______, KC_PENT, MO(_xF), _______, _______
|
||||
),
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_PPLS, KC_7, KC_8, KC_9, KC_PMNS,
|
||||
_______, KC_F4, KC_F5, KC_F6, KC_F11, KC_NLCK, KC_4, KC_5, KC_6, KC_PENT,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F12, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS,
|
||||
/*, */ _______, _______, MO(_xF), _______, _______, MO(_xF), KC_0, KC_PDOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_xF] = LAYOUT(
|
||||
_______, _______, KC_PGUP, _______, KC_VOLU, KC_F13, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
_______, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_F14, KC_F4, KC_F5, KC_F6, KC_F11,
|
||||
TG(_xW), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_F15, KC_F1, KC_F2, KC_F3, KC_F12,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
RESET, KC_INS, KC_PGUP, KC_DEL, KC_VOLU, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||
CK_TOGG, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_NLCK, KC_P4, KC_P5, KC_P6, KC_PENT,
|
||||
TG(_xW), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS,
|
||||
/*, */ CK_UP, MU_TOG, _______, _______, _______, _______, KC_P0, KC_PDOT,
|
||||
/*, */ CK_DOWN, MU_MOD, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS),
|
||||
};
|
||||
|
||||
// This is a hack to place <question mark> on <shift-comma> and <exclaimation
|
||||
@@ -105,6 +104,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_fnpc[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_fnmac[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Set the bits of A selected by MASK to the corresponding bits of B
|
||||
#define setbits(A, B, MASK) A = (A & (B | ~MASK)) | (B & MASK)
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||

|
||||
|
||||
[Keyboard layout editor source](http://www.keyboard-layout-editor.com/#/gists/9cf33be8a8e773647cfa44a0dbc44b31)
|
||||
|
||||
# a layout for the Mitosis
|
||||
|
||||
- Emphasis on momentary modifiers, all usable from either hand, arranged
|
||||
symmetrically, but distinguishable left/right by the OS. Shift, Red
|
||||
("Lower"), Blue ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper.
|
||||
- Emphasis on momentary modifiers, all usable from either hand, arranged symmetrically, but left/right distinguishable by the OS.
|
||||
Shift, Red ("Lower"), Blue ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper (actually Henkan/Muhenkan).
|
||||
I'm going for a [Space Cadet](https://en.wikipedia.org/wiki/Space-cadet_keyboard) aesthetic;
|
||||
I want a keyboard that can (even just in theory) make use of all the bucky bits my operating system can support.
|
||||
|
||||
- Red and Blue are used to momentary-enable (like a shift key) one of three layers:
|
||||
|
||||
@@ -14,80 +11,211 @@
|
||||
- Blue: Numbers layer
|
||||
- "Purple" (both Red and Blue): Functions layer
|
||||
|
||||
- The base layer is QWERTY. A slight variant of [Workman][] may be toggled-on.
|
||||
- The base layer is QWERTY.
|
||||
A slight variant of [Workman][] may be toggled using `Red`+`Blue`+`Z`.
|
||||
|
||||
- Emphasis on minimizing hand travel, so as not to lose orientation with
|
||||
homerow.
|
||||
|
||||
- Paired programming symbols (braces, brackets, parentheses) are arranged
|
||||
symmetrically in the symbols layer.
|
||||
- Minimize hand travel, so as not to lose orientation with home row.
|
||||
|
||||
- `?` and `!` are moved to take the place of `<` and `>`. Rationale: unmodded
|
||||
and shifted keys should be for prose, while symbols useful for programming
|
||||
should be colocated on their own layer.
|
||||
|
||||
- No OS keymap modification required.
|
||||
- Key positions chosen for mnemonics.
|
||||
For example, you can distinguish between alphanumeric numerals and keypad numerals, but they occupy the same key positions.
|
||||
|
||||
## Layout Images
|
||||
|
||||

|
||||
|
||||
Base layer. Notes:
|
||||
- customized comma and period, which have exclamation point and question mark on their shift layer.
|
||||
- tap right-shift for underscore
|
||||
|
||||

|
||||
|
||||
Red layer. Intended for common navigation and programming symbols. Notes:
|
||||
- symmetric layout of paired braces/brackets/slashes for easier memorization
|
||||
- arrows placed directly on home position
|
||||
|
||||

|
||||
|
||||
Blue layer. Intended for "number pad." Notes:
|
||||
- Keycodes generated for numbers, enter key, and mathematical symbols are from the alphanumeric keys, not keypad. This way they are not influenced by the state of Num Lock. If you want to send the keypad equivalents, just use Red and Blue modifiers simultaneously.
|
||||
|
||||

|
||||
|
||||
Purple (Red+Blue) layer. Intended for "true keypad" and various functions. Notes:
|
||||
- Numbers on this layer send Keypad codes, so the result will be affected by the state of Num Lock.
|
||||
- "Switch Layout" toggles the alphabet keys between QWERTY and Workman
|
||||
- Page Up / Page Down / Home / End are placed on similar arrows
|
||||
- To press Print Screen it is necessary to use the left-side Red and Blue modifiers.
|
||||
|
||||
Keyboard layout editor sources:
|
||||
[base](http://www.keyboard-layout-editor.com/#/gists/bc2d06a3203d1bc3a14ed2245cf39643)
|
||||
[red](http://www.keyboard-layout-editor.com/#/gists/dbbf65f726a5522824b75117a62a321e)
|
||||
[blue](http://www.keyboard-layout-editor.com/#/gists/240e807f3d7e1d3ddabe1b69ee675048)
|
||||
[purple](http://www.keyboard-layout-editor.com/#/gists/9559f0f8bb1ee47677c8f2b4d766829d)
|
||||
|
||||
[Imgur album](https://imgur.com/a/KSoVgPx)
|
||||
|
||||
## Design notes
|
||||
|
||||
- **I use an 8Mhz Pro Micro.** If you want to use this keymap with the standard
|
||||
16Mhz Pro Micro specified in the Mitosis design:
|
||||
### Workman layout
|
||||
|
||||
- Remove the lines in `rules.mk` mentioning `F_CPU` and `F_USB`.
|
||||
- Remove the lines in `config.h` mentioning `SERIAL_UART_BAUD`.
|
||||
- I'm learning a new physical key placement, so I might as well go all-out and
|
||||
use an optimal non-QWERTY layout.
|
||||
|
||||
- Workman layout
|
||||
- I like the way Workman feels and some of its advantages over Colemak.
|
||||
Unfortunately, it was designed using a weighting system based on a standard
|
||||
column-staggered keyboard so is probably not as optimal as one could achieve
|
||||
on an ergonomic board like the Mitosis. Maybe run an optimizer routine after I
|
||||
determine good values for key difficulty on the Mitosis.
|
||||
|
||||
- I'm learning a new physical key placement, so I might as well go all out
|
||||
and use an optimal non-QWERTY layout.
|
||||
### 8Mhz Pro Micro
|
||||
|
||||
- I like the way Workman feels and some of its advantages over Colemak.
|
||||
Unfortunately, it was designed using a weighting system based on a
|
||||
standard column-staggered keyboard so is probably not as optimal as one
|
||||
could achieve on an ergonomic board like the Mitosis. Maybe run an
|
||||
optimizer routine after I determine good values for key difficulty on the
|
||||
Mitosis.
|
||||
- I (used to) use a 3.3v Pro Micro clocked at 8Mhz rather than the 5v 16Mhz specified in the Mitosis design.
|
||||
That can't communicate with the connected wireless module at the default speed of 1M baud.
|
||||
The next fastest baudrate that works without errors is 250k baud.
|
||||
So if you want to do the same:
|
||||
|
||||
- Arrows in the home position (on a layer). Mod+Arrows = PgUp/PgDn/Home/End,
|
||||
which is intuitive for me
|
||||
- Set the Pro Micro clock rate correctly in `rules.mk`:
|
||||
```
|
||||
F_CPU = 800000
|
||||
```
|
||||
- Configure it to communicate at 250k baud in `config.h`:
|
||||
```
|
||||
#undef SERIAL_UART_BAUD // avoids redefinition warning
|
||||
#define SERIAL_UART_BAUD 250000
|
||||
```
|
||||
- Configure the receiver's wireless module to communicate at 250k baud in `main.c`. See https://github.com/reversebias/mitosis/pull/10
|
||||
```
|
||||
- UART_BAUDRATE_BAUDRATE_Baud1M
|
||||
+ UART_BAUDRATE_BAUDRATE_Baud250000
|
||||
```
|
||||
|
||||
- I use tab all the time for autocompletion. To allow it to live on the base
|
||||
layer it is now Mod-Tapped with left shift.
|
||||
### Layout mnemonics
|
||||
|
||||
- Paired programming symbols (braces, brackets, parentheses) are arranged symmetrically in the Red layer.
|
||||
|
||||
- Arrow keys are in the home position on the Red layer.
|
||||
|
||||
- Blue+Arrows = PgUp/PgDn/Home/End, which is intuitive for me.
|
||||
|
||||
- The number pad: I placed the ten-key number pad on the Blue layer.
|
||||
However, this would do the wrong thing when Num Lock was not enabled.
|
||||
Rather than attempt to manage the state of Num Lock, I arranged the normal number keys in a ten-key layout on the Blue layer instead.
|
||||
If you explicitly want the keypad keys, they're in the same position on the Red+Blue layer.
|
||||
|
||||
- Number-pad add, subtract, multiply, and divide are located on the same keys as alphanumeric plus, dash, asterisk, and slash, respectively.
|
||||
|
||||
- The Function-keys are arranged to mimic the order of the ten-key pad.
|
||||
|
||||
- Enter is now in a more qwerty-familiar location, and may be activated with one hand.
|
||||
Numpad Enter is in the same position.
|
||||
|
||||
- Rather than place Backspace opposite Space, I intentionally place it on a layer where it takes some effort to activate.
|
||||
Backspace is one of the keys I most dislike on a QWERTY keyboard because it moves me away from homerow and I need to use it so often.
|
||||
Rather than make it easier to strike, I want to discourage myself from using it by learning to type more accurately.
|
||||
|
||||
- Why do I dislike [snake\_case](https://en.wikipedia.org/wiki/Snake_case) (`__variable_names_that_use_underscores_`)?
|
||||
Maybe because it's hard to type all those underscores requiring the shift key?
|
||||
Hypothesis: I'll be less annoyed by snake case by placing `_` at an unmodded position, right near the `space` key.
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### Current
|
||||
|
||||
- Experiment: no-modifier underscore on right shift key.
|
||||
- New combined numbers + keypad arrangement.
|
||||
No more worrying about Num Lock key.
|
||||
- Move F-keys to left board to make room.
|
||||
Calling them "the Numbers layer" and "the Functions layer" is now less accurate but the arrangement feels better.
|
||||
- Audio working!
|
||||
- Move Tab and Space to upper thumb row.
|
||||
I discarded the high-profile acrylic case from my Mitosis.
|
||||
With a low-profile case, it's easier to hit the upper row of thumb keys.
|
||||
- Discard all my `#defines` for "Meta", "Super", and "Hyper".
|
||||
I can call them that without making the code confusing to others.
|
||||
- Move Backspace to Red+A. I shouldn't be using it much anyway.
|
||||
This means Tab and Shift might as well be separate keys again.
|
||||
- Distribute paired symbols symmetrically across boards like `\<{([ ])}>/`.
|
||||
Opening-symbols on the right hand was a failed experiment.
|
||||
- Change default back to target a 16Mhz/5v Pro Micro.
|
||||
I damaged the 8Mhz Pro Micro I was using so now I'm back to using a 16mhz Pro Micro again.
|
||||
|
||||
### 0.6.1
|
||||
|
||||
- Place Tab on Shift without a modifier. We use it frequently for autocomplete.
|
||||
- Make QWERTY the default layout. So more people can try it out. My customized Workman is easily toggled-on.
|
||||
- Don't use redundant `#define` for `KC_TRNS`
|
||||
- Place Num Lock somewhere. Otherwise (if it gets turned off) we can't type any numbers!
|
||||
- Add some media keys
|
||||
|
||||
### 0.5.155
|
||||
|
||||
- Enable use with my 3.3v Pro Micro
|
||||
- Add a toggle-able QWERTY layer
|
||||
- Golf down the LED-setting code
|
||||
- Place `!` and `?` on `Shift`+`,` and `Shift`+`.`.
|
||||
- Distribute paired symbols symmetrically across boards like `\)}]> <[{(/`
|
||||
|
||||
### 0.5.129
|
||||
|
||||
- A modified Workman variant for Mitosis
|
||||
- Arrows in home position, modifier + Arrow = PgUp/PgDn/Home/End
|
||||
- Load all paired symbols onto angle-bracket keys.
|
||||
|
||||
### Abandoned ideas
|
||||
|
||||
- ~~"Since QWERTY and Workman keep angle brackets together, place other
|
||||
- "Since QWERTY and Workman keep angle brackets together, place other
|
||||
enclosing symbols on the same keys. This informs the numbers placement,
|
||||
which informs the function-key placement."~~
|
||||
which informs the function-key placement."
|
||||
|
||||
- I tried this and it was bad. I don't like having to pick the right
|
||||
modifier to get the right flavor of bracket. Instead, now, one modifier
|
||||
activates a symbols layer where all brackets are easily accessible.
|
||||
|
||||
- Space/Enter to the left of layer select for Enter doesn't work well; I always
|
||||
trigger space first when mashing the keys simultaneously. This might not
|
||||
continue to be true if I change the angle at which I strike the keys e.g.
|
||||
with a neoprene base or a wrist support.
|
||||
- Space/Enter to the left of layer select for Enter
|
||||
|
||||
- Doesn't work well; I always trigger space first when mashing the keys
|
||||
simultaneously. ~~This might not continue to be true if I change the angle
|
||||
at which I strike the keys e.g. with a neoprene base or a wrist support.~~
|
||||
Even with a wrist rest or low-profile, this is hard to do with one hand.
|
||||
Need to adjust the firmware to understand chorded thumb keys.
|
||||
|
||||
- I used to have Blue on ring finger, but that was too hard to use in
|
||||
conjunction with shift.
|
||||
|
||||
## To do
|
||||
|
||||
- Figure out where to place non-numpad numbers so we don't need num lock turned
|
||||
on to type them?
|
||||
- Improve LED indications (may require modding bluetooth firmware):
|
||||
- **Shared Layouts.**
|
||||
Figure out how to make use of QMK's common `layouts/`
|
||||
- **Chorded Combos.**
|
||||
Since the thumb keys are arranged such that it's easy to smash pairs of keys with just one thumb, figure out how to enable chording.
|
||||
For example, a single-finger Shift+Space or Red+Space that doesn't do the wrong thing if Space happens to trigger first.
|
||||
- Improve **LED indications** (may require modding bluetooth firmware):
|
||||
- Num Lock status
|
||||
- Is any board nonresponsive (which one?)
|
||||
- Does either board have a low battery?
|
||||
- Add Insert, PrintScr, Pause/Break
|
||||
- ~~Make QWERTY base layer for people who customize layout in software?~~ I
|
||||
default to QWERTY now.
|
||||
- **Num Lock management.**
|
||||
Num lock currently occupies prime real estate, but I never use it except to fix it when it's wrong.
|
||||
Do any of my applications use it?
|
||||
Should I have the firmware ensure it is set how I want it?
|
||||
Maybe cause it to be momentary active with Blue?
|
||||
See [@drashna's comment](https://github.com/qmk/qmk_firmware/pull/2366#issuecomment-404951953)
|
||||
- Store default base layer in eeprom?
|
||||
- See if the henkan/muhenkan placement is at all useful for Japanese speakers,
|
||||
or abuse different keysyms for Left/Right Hyper. (Original space cadet used
|
||||
scancodes 145/175. 145 is LANG2, 175 is "reserved" in USB HID spec.)
|
||||
- Mod a buzzer onto my receiver and enable tones
|
||||
- Implement "layer lock" key
|
||||
- Improve tri-layer behavior
|
||||
- Find a better location for PrintScr/SysRq, Scroll Lock, Pause/Break, Caps Lock.
|
||||
- ~~Figure out where to place non-numpad numbers so we don't need num lock turned
|
||||
on to type them?~~
|
||||
- ~~Add Insert, PrintScr, Pause/Break~~
|
||||
- ~~Make QWERTY base layer for people who customize layout in software?~~
|
||||
I default to QWERTY now.
|
||||
- ~~Mod a buzzer onto my receiver and enable tones~~ Easy and works!
|
||||
|
||||
[Workman]: https://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
# I use an 8Mhz Pro Micro
|
||||
F_CPU = 8000000
|
||||
# Necessary, with above change?
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
AUDIO_ENABLE = yes # audio output
|
||||
FAUXCLICKY_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# AJP10304 Custom Planck Layout
|
||||
# Also available for the JJ40
|
||||
# Also available for the Atreus50 and JJ40
|
||||
|
||||
**Note:** In the tables below where there are two characters on a key,
|
||||
the second is the output when shift is applied.
|
||||
|
||||
47
keyboards/planck/keymaps/andylikescandy/config.h
Normal file
47
keyboards/planck/keymaps/andylikescandy/config.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#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)
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
288
keyboards/planck/keymaps/andylikescandy/keymap.c
Normal file
288
keyboards/planck/keymaps/andylikescandy/keymap.c
Normal file
@@ -0,0 +1,288 @@
|
||||
/* 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 "planck.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PLOVER,
|
||||
_ADJUST,
|
||||
_NAVIGATION
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
BACKLIT,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define _NAVIGATION 8
|
||||
#define NAVL MO(_NAVIGATION)
|
||||
#define NAVSPC LT( 8, KC_SPC)
|
||||
//#define SHFTENT SHFT_T(KC_ENT)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | CS | Alt | GUI |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},
|
||||
{KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
|
||||
{KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |SftEnt|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{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_ESC, 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, SFT_T(KC_ENT) },
|
||||
{KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Dvorak REUSED AS COLEMAK
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = {
|
||||
{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_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT},
|
||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT) },
|
||||
{KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
// /* Dvorak
|
||||
// * ,-----------------------------------------------------------------------------------.
|
||||
// * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
// * |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
// * | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
// * |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
// * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
// * |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
// * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
// * `-----------------------------------------------------------------------------------'
|
||||
// */
|
||||
// [_DVORAK] = {
|
||||
// {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_ESC, 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_ENT },
|
||||
// {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, NAVSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
// },
|
||||
//
|
||||
// /* Lower
|
||||
// * ,-----------------------------------------------------------------------------------.
|
||||
// * | ~ | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | { | } | Bksp |
|
||||
// * |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
// * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | |
|
||||
// * |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
// * | |Ctl+z |Ctl+x |Ctl+c |Ctl+v | | | | | | |Enter |
|
||||
// * |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
// * | | | | | | | | HOME | PGDN | PGUP | END |
|
||||
// * `-----------------------------------------------------------------------------------'
|
||||
// */
|
||||
[_LOWER] = {
|
||||
{ KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC },
|
||||
{ KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE },
|
||||
{ _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, KC_ENT },
|
||||
{ _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END }
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | HOME | PGDN | PGUP | END |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{ KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC },
|
||||
{ KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT },
|
||||
{ _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END }
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Reset| | | | | | | | | | | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |C.A.D.| | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | CAPS | | | | | | |Insert|PntScn|Scroll|Pause | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | |Qwerty|Colemk|Dvorak|Plover|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
|
||||
{LALT(LCTL(KC_DEL)), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||
{KC_CAPSLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, XXXXXXX} //PLOVER}
|
||||
},
|
||||
/* Navigation
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | Home | PgDn | PgUp | End |ctlBsp|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del |Ctl+A | |Shift | Ctrl | | | Left | Down | Up |Right | Del |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | C+S |Ctl+z |Ctl+x |Ctl+c |Ctl+v | | | |Shift |Shift |Shift |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |C+A+S | | | | | | |C+Left|C+Down| C+Up |C+Right|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NAVIGATION] = {
|
||||
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) },
|
||||
{KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL},
|
||||
{LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT},
|
||||
{_______, _______, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT), _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
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 DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
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;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(plover_song);
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(plover_gb_song);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
2
keyboards/planck/keymaps/andylikescandy/readme.md
Normal file
2
keyboards/planck/keymaps/andylikescandy/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# The Default Planck Layout
|
||||
|
||||
0
keyboards/planck/keymaps/andylikescandy/rules.mk
Normal file
0
keyboards/planck/keymaps/andylikescandy/rules.mk
Normal file
@@ -6,8 +6,8 @@ extern keymap_config_t keymap_config;
|
||||
#define G(X) LGUI(X)
|
||||
#define A(X) LALT(X)
|
||||
#define C(X) LCTL(X)
|
||||
#define GC(X) G(C(X))
|
||||
#define GAC(X) G(A(C(X)))
|
||||
#define AC(X) A(C(X))
|
||||
#define SC(X) S(C(X))
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
@@ -16,242 +16,249 @@ enum planck_layers {
|
||||
_QWERTY,
|
||||
_SYMB,
|
||||
_MOVE,
|
||||
_FUNC
|
||||
_FUNC,
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
SYMB,
|
||||
MOVE,
|
||||
FUNC
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
SYMB,
|
||||
MOVE,
|
||||
FUNC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* COLEMAK
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Bksp | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Shift| Z | X | C | V | B | K | M | , | . | / |Shift|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Func |Super| Alt |Ctrl |Symb |Enter|Space|Move |Ctrl | Alt |Super|Func |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{
|
||||
KC_TAB, KC_Q, KC_W, KC_F,
|
||||
KC_P, KC_G, KC_J, KC_L,
|
||||
KC_U, KC_Y, KC_SCLN, KC_MINS
|
||||
},
|
||||
{
|
||||
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
|
||||
},
|
||||
{
|
||||
FUNC, KC_LGUI, KC_LALT, KC_LCTL,
|
||||
SYMB, KC_ENT, KC_SPC, MOVE,
|
||||
KC_RCTL, KC_RALT, KC_RGUI, FUNC
|
||||
}
|
||||
},
|
||||
/* COLEMAK
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Bksp | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Shift| Z | X | C | V | B | K | M | , | . | / |Shift|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{
|
||||
KC_TAB, KC_Q, KC_W, KC_F,
|
||||
KC_P, KC_G, KC_J, KC_L,
|
||||
KC_U, KC_Y, KC_SCLN, KC_MINS
|
||||
},
|
||||
{
|
||||
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
|
||||
},
|
||||
{
|
||||
FUNC, KC_LCTL, KC_LALT, KC_LGUI,
|
||||
SYMB, KC_ENT, KC_SPC, MOVE,
|
||||
KC_RGUI, KC_RALT, KC_RCTL, FUNC
|
||||
}
|
||||
},
|
||||
|
||||
/* QWERTY
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | Q | W | E | R | T | Y | U | I | O | P | - |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Bksp | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Shift| Z | X | C | V | B | N | M | , | . | / |Shift|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Func |Super| Alt |Ctrl |Symb |Enter|Space|Move |Ctrl | Alt |Super|Func |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{
|
||||
KC_TAB, KC_Q, KC_W, KC_E,
|
||||
KC_R, KC_T, KC_Y, KC_U,
|
||||
KC_I, KC_O, KC_P, KC_MINS
|
||||
},
|
||||
{
|
||||
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
|
||||
},
|
||||
{
|
||||
FUNC, KC_LGUI, KC_LALT, KC_LCTL,
|
||||
SYMB, KC_ENT, KC_SPC, MOVE,
|
||||
KC_RCTL, KC_RALT, KC_RGUI, FUNC
|
||||
}
|
||||
},
|
||||
/* QWERTY
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | Q | W | E | R | T | Y | U | I | O | P | - |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Bksp | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Shift| Z | X | C | V | B | N | M | , | . | / |Shift|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{
|
||||
KC_TAB, KC_Q, KC_W, KC_E,
|
||||
KC_R, KC_T, KC_Y, KC_U,
|
||||
KC_I, KC_O, KC_P, KC_MINS
|
||||
},
|
||||
{
|
||||
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
|
||||
},
|
||||
{
|
||||
FUNC, KC_LCTL, KC_LALT, KC_LGUI,
|
||||
SYMB, KC_ENT, KC_SPC, MOVE,
|
||||
KC_RGUI, KC_RALT, KC_RCTL, FUNC
|
||||
}
|
||||
},
|
||||
|
||||
/* SYMB
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYMB] = {
|
||||
{
|
||||
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_EXLM, KC_AT, KC_HASH,
|
||||
KC_DLR, KC_PERC, KC_CIRC, KC_AMPR,
|
||||
KC_ASTR, KC_LPRN, KC_RPRN, _______
|
||||
},
|
||||
{
|
||||
_______, KC_TILD, KC_GRV, KC_PLUS,
|
||||
KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC,
|
||||
KC_RBRC, KC_LCBR, KC_RCBR, _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
},
|
||||
/* SYMB
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYMB] = {
|
||||
{
|
||||
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_EXLM, KC_AT, KC_HASH,
|
||||
KC_DLR, KC_PERC, KC_CIRC, KC_AMPR,
|
||||
KC_ASTR, KC_LPRN, KC_RPRN, _______
|
||||
},
|
||||
{
|
||||
_______, KC_TILD, KC_GRV, KC_PLUS,
|
||||
KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC,
|
||||
KC_RBRC, KC_LCBR, KC_RCBR, _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
},
|
||||
|
||||
/* MOVE
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | | | | | | |Home | Up | End | | Esc |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | |Left |Down |Right|Caps | Del |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | |PgDn |PgUp | | | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_MOVE] = {
|
||||
{
|
||||
GC(KC_UP), GAC(KC_1), G(KC_6), G(KC_5),
|
||||
G(KC_4), GAC(KC_UP), GAC(KC_RGHT), KC_HOME,
|
||||
KC_UP, KC_END, C(KC_SPC), KC_ESC
|
||||
},
|
||||
{
|
||||
GC(KC_DOWN), GAC(KC_2), G(KC_3), G(KC_2),
|
||||
G(KC_1), G(KC_F), G(KC_C), KC_LEFT,
|
||||
KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL
|
||||
},
|
||||
{
|
||||
_______, GAC(KC_3), G(KC_9), G(KC_8),
|
||||
G(KC_7), GAC(KC_LEFT), GAC(KC_DOWN), KC_PGDN,
|
||||
KC_PGUP, GC(KC_LEFT), GC(KC_RGHT), _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
},
|
||||
|
||||
/* FUNC
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |VolUp|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | F21 | F22 | F23 | F24 | | | | |Clmak|Qwrty| |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | |Prev |Mute |Play |Next | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = {
|
||||
{
|
||||
RESET, KC_F1, KC_F2, KC_F3,
|
||||
KC_F4, KC_F5, KC_F6, KC_F7,
|
||||
KC_F8, KC_F9, KC_F10, KC_VOLU
|
||||
},
|
||||
{
|
||||
KC_POWER, KC_F11, KC_F12, KC_F13,
|
||||
KC_F14, KC_F15, KC_F16, KC_F17,
|
||||
KC_F18, KC_F19, KC_F20, KC_VOLD
|
||||
},
|
||||
{
|
||||
_______, KC_F21, KC_F22, KC_F23,
|
||||
KC_F24, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, COLEMAK, QWERTY, _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
}
|
||||
/* MOVE
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | | | | | | |Home | Up | End | | Esc |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | |Left |Down |Right|Caps | Del |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | |PgDn |PgUp |TabL |TabR | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_MOVE] = {
|
||||
{
|
||||
AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D),
|
||||
AC(KC_E), AC(KC_F), XXXXXXX, KC_HOME,
|
||||
KC_UP, KC_END, XXXXXXX, KC_ESC
|
||||
},
|
||||
{
|
||||
AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J),
|
||||
AC(KC_K), AC(KC_L), XXXXXXX, KC_LEFT,
|
||||
KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL
|
||||
},
|
||||
{
|
||||
_______, AC(KC_M), AC(KC_N), AC(KC_O),
|
||||
AC(KC_P), AC(KC_Q), XXXXXXX, KC_PGDN,
|
||||
KC_PGUP, SC(KC_TAB), C(KC_TAB), _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
},
|
||||
|
||||
/* FUNC
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |VolUp|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | F21 | F22 | F23 | F24 | | | | |Clmak|Qwrty| |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | |Prev |Mute |Play |Next | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = {
|
||||
{
|
||||
RESET, KC_F1, KC_F2, KC_F3,
|
||||
KC_F4, KC_F5, KC_F6, KC_F7,
|
||||
KC_F8, KC_F9, KC_F10, KC_VOLU
|
||||
},
|
||||
{
|
||||
KC_POWER, KC_F11, KC_F12, KC_F13,
|
||||
KC_F14, KC_F15, KC_F16, KC_F17,
|
||||
KC_F18, KC_F19, KC_F20, KC_VOLD
|
||||
},
|
||||
{
|
||||
_______, KC_F21, KC_F22, KC_F23,
|
||||
KC_F24, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, COLEMAK, QWERTY, _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float colemak_song[][2] = SONG(COLEMAK_SOUND);
|
||||
float qwerty_song[][2] = SONG(QWERTY_SOUND);
|
||||
float colemak_song[][2] = SONG(COLEMAK_SOUND);
|
||||
float qwerty_song[][2] = SONG(QWERTY_SOUND);
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(colemak_song);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(qwerty_song);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case SYMB:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_SYMB);
|
||||
} else {
|
||||
layer_off(_SYMB);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MOVE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MOVE);
|
||||
} else {
|
||||
layer_off(_MOVE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
void set_colemak(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(colemak_song);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
|
||||
void set_qwerty(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(qwerty_song);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_colemak();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_qwerty();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case SYMB:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_SYMB);
|
||||
} else {
|
||||
layer_off(_SYMB);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MOVE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MOVE);
|
||||
} else {
|
||||
layer_off(_MOVE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
189
keyboards/rama/m10_b/config.h
Normal file
189
keyboards/rama/m10_b/config.h
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
Copyright 2018 Wilba
|
||||
|
||||
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 0x5241 // "RW"
|
||||
#define PRODUCT_ID 0x00AB // 10-B
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER RAMA.WORKS
|
||||
#define PRODUCT RAMA M10-B
|
||||
#define DESCRIPTION RAMA M10-B Macropad
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#define MATRIX_COLS 10
|
||||
|
||||
/*
|
||||
* 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 { E6 }
|
||||
#define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN C6
|
||||
//#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
#endif
|
||||
23
keyboards/rama/m10_b/info.json
Normal file
23
keyboards/rama/m10_b/info.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"keyboard_name": "m10-b",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 3,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{ "x": 0, "y": 0 },
|
||||
{ "x": 1, "y": 0 },
|
||||
{ "x": 2, "y": 0 },
|
||||
{ "x": 0, "y": 1 },
|
||||
{ "x": 1, "y": 1 },
|
||||
{ "x": 2, "y": 1 },
|
||||
{ "x": 0, "y": 2 },
|
||||
{ "x": 1, "y": 2 },
|
||||
{ "x": 2, "y": 2 },
|
||||
{ "x": 1, "y": 3, "w": 2.0 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
24
keyboards/rama/m10_b/keymaps/default/config.h
Normal file
24
keyboards/rama/m10_b/keymaps/default/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2018 Wilba
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
||||
26
keyboards/rama/m10_b/keymaps/default/keymap.c
Normal file
26
keyboards/rama/m10_b/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_0 )
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void matrix_init_user(void)
|
||||
{
|
||||
}
|
||||
|
||||
void matrix_scan_user(void)
|
||||
{
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
7
keyboards/rama/m10_b/keymaps/default/readme.md
Normal file
7
keyboards/rama/m10_b/keymaps/default/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||

|
||||
|
||||
# Default RAMA M10-B Layout
|
||||
|
||||
This is an example layout.
|
||||
|
||||
|
||||
24
keyboards/rama/m10_b/keymaps/knops/config.h
Normal file
24
keyboards/rama/m10_b/keymaps/knops/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2018 Wilba
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
||||
64
keyboards/rama/m10_b/keymaps/knops/keymap.c
Normal file
64
keyboards/rama/m10_b/keymaps/knops/keymap.c
Normal file
@@ -0,0 +1,64 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
/*KNOPS_MISC*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*KNOPS_LAYOUT*/
|
||||
|
||||
};
|
||||
|
||||
// M10-B LEDs are all in parallel and controlled by the QMK backlight
|
||||
// functionality. LED functions here are for possible future use
|
||||
// as layer indicators, etc. and not implemented yet.
|
||||
//
|
||||
// To implement LED functions here, QMK backlight functionality
|
||||
// will need to be disabled either via rules.mk or config.h
|
||||
// or overriding the backlight functions to do nothing.
|
||||
//
|
||||
// LEDs are driven by a transistor connected to pin C6.
|
||||
//
|
||||
|
||||
void set_led_state(int ledId, bool state)
|
||||
{
|
||||
}
|
||||
|
||||
void led_init_ports()
|
||||
{
|
||||
}
|
||||
|
||||
void led_set_layer(int layer)
|
||||
{
|
||||
led_init_ports();
|
||||
|
||||
led_set_layer(0);
|
||||
|
||||
/*KNOPS_SIMPLELED_STATES*/
|
||||
}
|
||||
|
||||
void matrix_init_user(void)
|
||||
{
|
||||
/*KNOPS_INIT*/
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
/*KNOPS_MACRO*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void)
|
||||
{
|
||||
/*KNOPS_SCAN*/
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led)
|
||||
{
|
||||
/*KNOPS_FUNCTIONALLED_STATES*/
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||
{
|
||||
/*KNOPS_PROCESS_STATE*/
|
||||
return NULL;
|
||||
}
|
||||
7
keyboards/rama/m10_b/keymaps/knops/readme.md
Normal file
7
keyboards/rama/m10_b/keymaps/knops/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||

|
||||
|
||||
# Default RAMA M10-B Layout
|
||||
|
||||
This is an example layout.
|
||||
|
||||
|
||||
44
keyboards/rama/m10_b/m10_b.c
Normal file
44
keyboards/rama/m10_b/m10_b.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/* Copyright 2018 Wilba
|
||||
*
|
||||
* 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 "m10_b.h"
|
||||
/*
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
*/
|
||||
29
keyboards/rama/m10_b/m10_b.h
Normal file
29
keyboards/rama/m10_b/m10_b.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/* Copyright 2018 Wilba
|
||||
*
|
||||
* 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 "quantum.h"
|
||||
|
||||
#ifndef RAMA_M10_B_H
|
||||
#define RAMA_M10_B_H
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 ) \
|
||||
{ \
|
||||
{K00, K01, K02, K03, K04, K05, K06, K07, K08, K09}, \
|
||||
}
|
||||
#endif // RAMA_M10_B
|
||||
15
keyboards/rama/m10_b/readme.md
Normal file
15
keyboards/rama/m10_b/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RAMA M10-B
|
||||
|
||||

|
||||
|
||||
Mechanical Mini Pad. [More info at Massdrop](https://www.massdrop.com/buy/rama-m10-a)
|
||||
|
||||
Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582)
|
||||
Hardware Supported: RAMA M10-B PCB
|
||||
Hardware Availability: [Massdrop](https://www.massdrop.com/buy/rama-m10-a)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make rama/m10_b: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.
|
||||
68
keyboards/rama/m10_b/rules.mk
Normal file
68
keyboards/rama/m10_b/rules.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# Default RAMA M6-A Layout
|
||||
|
||||
|
||||
@@ -119,8 +119,13 @@ void matrix_init(void)
|
||||
debug_matrix = true;
|
||||
debug_mouse = true;
|
||||
// initialize row and col
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
unselect_cols();
|
||||
init_rows();
|
||||
#endif
|
||||
|
||||
TX_RX_LED_INIT;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make tada68:default:bin
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||
|
||||
## Flashing Instructions
|
||||
|
||||
|
||||
21
keyboards/uk78/info.json
Normal file
21
keyboards/uk78/info.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"keyboard_name": "UK78",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 19,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"key_count": 87,
|
||||
"layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K016", "x":16, "y":0}, {"label":"K017", "x":17, "y":0}, {"label":"K018", "x":18, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K101", "x":1.5, "y":1}, {"label":"K102", "x":2.5, "y":1}, {"label":"K103", "x":3.5, "y":1}, {"label":"K104", "x":4.5, "y":1}, {"label":"K105", "x":5.5, "y":1}, {"label":"K106", "x":6.5, "y":1}, {"label":"K107", "x":7.5, "y":1}, {"label":"K108", "x":8.5, "y":1}, {"label":"K109", "x":9.5, "y":1}, {"label":"K110", "x":10.5, "y":1}, {"label":"K111", "x":11.5, "y":1}, {"label":"K112", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K115", "x":15, "y":1}, {"label":"K116", "x":16, "y":1}, {"label":"K117", "x":17, "y":1}, {"label":"K118", "x":18, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K201", "x":1.75, "y":2}, {"label":"K202", "x":2.75, "y":2}, {"label":"K203", "x":3.75, "y":2}, {"label":"K204", "x":4.75, "y":2}, {"label":"K205", "x":5.75, "y":2}, {"label":"K206", "x":6.75, "y":2}, {"label":"K207", "x":7.75, "y":2}, {"label":"K208", "x":8.75, "y":2}, {"label":"K209", "x":9.75, "y":2}, {"label":"K210", "x":10.75, "y":2}, {"label":"K211", "x":11.75, "y":2}, {"label":"K212", "x":12.75, "y":2}, {"label":"K214", "x":13.75, "y":2, "w":1.25}, {"label":"K215", "x":15, "y":2}, {"label":"K216", "x":16, "y":2}, {"label":"K217", "x":17, "y":2}, {"label":"K218", "x":18, "y":2}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K312", "x":12.25, "y":3}, {"label":"K313", "x":13.25, "y":3, "w":0.75}, {"label":"K314", "x":14, "y":3}, {"label":"K315", "x":15, "y":3}, {"label":"K316", "x":16, "y":3}, {"label":"K317", "x":17, "y":3}, {"label":"K318", "x":18, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K402", "x":2.5, "y":4, "w":1.25}, {"label":"K406", "x":3.75, "y":4, "w":6.25}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K416", "x":16, "y":4}, {"label":"K417", "x":17, "y":4}, {"label":"K418", "x":18, "y":4}]
|
||||
},
|
||||
"LAYOUT_ansi": {
|
||||
"key_count": 83,
|
||||
"layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K016", "x":16, "y":0}, {"label":"K017", "x":17, "y":0}, {"label":"K018", "x":18, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K101", "x":1.5, "y":1}, {"label":"K102", "x":2.5, "y":1}, {"label":"K103", "x":3.5, "y":1}, {"label":"K104", "x":4.5, "y":1}, {"label":"K105", "x":5.5, "y":1}, {"label":"K106", "x":6.5, "y":1}, {"label":"K107", "x":7.5, "y":1}, {"label":"K108", "x":8.5, "y":1}, {"label":"K109", "x":9.5, "y":1}, {"label":"K110", "x":10.5, "y":1}, {"label":"K111", "x":11.5, "y":1}, {"label":"K112", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K115", "x":15, "y":1}, {"label":"K116", "x":16, "y":1}, {"label":"K117", "x":17, "y":1}, {"label":"K118", "x":18, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K201", "x":1.75, "y":2}, {"label":"K202", "x":2.75, "y":2}, {"label":"K203", "x":3.75, "y":2}, {"label":"K204", "x":4.75, "y":2}, {"label":"K205", "x":5.75, "y":2}, {"label":"K206", "x":6.75, "y":2}, {"label":"K207", "x":7.75, "y":2}, {"label":"K208", "x":8.75, "y":2}, {"label":"K209", "x":9.75, "y":2}, {"label":"K210", "x":10.75, "y":2}, {"label":"K211", "x":11.75, "y":2}, {"label":"K214", "x":12.75, "y":2, "w":2.25}, {"label":"K215", "x":15, "y":2}, {"label":"K216", "x":16, "y":2}, {"label":"K217", "x":17, "y":2}, {"label":"K218", "x":18, "y":2}, {"label":"K300", "x":0, "y":3, "w":2.25}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K312", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K315", "x":15, "y":3}, {"label":"K316", "x":16, "y":3}, {"label":"K317", "x":17, "y":3}, {"label":"K318", "x":18, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K402", "x":2.5, "y":4, "w":1.25}, {"label":"K406", "x":3.75, "y":4, "w":6.25}, {"label":"K410", "x":10, "y":4, "w":1.5}, {"label":"K412", "x":11.5, "y":4, "w":1.5}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K416", "x":16, "y":4}, {"label":"K417", "x":17, "y":4}, {"label":"K418", "x":18, "y":4}]
|
||||
},
|
||||
"LAYOUT_iso": {
|
||||
"key_count": 84,
|
||||
"layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K016", "x":16, "y":0}, {"label":"K017", "x":17, "y":0}, {"label":"K018", "x":18, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K101", "x":1.5, "y":1}, {"label":"K102", "x":2.5, "y":1}, {"label":"K103", "x":3.5, "y":1}, {"label":"K104", "x":4.5, "y":1}, {"label":"K105", "x":5.5, "y":1}, {"label":"K106", "x":6.5, "y":1}, {"label":"K107", "x":7.5, "y":1}, {"label":"K108", "x":8.5, "y":1}, {"label":"K109", "x":9.5, "y":1}, {"label":"K110", "x":10.5, "y":1}, {"label":"K111", "x":11.5, "y":1}, {"label":"K112", "x":12.5, "y":1}, {"label":"K114", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"K115", "x":15, "y":1}, {"label":"K116", "x":16, "y":1}, {"label":"K117", "x":17, "y":1}, {"label":"K118", "x":18, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K201", "x":1.75, "y":2}, {"label":"K202", "x":2.75, "y":2}, {"label":"K203", "x":3.75, "y":2}, {"label":"K204", "x":4.75, "y":2}, {"label":"K205", "x":5.75, "y":2}, {"label":"K206", "x":6.75, "y":2}, {"label":"K207", "x":7.75, "y":2}, {"label":"K208", "x":8.75, "y":2}, {"label":"K209", "x":9.75, "y":2}, {"label":"K210", "x":10.75, "y":2}, {"label":"K211", "x":11.75, "y":2}, {"label":"K212", "x":12.75, "y":2}, {"label":"K215", "x":15, "y":2}, {"label":"K216", "x":16, "y":2}, {"label":"K217", "x":17, "y":2}, {"label":"K218", "x":18, "y":2}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K312", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K315", "x":15, "y":3}, {"label":"K316", "x":16, "y":3}, {"label":"K317", "x":17, "y":3}, {"label":"K318", "x":18, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K402", "x":2.5, "y":4, "w":1.25}, {"label":"K406", "x":3.75, "y":4, "w":6.25}, {"label":"K410", "x":10, "y":4, "w":1.5}, {"label":"K412", "x":11.5, "y":4, "w":1.5}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K416", "x":16, "y":4}, {"label":"K417", "x":17, "y":4}, {"label":"K418", "x":18, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
#include "uk78.h"
|
||||
|
||||
// Helpful defines
|
||||
#define _______ KC_TRNS
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// 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.
|
||||
@@ -12,63 +9,68 @@
|
||||
#define _FL2 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt | Space |Alt|Ctrl|Mo(1)|Lef|Dow| Rig| P0| P.|PEnt|
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
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_BSLS, KC_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
|
||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | |RST| | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | |Hu+|Va+|Sa+| | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | BL_Toggle | | | | |Vol-| | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL1] = 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, KC_PSCR, KC_INS, KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, 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, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL2] = KEYMAP(
|
||||
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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt | Space |Alt|Ctrl|Mo(1)|Lef|Dow| Rig| P0| P.|PEnt|
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT_all(
|
||||
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_BSLS, KC_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PEQL,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
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_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_SLCK,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | |RST| | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | |Hu+|Va+|Sa+| | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | BL_Toggle | | | | |Vol-| | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL1] = LAYOUT_all(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_NLCK, _______, _______, _______,
|
||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, _______, KC_MUTE, KC_MUTE, KC_VOLU, _______, _______, _______, _______,
|
||||
_______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL2] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
|
||||
};
|
||||
@@ -81,43 +83,40 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRA |= (1 << 3); PORTA |= (1 << 3);
|
||||
}
|
||||
else {
|
||||
DDRA &= ~(1 << 3); PORTA &= ~(1 << 3);
|
||||
}
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRA |= (1 << 3);
|
||||
PORTA |= (1 << 3);
|
||||
} else {
|
||||
DDRA &= ~(1 << 3);
|
||||
PORTA &= ~(1 << 3);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
#include "uk78.h"
|
||||
|
||||
// Helpful defines
|
||||
#define _______ KC_TRNS
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// 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.
|
||||
@@ -12,64 +9,68 @@
|
||||
#define _FL2 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |` | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|Del |NLck| P/| P*| P-|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bspc | P7| P8| P9| |
|
||||
* |--------------------------------------------------------------------------| P+|
|
||||
* | L1 | A| S| D| F| G| H| J| K| L| ;| '| Ent| P4| P5| P6| |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /| L2 | Up| P1| P2| P3| |
|
||||
* |--------------------------------------------------------------------------|PEnt|
|
||||
* |Ctrl |Alt | Space |AltGr |Win |Lef|Dow| Rig| P0| P.| |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
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_BSLS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
MO(_FL1),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FL2),MO(_FL2), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_RALT, KC_LGUI, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
|
||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |Esc|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |PgUp| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | |Home|PgDn|End | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL1] = 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_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_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_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | |RST| | | | |Prv|Ply|Nxt| | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Caps | | |uln|Hu+|Va+|Sa+| | |Vod|Vou|Mut| | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+|Stp| | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | |Menu | BL_Toggle | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL2] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_MSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_APP, KC_APP, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |` | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|Del |NLck| P/| P*| P-|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bspc | P7| P8| P9| |
|
||||
* |--------------------------------------------------------------------------| P+|
|
||||
* | L1 | A| S| D| F| G| H| J| K| L| ;| '| Ent| P4| P5| P6| |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /| L2 | Up| P1| P2| P3| |
|
||||
* |--------------------------------------------------------------------------|PEnt|
|
||||
* |Ctrl |Alt | Space |AltGr |Win |Lef|Dow| Rig| P0| P.| |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT_all(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
MO(_FL1),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FL2),MO(_FL2), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_RALT, KC_LGUI, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |Esc|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |PgUp| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | |Home|PgDn|End | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL1] = LAYOUT_all(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______
|
||||
),
|
||||
|
||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | |RST| | | | |Prv|Ply|Nxt| | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Caps | | |uln|Hu+|Va+|Sa+| | |Vod|Vou|Mut| | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+|Stp| | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | |Menu | BL_Toggle | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL2] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______,
|
||||
KC_CAPS, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_MSTP, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_APP, KC_APP, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
@@ -81,39 +82,39 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRA |= (1 << 3); PORTA |= (1 << 3);
|
||||
} else {
|
||||
DDRA &= ~(1 << 3); PORTA &= ~(1 << 3);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRA |= (1 << 3); PORTA |= (1 << 3);
|
||||
} else {
|
||||
DDRA &= ~(1 << 3); PORTA &= ~(1 << 3);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
|
||||
A fully customizable 60%+numpad keyboard.
|
||||
|
||||
* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin)
|
||||
* Hardware Supported: UK78 PCB
|
||||
* rev2
|
||||
* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/)
|
||||
Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin)
|
||||
Hardware Supported: UK78 rev2 PCB
|
||||
Hardware Availability: [ukkeyboards](http://ukkeyboards.bigcartel.com/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make uk78:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
||||
See [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.
|
||||
|
||||
@@ -3,18 +3,108 @@
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \
|
||||
K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \
|
||||
// readability
|
||||
#define ____ KC_NO
|
||||
|
||||
/* Re: Right Shift
|
||||
*
|
||||
* Per a conversation I had on reddit with Rozakiin, matrix positions K312,
|
||||
* K313 and K314 are never in use all together at the same time.
|
||||
*
|
||||
* A 2.75u-sized right Shift uses position K313, rendering K312 and K314
|
||||
* inaccessible.
|
||||
*
|
||||
* A split right Shift, in either 1.75u/1u or 1u/1.75u (JIS layout) uses
|
||||
* positions K312 and K314, rendering K313 inaccessible.
|
||||
*
|
||||
* - @noroadsleft
|
||||
* July 13, 2018
|
||||
*/
|
||||
|
||||
#define LAYOUT_all( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \
|
||||
K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, K116, K117, K118 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215, K216, K217, K218 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \
|
||||
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, K214, K215, K216, K217, K218 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \
|
||||
{ K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
/* LAYOUT_ansi
|
||||
*
|
||||
* This layout uses:
|
||||
*
|
||||
* - Split Backspace (K013 and K014)
|
||||
* - ANSI Enter (K214)
|
||||
* - ANSI 2.25u Left Shift (K300)
|
||||
* - Compact right Shift (K312 and K314)
|
||||
* - Two 1.5u modifiers (K410 and K412) between the spacebar and the Left
|
||||
* arrow key
|
||||
* ,---------------------------------------------------------------------------.
|
||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -_| =+| \||Bsp|Del|P/ |P* |P- |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [{| ]}| \||P7 |P8 |P9 |P= |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Caps | A| S| D| F| G| H| J| K| L| ;:| '"| Enter|P4 |P5 |P6 |P+ |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,<| .>| /?| Shift| Up|P1 |P2 |P3 |SLk|
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Ctrl|GUI |Alt | | Alt| Fn|Lft|Dwn|Rgh|P0 |P. |Ent|
|
||||
* `---------------------------------------------------------------------------'
|
||||
*/
|
||||
#define LAYOUT_ansi( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, K216, K217, K218, \
|
||||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \
|
||||
K400, K401, K402, K406, K410, K412, K413, K414, K415, K416, K417, K418 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, ____, ____, K214, K215, K216, K217, K218 }, \
|
||||
{ K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, K317, K318 }, \
|
||||
{ K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, ____, K412, K413, K414, K415, K416, K417, K418 } \
|
||||
}
|
||||
|
||||
/* LAYOUT_iso
|
||||
*
|
||||
* This layout uses:
|
||||
*
|
||||
* - Split Backspace (K013 and K014)
|
||||
* - ISO Enter (K114)
|
||||
* - ISO Left Shift and 1u (K300 and K301)
|
||||
* - Compact right Shift (K312 and K314)
|
||||
* - Two 1.5u modifiers (K410 and K412) between the spacebar and the Left
|
||||
* arrow key
|
||||
* ,---------------------------------------------------------------------------.
|
||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -_| =+| \||Bsp|Del|P/ |P* |P- |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [{| ]}|Enter|P7 |P8 |P9 |P= |
|
||||
* |------------------------------------------------------. ----------------|
|
||||
* |Caps | A| S| D| F| G| H| J| K| L| ;:| '@| #~| |P4 |P5 |P6 |P+ |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Sft | \|| Z| X| C| V| B| N| M| ,<| .>| /?| Shift| Up|P1 |P2 |P3 |SLk|
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Ctrl|GUI |Alt | | Alt| Fn|Lft|Dwn|Rgh|P0 |P. |Ent|
|
||||
* `---------------------------------------------------------------------------'
|
||||
*/
|
||||
#define LAYOUT_iso( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215, K216, K217, K218, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \
|
||||
K400, K401, K402, K406, K410, K412, K413, K414, K415, K416, K417, K418 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, ____, K215, K216, K217, K218 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, K317, K318 }, \
|
||||
{ K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, ____, K412, K413, K414, K415, K416, K417, K418 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
#include "quantum.h"
|
||||
#include "action_tapping.h"
|
||||
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
uint8_t get_oneshot_mods(void);
|
||||
#endif
|
||||
|
||||
static uint16_t last_td;
|
||||
static int8_t highest_td = -1;
|
||||
@@ -146,7 +148,11 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
|
||||
action->state.keycode = keycode;
|
||||
action->state.count++;
|
||||
action->state.timer = timer_read();
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
action->state.oneshot_mods = get_oneshot_mods();
|
||||
#else
|
||||
action->state.oneshot_mods = 0;
|
||||
#endif
|
||||
action->state.weak_mods = get_mods();
|
||||
action->state.weak_mods |= get_weak_mods();
|
||||
process_tap_dance_action_on_each_tap (action);
|
||||
|
||||
@@ -898,14 +898,29 @@ static const uint8_t backlight_pin = BACKLIGHT_PIN;
|
||||
|
||||
// depending on the pin, we use a different output compare unit
|
||||
#if BACKLIGHT_PIN == B7
|
||||
# define COM1x1 COM1C1
|
||||
# define OCR1x OCR1C
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define COMxx1 COM1C1
|
||||
# define OCRxx OCR1C
|
||||
# define ICRx ICR1
|
||||
#elif BACKLIGHT_PIN == B6
|
||||
# define COM1x1 COM1B1
|
||||
# define OCR1x OCR1B
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# define ICRx ICR1
|
||||
#elif BACKLIGHT_PIN == B5
|
||||
# define COM1x1 COM1A1
|
||||
# define OCR1x OCR1A
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# define ICRx ICR1
|
||||
#elif BACKLIGHT_PIN == C6
|
||||
# define TCCRxA TCCR3A
|
||||
# define TCCRxB TCCR3B
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR3A
|
||||
# define ICRx ICR3
|
||||
#else
|
||||
# define NO_HARDWARE_PWM
|
||||
#endif
|
||||
@@ -987,7 +1002,7 @@ static uint16_t cie_lightness(uint16_t v) {
|
||||
|
||||
// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val.
|
||||
static inline void set_pwm(uint16_t val) {
|
||||
OCR1x = val;
|
||||
OCRxx = val;
|
||||
}
|
||||
|
||||
#ifndef BACKLIGHT_CUSTOM_DRIVER
|
||||
@@ -998,10 +1013,10 @@ void backlight_set(uint8_t level) {
|
||||
|
||||
if (level == 0) {
|
||||
// Turn off PWM control on backlight pin
|
||||
TCCR1A &= ~(_BV(COM1x1));
|
||||
TCCRxA &= ~(_BV(COMxx1));
|
||||
} else {
|
||||
// Turn on PWM control of backlight pin
|
||||
TCCR1A |= _BV(COM1x1);
|
||||
TCCRxA |= _BV(COMxx1);
|
||||
}
|
||||
// Set the brightness
|
||||
set_pwm(cie_lightness(TIMER_TOP * (uint32_t)level / BACKLIGHT_LEVELS));
|
||||
@@ -1149,11 +1164,10 @@ void backlight_init_ports(void)
|
||||
"In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]."
|
||||
"In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)."
|
||||
*/
|
||||
|
||||
TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010;
|
||||
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
||||
TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010;
|
||||
TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
||||
// Use full 16-bit resolution. Counter counts to ICR1 before reset to 0.
|
||||
ICR1 = TIMER_TOP;
|
||||
ICRx = TIMER_TOP;
|
||||
|
||||
backlight_init();
|
||||
#ifdef BACKLIGHT_BREATHING
|
||||
|
||||
Reference in New Issue
Block a user