Compare commits
60 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d19805f9de | ||
|
4beb5e72f8 | ||
|
5f0a2e078f | ||
|
feac994f6f | ||
|
4931510ad3 | ||
|
d6215ad6af | ||
|
eba4cb7a04 | ||
|
85ea963931 | ||
|
492a16308a | ||
|
17200f4712 | ||
|
eb903c7623 | ||
|
c58921c64c | ||
|
9fc3e26f70 | ||
|
e9f44ee96d | ||
|
9cb80d68e2 | ||
|
4932f9566a | ||
|
97c6b8143c | ||
|
3b9e4967b8 | ||
|
7c57104b51 | ||
|
846598541b | ||
|
c68597d9ad | ||
|
5ffec5d9b0 | ||
|
a8eaf0b666 | ||
|
4f484bc1c9 | ||
|
a1fa70f94d | ||
|
d8f0faabda | ||
|
818042b2c3 | ||
|
8910f9b87e | ||
|
9dd3e08fdd | ||
|
b3bcafcc4b | ||
|
b8f08d936d | ||
|
dd37245373 | ||
|
eab41f7b38 | ||
|
cca3dcc5ec | ||
|
12e66330c5 | ||
|
d91c9858c5 | ||
|
8a0997709b | ||
|
0e1a731446 | ||
|
57ef8a54e4 | ||
|
1add90a6d2 | ||
|
e4230c84d0 | ||
|
1485cc1d26 | ||
|
4ea3bbdb4c | ||
|
bad839e6ac | ||
|
3aec9a4354 | ||
|
163ddd5d15 | ||
|
dc7cc26dff | ||
|
a6e46b99b9 | ||
|
ab197af2ea | ||
|
1226c69f4f | ||
|
8a1e656099 | ||
|
56f266173c | ||
|
2dfdafbd5b | ||
|
5fe0fe3756 | ||
|
cc0d4b6513 | ||
|
23b1889241 | ||
|
6cd001e337 | ||
|
e4f26a9fcc | ||
|
9cda36238f | ||
|
52630f6611 |
@@ -11,7 +11,7 @@ env:
|
||||
global:
|
||||
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
|
||||
before_install:
|
||||
- wget http://www.atmel.com/images/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
install:
|
||||
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
|
||||
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
|
||||
@@ -38,4 +38,4 @@ notifications:
|
||||
- https://webhooks.gitter.im/e/afce403d65f143dfac09
|
||||
on_success: always # options: [always|never|change] default: always
|
||||
on_failure: always # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
on_start: never # options: [always|never|change] default: always
|
||||
|
@@ -70,6 +70,10 @@ This is a C header file that is one of the first things included, and will persi
|
||||
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
|
||||
* `#define BACKLIGHT_LEVELS 3`
|
||||
* number of levels your backlight will have (not including off)
|
||||
* `#define BACKLIGHT_BREATHING`
|
||||
* enables backlight breathing (only works with backlight pins B5, B6 and B7)
|
||||
* `#define BREATHING_PERIOD 6`
|
||||
* the length of one backlight "breath" in seconds
|
||||
* `#define DEBOUNCING_DELAY 5`
|
||||
* the delay when reading the value of the pin (5 is default)
|
||||
* `#define LOCKING_SUPPORT_ENABLE`
|
||||
|
@@ -36,7 +36,7 @@ enum my_keycodes {
|
||||
|
||||
## Programming the Behavior of Any Keycode
|
||||
|
||||
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up you to send any key up or down events that are required.
|
||||
When you want to override the behavior of an existing key, or define the behavior for a new key, you should use the `process_record_kb()` and `process_record_user()` functions. These are called by QMK during key processing before the actual key event is handled. If these functions return `true` QMK will process the keycodes as usual. That can be handy for extending the functionality of a key rather than replacing it. If these functions return `false` QMK will skip the normal key handling, and it will be up to you to send any key up or down events that are required.
|
||||
|
||||
These function are called every time a key is pressed or released.
|
||||
|
||||
@@ -60,6 +60,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
PLAY_NOTE_ARRAY(tone_qwerty);
|
||||
}
|
||||
return true; // Let QMK send the enter press/release events
|
||||
default:
|
||||
return true; // Process all other keycodes normally
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@@ -127,7 +127,7 @@ https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
## Esc and <code>`</code> on a Single Key
|
||||
|
||||
See the [Grave Escape](feature_grave_escape.md) feature.
|
||||
See the [Grave Escape](feature_grave_esc.md) feature.
|
||||
|
||||
## Arrow on Right Modifier Keys with Dual-Role
|
||||
This turns right modifier keys into arrow keys when the keys are tapped while still modifiers when the keys are hold. In TMK the dual-role function is dubbed **TAP**.
|
||||
|
@@ -110,6 +110,9 @@ Map three keys temporarily in your keymap:
|
||||
| KC_ASDN | Lower the Auto Shift timeout variable (down) |
|
||||
| KC_ASUP | Raise the Auto Shift timeout variable (up) |
|
||||
| KC_ASRP | Report your current Auto Shift timeout value |
|
||||
| KC_ASON | Turns on the Auto Shift Function |
|
||||
| KC_ASOFF | Turns off the Auto Shift Function |
|
||||
| KC_ASTG | Toggles the statn of the Auto Shift feature |
|
||||
|
||||
Compile and upload your new firmware.
|
||||
|
||||
|
@@ -10,8 +10,30 @@ These keycodes control the backlight. Most keyboards use this for single color i
|
||||
|---------|------------------------------------------|
|
||||
|`BL_TOGG`|Turn the backlight on or off |
|
||||
|`BL_STEP`|Cycle through backlight levels |
|
||||
|`BL_x` |Set a specific backlight level between 0-9|
|
||||
|`BL_ON` |An alias for `BL_9` |
|
||||
|`BL_OFF` |An alias for `BL_0` |
|
||||
|`BL_ON` |Set backlight to max brightness |
|
||||
|`BL_OFF` |Turn backlight off |
|
||||
|`BL_INC` |Increase backlight level |
|
||||
|`BL_DEC` |Decrease backlight level |
|
||||
|`BL_BRTG`|Toggle backlight breathing |
|
||||
|
||||
Note that for backlight breathing, you need to have `#define BACKLIGHT_BREATHING` in your config.h.
|
||||
|
||||
## Configuration Options in `config.h`
|
||||
|
||||
* `BACKLIGHT_PIN B7` defines the pin that controlls the LEDs. Unless you design your own keyboard, you don't need to set this.
|
||||
* `BACKLIGHT_LEVELS 3` defines the number of brightness levels (excluding OFF).
|
||||
* `BACKLIGHT_BREATHING` if defined, enables backlight breathing. Note that this is only available if `BACKLIGHT_PIN` is B5, B6 or B7.
|
||||
* `BREATHING_PERIOD 6` defines the length of one backlight "breath" in seconds.
|
||||
|
||||
## Notes on Implementation
|
||||
|
||||
To change the brightness when using pins B5, B6 or B7, the PWM (Pulse Width Modulation) functionality of the on-chip timer is used.
|
||||
The timer is a counter that counts up to a certain TOP value (`0xFFFF` set in ICR1) before resetting to 0.
|
||||
We also set an OCR1x register.
|
||||
When the counter reaches the value stored in that register, the PWM pin drops to low.
|
||||
The PWM pin is pulled high again when the counter resets to 0.
|
||||
Therefore, OCR1x basically sets the duty cycle of the LEDs and as such the brightness where `0` is the darkest and `0xFFFF` the brightest setting.
|
||||
|
||||
To enable the breathing effect, we register an interrupt handler to be called whenever the counter resets (with `ISR(TIMER1_OVF_vect)`).
|
||||
In this handler, which gets called roughly 244 times per second, we compute the desired brightness using a precomputed brightness curve.
|
||||
To disable breathing, we can just disable the respective interrupt vector and reset the brightness to the desired level.
|
||||
|
26
docs/feature_space_shift_cadet.md
Normal file
26
docs/feature_space_shift_cadet.md
Normal file
@@ -0,0 +1,26 @@
|
||||
## Space Cadet Shift Enter: The future, built in
|
||||
|
||||
Based on the Space Cadet Shift by Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/)
|
||||
Essentially, you hit the Shift on its own, and it acts as the enter key. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. This solution works better than using a macro since the timers defined in quantum allow us to tell when another key is pressed, rather than just having a janky timer than results in accidental endlines.
|
||||
|
||||
To use it, use `KC_SFTENT` (Shift, Enter) for any Shift on your keymap.
|
||||
|
||||
It's defaulted to work on US keyboards, but if you'd like to use a different key for Enter, you can define those in your `config.h` like this:
|
||||
|
||||
#define SFTENT_KEY KC_ENT
|
||||
|
||||
|
||||
The only other thing you're going to want to do is create a `rules.mk` in your keymap directory and set the following:
|
||||
|
||||
```
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
```
|
||||
|
||||
This is just to keep the keyboard from going into command mode when you hold both Shift keys at the same time.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PLEASE NOTE: this feature uses the same timers as the Space Cadet Shift feature, so using them in tandem may produce unwanted results.
|
||||
|
@@ -53,6 +53,7 @@ If you're using [homebrew,](http://brew.sh/) you can use the following commands:
|
||||
brew install avr-gcc
|
||||
brew install dfu-programmer
|
||||
brew install gcc-arm-none-eabi
|
||||
brew install avrdude
|
||||
|
||||
This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line. Note that the `make` and `make install` portion during the homebrew installation of avr-libc can take over 20 minutes and exhibit high CPU usage.
|
||||
|
||||
|
@@ -101,8 +101,9 @@ By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are us
|
||||
|
||||
```
|
||||
#define BACKLIGHT_PIN B7
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 6
|
||||
```
|
||||
|
||||
{% hint style='info' %}
|
||||
|
46
keyboards/alu84/alu84.c
Executable file
46
keyboards/alu84/alu84.c
Executable file
@@ -0,0 +1,46 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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 "alu84.h"
|
||||
#include "rgblight.h"
|
||||
#include "action_layer.h"
|
||||
#include "quantum.h"
|
||||
#include "action.h"
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
41
keyboards/alu84/alu84.h
Executable file
41
keyboards/alu84/alu84.h
Executable file
@@ -0,0 +1,41 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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 ALU84_H
|
||||
#define ALU84_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
|
||||
#define KEYMAP( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
|
||||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \
|
||||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, \
|
||||
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, K415, \
|
||||
K500, K501, K503, K506, K510, K511, K512, K513, K514, K515 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \
|
||||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \
|
||||
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315 }, \
|
||||
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, K415 }, \
|
||||
{ K500, K501, KC_NO, K503, KC_NO, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \
|
||||
}
|
||||
|
||||
#endif
|
76
keyboards/alu84/config.h
Executable file
76
keyboards/alu84/config.h
Executable file
@@ -0,0 +1,76 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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 ALU84_CONFIG_H
|
||||
#define ALU84_CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER mechkeys.ca
|
||||
#define PRODUCT ALU84
|
||||
#define DESCRIPTION A 75% keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 16
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5, B7 }
|
||||
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, F5, D4, B1, B0, B5, B4, D7, D6, B3, F4, F6 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B6
|
||||
#ifdef BACKLIGHT_PIN
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#endif
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#define RGB_DI_PIN E2
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 10
|
||||
#define RGBLIGHT_VAL_STEP 10
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
25
keyboards/alu84/keymaps/TurboMech/config.h
Normal file
25
keyboards/alu84/keymaps/TurboMech/config.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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
|
||||
|
||||
#define TAPPING_TOGGLE 2
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
182
keyboards/alu84/keymaps/TurboMech/keymap.c
Normal file
182
keyboards/alu84/keymaps/TurboMech/keymap.c
Normal file
@@ -0,0 +1,182 @@
|
||||
/* Copyright 2017 @TurboMech /u/TurboMech <discord> @A9entOran9e#6134
|
||||
*
|
||||
* 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 "alu84.h"
|
||||
#include "turbomech.h"
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
#define _QWERTY 0 //BASE layer
|
||||
#define _FUNCTION 1 //Function layer
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BL
|
||||
* ,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
|
||||
* | Esc | Scrn | Scrn | Expose |Launchpad| Show |Dock Hide| Screen | Shortcut| Shortcut| Shortcut| Shortcut| Play | Mute | Vol Up | Vol Down|
|
||||
* | |Brght Up | Brght Dn| | | Desktop | Toggle | Capture | | | | | Pause | | | |
|
||||
* |- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - -+- - - - -|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | Backspace | POWER |
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |- - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - +- - - - -|
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Shortcut|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |- - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - - -+- - - - -|
|
||||
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Page |
|
||||
* | | | | | | | | | | | | | | Up |
|
||||
* |- - - - - - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - +- - - - -+- - - - -+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Page |
|
||||
* | | | | | | | | | | | | | | Down |
|
||||
* |- - - - - +- - - - - - +- - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -|
|
||||
* | Control | Option | Gui | Space | Gui | Opt | Fn | Left | Down | Right |
|
||||
* | | /Alt | | | | Alt | | | | |
|
||||
* `- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
|
||||
*/
|
||||
|
||||
[_QWERTY] = KEYMAP(
|
||||
KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_POWER,
|
||||
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, LCTL(LGUI(KC_N)),
|
||||
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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* FN1 - SEE readme.md
|
||||
* ,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
|
||||
* | Quit | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Trns | Trns | DFU |
|
||||
* | All | | | | | | | | | | | | | | | Reset |
|
||||
* |- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - -+- - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Delete | Lock |
|
||||
* | | | | | | | | | | | | | | |Shortcut |
|
||||
* |- - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - +- - - - -|
|
||||
* | Trns | RGB | RGB | RGB | RGB | RGB Hue | RGB Hue | RGB Sat | RGB Sat | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* | | Toggle | Mode | Increase| Decrease| Increase| Decrease| Increase| Decrease| | | | | | |
|
||||
* |- - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - - -+- - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* | | | | | | | | | | | | | | |
|
||||
* |- - - - - - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - +- - - - -+- - - - -+
|
||||
* | Trns |Backlight|Backlight|Backlight|Backlight| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* | | Toggle | Increase| Decrease| Step | | | | | | | | | |
|
||||
* |- - - - - +- - - - - - +- - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* | | | | | | | | | | |
|
||||
* `- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
|
||||
*/
|
||||
|
||||
|
||||
[_FUNCTION] = KEYMAP(
|
||||
LALT(LGUI(KC_Q)), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_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_DEL, LCTL(LALT(LGUI(KC_S))),
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, 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_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
//switch (id) {
|
||||
// case _FLIP:
|
||||
// if (record->event.pressed)
|
||||
|
||||
//SEND_STRING("(╯°□°)╯︵ ┻━┻");
|
||||
// }
|
||||
// return false;
|
||||
// break;
|
||||
// }
|
||||
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||
} else {
|
||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum function_id {
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
switch (id) {
|
||||
case SHIFT_ESC:
|
||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||
if (record->event.pressed) {
|
||||
if (shift_esc_shift_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (shift_esc_shift_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
93
keyboards/alu84/keymaps/TurboMech/readme.md
Normal file
93
keyboards/alu84/keymaps/TurboMech/readme.md
Normal file
@@ -0,0 +1,93 @@
|
||||
# This is u/TurboMech's keyboard layout for ALU84.
|
||||
|
||||
## It is designed for Mac OS, due to the specific functions I created.
|
||||
|
||||
### Here is the layout found in the keymap.c file.
|
||||
##### I use shortcuts for the Function row (above number row) listed below
|
||||
- Scrn Bright Up: F14
|
||||
- Scrn Bright Down: F15
|
||||
- Expose: LCTRL + Up
|
||||
- Launchpad: LCTRL + L
|
||||
- Show Desktop: F11
|
||||
- Show/Hide Dock: LALT + LGUI + D
|
||||
- Screen Capture: LCTRL + S
|
||||
- Custom Shortcut (setup for an application I use frequently): LCTRL + LSHFT + O
|
||||
- Custom Shortcut 1: LCTRL + LGUI + 1
|
||||
- Custom Shortcut 2: LCTRL + LGUI + 2
|
||||
- Custom Shortcut 3: LCTRL + LGUI + 3
|
||||
- use the custom shortcuts for whatever you want: launch an application, a macro, etc.
|
||||
- Play/Pause: exactly that
|
||||
- Mute / Volume Up / Volume Down: exactly what it says
|
||||
|
||||
##### Going down the right side from Vol Down:
|
||||
- POWER: this serves as the power button on Mac's only. Press and hold the button as you would on your Macbook or iMac keyboard.
|
||||
- Menu: this slides the notification bar on the right side (its the same as on iPhones/ iPads)
|
||||
|
||||
### See below keymaps for how to setup shortcuts on Mac
|
||||
|
||||
#### Base Layer
|
||||
```
|
||||
.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
|
||||
| Esc | Scrn | Scrn | Expose |Launchpad| Show |Dock Hide| Screen | Shortcut| Shortcut| Shortcut| Shortcut| Play | Mute | Vol Up | Vol Down|
|
||||
| |Brght Up | Brght Dn| | | Desktop | Toggle | Capture | | | | | Pause | | | |
|
||||
|- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - -+- - - - -|
|
||||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | Backspace | POWER |
|
||||
| | | | | | | | | | | | | | | |
|
||||
|- - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - +- - - - -|
|
||||
| TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Shortcut|
|
||||
| | | | | | | | | | | | | | | |
|
||||
|- - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - - -+- - - - -|
|
||||
| CAPS | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Page |
|
||||
| | | | | | | | | | | | | | Up |
|
||||
|- - - - - - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - +- - - - -+- - - - -+
|
||||
| Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Page |
|
||||
| | | | | | | | | | | | | | Down |
|
||||
|- - - - - +- - - - - - +- - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -|
|
||||
| Control | Option | Gui | Space | Gui | Opt | Fn | Left | Down | Right |
|
||||
| | /Alt | | | | Alt | | | | |
|
||||
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
|
||||
```
|
||||
#### Function Layer 1 - See above for shortcuts
|
||||
```
|
||||
.- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -.
|
||||
| Quit | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Trns | Trns | DFU |
|
||||
| All | | | | | | | | | | | | | | | Reset |
|
||||
|- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - -+- - - - -|
|
||||
| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Delete | Lock |
|
||||
| | | | | | | | | | | | | | |Shortcut |
|
||||
|- - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - +- - - - -|
|
||||
| Trns | RGB | RGB | RGB | RGB | RGB Hue | RGB Hue | RGB Sat | RGB Sat | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
| | Toggle | Mode | Increase| Decrease| Increase| Decrease| Increase| Decrease| | | | | | |
|
||||
|- - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - - - -+- - - - -|
|
||||
| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
| | | | | | | | | | | | | | |
|
||||
|- - - - - - - - - - - +- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - - - - - +- - - - -+- - - - -+
|
||||
| Trns |Backlight|Backlight|Backlight|Backlight| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
| | Toggle | Increase| Decrease| Step | | | | | | | | | |
|
||||
|- - - - - +- - - - - - +- - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -+- - - - -|
|
||||
| Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
| | | | | | | | | | |
|
||||
'- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'
|
||||
```
|
||||
|
||||
#### How to use/ setup shortcuts on Mac
|
||||
- First navigate to System Preferences > Keyboard > Shortcuts
|
||||
- You can use any of them in here
|
||||
- Just set them to the shortcut keys listed above
|
||||
|
||||
#### How to make your own (to launch applications, quit all, etc.)
|
||||
- Navigate to Automator > New Document > click Service > Choose
|
||||
- Now we have to setup our shortcut
|
||||
- Here's how to setup the Quit All Shortcut
|
||||
- In the right window select the Service recieves dropdown > select No Input
|
||||
- At the top left click the Name (Search) > type quit > click and hold Quit All Applications > drag to the right hand box (under the Service Recieves)
|
||||
- **IMPORTANT** You have to click the Run button at the upper right hand corner in order for these to actually work.
|
||||
- Now click File > Save > save it as Quit All Apps (or whatever you want) / you can also just exit out and it'll ask you if you want to save
|
||||
- Navigate back to System Preferences > Keyboard > Shortcuts
|
||||
- The new shortcut can be found under services, set it to one of the shortcuts I listed above and done
|
||||
- The same applies for applications in the Name (search) just type the application you want to have as shortcut. Don't forget to run it, then do the same steps
|
||||
to set it up as a shortcut.
|
||||
|
||||
|
||||
|
||||
|
15
keyboards/alu84/keymaps/TurboMech/rules.mk
Normal file
15
keyboards/alu84/keymaps/TurboMech/rules.mk
Normal file
@@ -0,0 +1,15 @@
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE ?= no
|
||||
RGBLIGHT_ENABLE ?= yes
|
||||
UNICODE_ENABLE ?= yes
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
144
keyboards/alu84/keymaps/default/keymap.c
Executable file
144
keyboards/alu84/keymaps/default/keymap.c
Executable file
@@ -0,0 +1,144 @@
|
||||
#include "alu84.h"
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
#define _BL 0
|
||||
#define _FN1 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BL
|
||||
* ,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .
|
||||
* | Esc | Scrn Brght Up | Scrn Bright Down | Expose | Launchpad | Show Desktop | Dock Hide Tog | Screen Capture | Shortcut | Shortcut | Shortcut| Shortcut | Play/Pause | Mute | Vol Up | Vol Down |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | Backspace | POWER |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | Shortcut |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | Enter | Pg Up |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Up | Pg Dn |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Control | Option/Alt | Gui | Space | Gui | Opt | Fn (layer) | Left | Down | Right |
|
||||
* `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -'
|
||||
*/
|
||||
|
||||
[_BL] = KEYMAP(
|
||||
KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_POWER,
|
||||
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, LCTL(LGUI(KC_N)),
|
||||
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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* FN1
|
||||
* ,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .
|
||||
* | Quit All | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Trns | Trns | DFU RESET |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | DELETE | Lock Shrct |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | RGB Toggle | RGB Mode | RGB Increase | RGB Decrease | RGB Hue Inc | RGB Hue Dec | RGB Sat Inc | RGB Sat Dec | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | Backlight Tog | Backlight Inc | Backlight Dec | Backlight Step | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* |- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -|
|
||||
* | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns | Trns |
|
||||
* `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -'
|
||||
*/
|
||||
|
||||
[_FN1] = KEYMAP(
|
||||
LALT(LGUI(KC_Q)), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, 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_DEL, LCTL(LALT(LGUI(KC_S))),
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, 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_TOGG, BL_INC, BL_DEC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
|
||||
|
||||
switch (id) {
|
||||
|
||||
}
|
||||
return MACRO_NONE;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
|
||||
} else {
|
||||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
|
||||
}
|
||||
|
||||
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 {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
enum function_id {
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
switch (id) {
|
||||
case SHIFT_ESC:
|
||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||
if (record->event.pressed) {
|
||||
if (shift_esc_shift_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (shift_esc_shift_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
14
keyboards/alu84/readme.md
Normal file
14
keyboards/alu84/readme.md
Normal file
@@ -0,0 +1,14 @@
|
||||
ALU84
|
||||
===
|
||||
|
||||
A 75% keyboard kit made and sold by mechkeys.ca [More info on mechkeys.ca](https://mechkeys.ca)
|
||||
|
||||
Keyboard Maintainer: [TurboMech](https://github.com/TurboMech)
|
||||
Hardware Supported: ALU84
|
||||
Hardware Availability: [mechkeys.ca](https://mechkeys.ca)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make alu84: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.
|
56
keyboards/alu84/rules.mk
Executable file
56
keyboards/alu84/rules.mk
Executable file
@@ -0,0 +1,56 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE ?= no
|
||||
RGBLIGHT_ENABLE ?= yes
|
@@ -345,14 +345,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
case MACRO_BREATH_SPEED_INC:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_inc(1);
|
||||
breathing_period_inc();
|
||||
}
|
||||
break;
|
||||
|
||||
case MACRO_BREATH_SPEED_DEC:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_dec(1);
|
||||
breathing_period_dec();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -374,7 +374,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_UPPER);
|
||||
breathing_speed_set(2);
|
||||
breathing_period_set(2);
|
||||
breathing_pulse();
|
||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||
}
|
||||
@@ -389,7 +389,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
if (record->event.pressed)
|
||||
{
|
||||
layer_on(LAYER_LOWER);
|
||||
breathing_speed_set(2);
|
||||
breathing_period_set(2);
|
||||
breathing_pulse();
|
||||
update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST);
|
||||
}
|
||||
@@ -403,13 +403,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
case MACRO_FUNCTION:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(3);
|
||||
breathing_period_set(3);
|
||||
breathing_enable();
|
||||
layer_on(LAYER_FUNCTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_period_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(LAYER_FUNCTION);
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 1
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* mapping backlight LEDs to correct Pin */
|
||||
#define BACKLIGHT_PIN B7
|
||||
|
@@ -21,5 +21,7 @@
|
||||
|
||||
// place overrides here
|
||||
#define GRAVE_ESC_CTRL_OVERRIDE
|
||||
#define BACKLIGHT_BREATHING
|
||||
#define BREATHING_PERIOD 8
|
||||
|
||||
#endif
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include "bananasplit.h"
|
||||
|
||||
enum custom_keycodes {
|
||||
WIN_SWITCH_LAYOUT = SAFE_RANGE
|
||||
WIN_SWITCH_LAYOUT = SAFE_RANGE,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
@@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, \
|
||||
KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, _______, _______, _______, KC_PSCR, \
|
||||
_______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \
|
||||
_______, BL_STEP, BL_BRTG, _______, _______,_______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______,_______, _______, _______, _______, _______, RESET \
|
||||
),
|
||||
};
|
||||
@@ -76,19 +76,19 @@ void matrix_scan_user(void) {
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
|
||||
case WIN_SWITCH_LAYOUT: {
|
||||
// Sends Alt+Shift on both key down and key up.
|
||||
// Designed to switch between two keyboard layouts on Windows using a locking switch.
|
||||
// Does nothing if right shift is pressed for easy resync.
|
||||
if (!(get_mods() & MOD_BIT(KC_RSFT))) {
|
||||
if (!(get_mods() & MOD_BIT(KC_RSFT)))
|
||||
SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_LSHIFT)SS_UP(X_LALT));
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
@@ -1,77 +0,0 @@
|
||||
# Target file name (without extension).
|
||||
PROJECT = ch
|
||||
|
||||
# Directory common source files exist
|
||||
TMK_DIR = ../../tmk_core
|
||||
|
||||
# Directory keyboard dependent files exist
|
||||
TARGET_DIR = .
|
||||
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
ifdef KEYMAP
|
||||
SRC := keymap_$(KEYMAP).c $(SRC)
|
||||
else
|
||||
SRC := keymap_plain.c $(SRC)
|
||||
endif
|
||||
|
||||
CONFIG_H = config.h
|
||||
|
||||
## chip/board settings
|
||||
# - the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
||||
MCU_FAMILY = KINETIS
|
||||
MCU_SERIES = K20x
|
||||
|
||||
# Linker script to use
|
||||
# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/
|
||||
# or <this_dir>/ld/
|
||||
# - NOTE: a custom ld script is needed for EEPROM on Teensy LC
|
||||
# - LDSCRIPT =
|
||||
# - MKL26Z64 for Teensy LC
|
||||
# - MK20DX128 for Teensy 3.0
|
||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
||||
MCU_LDSCRIPT = MK20DX128
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
# - STARTUP =
|
||||
# - kl2x for Teensy LC
|
||||
# - k20x5 for Teensy 3.0
|
||||
# - k20x7 for Teensy 3.1 and 3.2
|
||||
MCU_STARTUP = k20x5
|
||||
|
||||
# Board: it should exist either in <chibios>/os/hal/boards/
|
||||
# or <this_dir>/boards
|
||||
# - BOARD =
|
||||
# - PJRC_TEENSY_LC for Teensy LC
|
||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
||||
BOARD = PJRC_TEENSY_3
|
||||
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||
MCU = cortex-m4
|
||||
|
||||
# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
|
||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
||||
ARMV = 7
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
|
||||
include $(TMK_DIR)/tool/chibios/common.mk
|
||||
include $(TMK_DIR)/tool/chibios/chibios.mk
|
1
keyboards/christmas_tree/V2017/V2017.c
Normal file
1
keyboards/christmas_tree/V2017/V2017.c
Normal file
@@ -0,0 +1 @@
|
||||
#include "V2017.h"
|
6
keyboards/christmas_tree/V2017/V2017.h
Normal file
6
keyboards/christmas_tree/V2017/V2017.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef V2017_H
|
||||
#define V2017_H
|
||||
|
||||
#include "christmas_tree.h"
|
||||
|
||||
#endif
|
8
keyboards/christmas_tree/V2017/config.h
Normal file
8
keyboards/christmas_tree/V2017/config.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef V2017_CONFIG_H
|
||||
#define V2017_CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#define DEVICE_VER 0x2017
|
||||
|
||||
#endif
|
3
keyboards/christmas_tree/V2017/info.json
Normal file
3
keyboards/christmas_tree/V2017/info.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"identifier": "FEED:3070:2017"
|
||||
}
|
3
keyboards/christmas_tree/V2017/rules.mk
Normal file
3
keyboards/christmas_tree/V2017/rules.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
5
keyboards/christmas_tree/christmas_tree.c
Normal file
5
keyboards/christmas_tree/christmas_tree.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "christmas_tree.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
20
keyboards/christmas_tree/christmas_tree.h
Normal file
20
keyboards/christmas_tree/christmas_tree.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef CHRISTMAS_TREE_H
|
||||
#define CHRISTMAS_TREE_H
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, k04, k05 \
|
||||
) \
|
||||
{ \
|
||||
{ k00 }, \
|
||||
{ k01 }, \
|
||||
{ k02 }, \
|
||||
{ k03 }, \
|
||||
{ k04 }, \
|
||||
{ k05 } \
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
63
keyboards/christmas_tree/config.h
Normal file
63
keyboards/christmas_tree/config.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@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 0x3070
|
||||
#define MANUFACTURER Maple Computing
|
||||
#define PRODUCT Christmas Tree
|
||||
#define DESCRIPTION A tiny 6 key macro pad, in the shape of a christmas tree
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 1
|
||||
|
||||
/* Planck PCB default pin-out */
|
||||
#define MATRIX_ROW_PINS { D3, F4, D0, F6, F5, D4 }
|
||||
#define MATRIX_COL_PINS { D1 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN D2
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
#endif
|
17
keyboards/christmas_tree/info.json
Normal file
17
keyboards/christmas_tree/info.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"keyboard_name": "Christmas Tree",
|
||||
"keyboard_folder": "christmas_tree",
|
||||
"manufacturer": "Maple Computing",
|
||||
"identifier": "FEED:3070:2017",
|
||||
"url": "https://www.reddit.com/r/MechanicalKeyboards/comments/7cqxpf/gb_christmas_tree_pcb_gb_now_live/",
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "catarina",
|
||||
"maintainer": "That-Canadian",
|
||||
"width": 3,
|
||||
"height": 3,
|
||||
"layouts": {
|
||||
"2017": {
|
||||
"key_count": 6
|
||||
}
|
||||
}
|
||||
}
|
6
keyboards/christmas_tree/keymaps/default/config.h
Normal file
6
keyboards/christmas_tree/keymaps/default/config.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#endif
|
77
keyboards/christmas_tree/keymaps/default/keymap.c
Normal file
77
keyboards/christmas_tree/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,77 @@
|
||||
/* 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 "christmas_tree.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum layers {
|
||||
_BASE,
|
||||
_FUNC
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
FUNC = SAFE_RANGE,
|
||||
BACKLIT
|
||||
};
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Base
|
||||
* ,------.
|
||||
* | 1 |
|
||||
* ,------+------.
|
||||
* | 2 | 3 |
|
||||
* ,------+------+------.
|
||||
* | 4 | FUNC | 6 |
|
||||
* `--------------------'
|
||||
*/
|
||||
[_BASE] = KEYMAP(KC_1, KC_2, KC_3, KC_4, MO(_FUNC), KC_6),
|
||||
|
||||
/* Func
|
||||
* ,------.
|
||||
* |BCKLIT|
|
||||
* ,------+------.
|
||||
* | 8 | 9 |
|
||||
* ,------+------+------.
|
||||
* | 0 | FUNC | RESET|
|
||||
* `--------------------'
|
||||
*/
|
||||
[_FUNC] = KEYMAP(BACKLIT, KC_8, KC_9, KC_0, _______, RESET)
|
||||
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
register_code(KC_LSFT);
|
||||
backlight_step();
|
||||
#endif
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
2
keyboards/christmas_tree/keymaps/default/readme.md
Normal file
2
keyboards/christmas_tree/keymaps/default/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# The Default Christmas Tree Layout
|
||||
|
14
keyboards/christmas_tree/readme.md
Normal file
14
keyboards/christmas_tree/readme.md
Normal file
@@ -0,0 +1,14 @@
|
||||
Christmas Tree
|
||||
===
|
||||
|
||||

|
||||
|
||||
A tiny 6 key macro pad, in the shape of a christmas tree, made by That-Canadian, SpaceCat, and ChillCaps.
|
||||
|
||||
Keyboard Maintainer: [That-Canadian](https://github.com/That-Canadian)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make christmas_tree/V2017: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.
|
70
keyboards/christmas_tree/rules.mk
Normal file
70
keyboards/christmas_tree/rules.mk
Normal file
@@ -0,0 +1,70 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
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 to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
API_SYSEX_ENABLE = no
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
DEFAULT_FOLDER = christmas_tree/V2017
|
@@ -416,7 +416,7 @@
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
|
||||
PIN_PUPDR_FLOATING(GPIOB_PIN6) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
|
||||
PIN_PUPDR_PULLDOWN(GPIOB_PIN7) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
|
||||
PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
|
||||
@@ -432,7 +432,7 @@
|
||||
PIN_ODR_HIGH(GPIOB_PIN4) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN5) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN6) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN7) | \
|
||||
PIN_ODR_LOW(GPIOB_PIN7) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN8) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN9) | \
|
||||
PIN_ODR_HIGH(GPIOB_PIN10) | \
|
||||
|
@@ -1,2 +0,0 @@
|
||||
EXTRAKEY_ENABLE = yes
|
||||
COMMAND_ENABLE = no
|
41
keyboards/clueboard/66/keymaps/mrscooty/keymap.c
Normal file
41
keyboards/clueboard/66/keymaps/mrscooty/keymap.c
Normal file
@@ -0,0 +1,41 @@
|
||||
#include "clueboard.h"
|
||||
|
||||
// Helpful defines
|
||||
#define _______ KC_TRNS
|
||||
|
||||
// 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 _BL 0
|
||||
#define _FL 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_HOME, \
|
||||
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_END, \
|
||||
MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \
|
||||
KC_LSFT, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \
|
||||
KC_LCTL, KC_LGUI,KC_LALT,KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = KEYMAP(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_PGUP, \
|
||||
_______, RGB_TOG, KC_MPRV, KC_MPLY, KC_MNXT,_______,_______,KC_HOME,KC_UP, KC_END, _______, _______, _______, KC_PSCR, KC_PGDN, \
|
||||
_______, RGB_VAI, KC_MUTE, KC_VOLD, KC_VOLU,_______,_______,KC_LEFT,KC_DOWN,KC_RIGHT, _______, _______, _______, _______, \
|
||||
_______, RGB_VAD, _______, _______, _______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \
|
||||
_______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI)
|
||||
};
|
||||
|
||||
/* Keymap _CL: Control layer
|
||||
|
||||
[_CL] = KEYMAP(
|
||||
BL_STEP,RGB_M_P,RGB_M_B,RGB_M_R,RGB_M_SW,RGB_M_SN,RGB_M_K,RGB_M_X,RGB_M_G,_______,_______,_______,_______,_______,RGB_TOG, RGB_VAI, \
|
||||
_______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_VAD, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RGB_SAI, \
|
||||
_______,_______,_______,_______, RGB_MOD, RGB_MOD, _______,_______,_______,_______,RGB_HUD,RGB_SAD,RGB_HUI),
|
||||
};*/
|
15
keyboards/clueboard/66/keymaps/mrscooty/readme.md
Normal file
15
keyboards/clueboard/66/keymaps/mrscooty/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Mr Scooty's Clueboard Layout
|
||||
|
||||
My personal layout for everyday typing and coding.
|
||||
I have a most of my media keys on the function layer as well as a second set of arrows as IJKL which you switch between by holding the normal CAPS key.
|
||||
|
||||
|
||||
#### Base Layer
|
||||
![Base Layout Image] (https://imgur.com/HWdi36y)
|
||||
|
||||
#### Fn Layer
|
||||
![Fn Layout Image] (https://imgur.com/IPa8gFg)
|
||||
|
||||
|
||||
|
||||
Both layers (https://imgur.com/a/dAwXq)
|
@@ -1 +1,2 @@
|
||||
RGBLIGHT_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
@@ -1 +0,0 @@
|
||||
SRC = tetris_text.c
|
@@ -1,49 +0,0 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# On command line:
|
||||
#
|
||||
# make all = Make software.
|
||||
#
|
||||
# make clean = Clean out built project files.
|
||||
#
|
||||
# make coff = Convert ELF to AVR COFF.
|
||||
#
|
||||
# make extcoff = Convert ELF to AVR Extended COFF.
|
||||
#
|
||||
# make program = Download the hex file to the device.
|
||||
# Please customize your programmer settings(PROGRAM_CMD)
|
||||
#
|
||||
# make teensy = Download the hex file to the device, using teensy_loader_cli.
|
||||
# (must have teensy_loader_cli installed).
|
||||
#
|
||||
# make dfu = Download the hex file to the device, using dfu-programmer (must
|
||||
# have dfu-programmer installed).
|
||||
#
|
||||
# make flip = Download the hex file to the device, using Atmel FLIP (must
|
||||
# have Atmel FLIP installed).
|
||||
#
|
||||
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
|
||||
# (must have dfu-programmer installed).
|
||||
#
|
||||
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
|
||||
# (must have Atmel FLIP installed).
|
||||
#
|
||||
# make debug = Start either simulavr or avarice as specified for debugging,
|
||||
# with avr-gdb or avr-insight as the front end for debugging.
|
||||
#
|
||||
# make filename.s = Just compile filename.c into the assembler code only.
|
||||
#
|
||||
# make filename.i = Create a preprocessed source file for use in submitting
|
||||
# bug reports to the GCC project.
|
||||
#
|
||||
# To rebuild project do "make clean" then "make all".
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the makefile.mk in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
94
keyboards/cospad/config.h
Normal file
94
keyboards/cospad/config.h
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@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 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER KPREPUBLIC
|
||||
#define PRODUCT COSPAD
|
||||
#define DESCRIPTION QMK keyboard firmware for COSPAD
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
// ROWS: Top to bottom, COLS: Left to right
|
||||
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 }
|
||||
#define MATRIX_COL_PINS { F0, F1, E6, C7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
#define BACKLIGHT_PIN F7
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* Backlight configuration
|
||||
*/
|
||||
#define BACKLIGHT_LEVELS 4
|
||||
|
||||
/* Underlight configuration
|
||||
*/
|
||||
|
||||
#define RGB_DI_PIN F6
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 4 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
37
keyboards/cospad/cospad.c
Normal file
37
keyboards/cospad/cospad.c
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "cospad.h"
|
||||
#include "led.h"
|
||||
|
||||
extern inline void cospad_bl_led_on(void);
|
||||
extern inline void cospad_bl_led_off(void);
|
||||
extern inline void cospad_bl_led_togg(void);
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
led_init_ports();
|
||||
};
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
matrix_scan_user();
|
||||
};
|
||||
|
||||
void led_init_ports(void) {
|
||||
// * Set our LED pins as output
|
||||
DDRB |= (1<<2);
|
||||
DDRF |= (1<<7);
|
||||
// * Setting BL LEDs to init as off
|
||||
PORTF |= (1<<7);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_NUM_LOCK)) {
|
||||
// Turn numlock on
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Turn numlock off
|
||||
PORTB |= (1<<2);
|
||||
}
|
||||
}
|
77
keyboards/cospad/cospad.h
Normal file
77
keyboards/cospad/cospad.h
Normal file
@@ -0,0 +1,77 @@
|
||||
#ifndef COSPAD_H
|
||||
#define COSPAD_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
// readability
|
||||
#define XXX KC_NO
|
||||
|
||||
/* COSPAD ortho matrix layout
|
||||
* ,-------------------.
|
||||
* | 00 | 01 | 02 | 03 |
|
||||
* |----|----|----|----|
|
||||
* | 10 | 11 | 12 | 13 |
|
||||
* |----|----|----|----|
|
||||
* | 20 | 21 | 22 | 23 |
|
||||
* |----|----|----|----|
|
||||
* | 30 | 31 | 32 | 33 |
|
||||
* |----|----|----|----|
|
||||
* | 40 | 41 | 42 | 43 |
|
||||
* |----|----|----|----|
|
||||
* | 50 | 51 | 52 | 53 |
|
||||
* `-------------------'
|
||||
*/
|
||||
|
||||
|
||||
/* COSPAD numpad matrix layout
|
||||
* ,-------------------.
|
||||
* | 00 | 01 | 02 | 03 |
|
||||
* |----|----|----|----|
|
||||
* | 10 | 11 | 12 | 13 |
|
||||
* |----|----|----|----|
|
||||
* | 20 | 21 | 22 | |
|
||||
* |----|----|----| 23 |
|
||||
* | 30 | 31 | 32 | |
|
||||
* |----|----|----|----|
|
||||
* | 40 | 41 | 42 | |
|
||||
* |----|----|----| 43 |
|
||||
* | 50 | 52 | |
|
||||
* `-------------------'
|
||||
*/
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KEYMAP( \
|
||||
k00, k01, k02, k03, \
|
||||
k10, k11, k12, k13, \
|
||||
k20, k21, k22, k23, \
|
||||
k30, k31, k32, k33, \
|
||||
k40, k41, k42, k43, \
|
||||
k50, k51, k52, k53 \
|
||||
) \
|
||||
{ \
|
||||
{k00, k01, k02, k03}, \
|
||||
{k10, k11, k12, k13}, \
|
||||
{k20, k21, k22, k23}, \
|
||||
{k30, k31, k32, k33}, \
|
||||
{k40, k41, k42, k43}, \
|
||||
{k50, k51, k52, k53} \
|
||||
}
|
||||
void matrix_init_user(void);
|
||||
void matrix_scan_user(void);
|
||||
/*
|
||||
inline void cospad_bl_led_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); }
|
||||
inline void cospad_bl_led_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
|
||||
*/
|
||||
|
||||
inline void cospad_bl_led_on(void) { PORTF &= ~(1<<7); }
|
||||
inline void cospad_bl_led_off(void) { PORTF |= (1<<7); }
|
||||
|
||||
inline void cospad_bl_led_togg(void) {
|
||||
uint8_t bl_mask = PORTF&(1<<7);
|
||||
if (bl_mask) {
|
||||
PORTF &= ~(1<<7);
|
||||
} else {
|
||||
PORTF |= (1<<7);
|
||||
}
|
||||
}
|
||||
#endif
|
91
keyboards/cospad/keymaps/default/keymap.c
Normal file
91
keyboards/cospad/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,91 @@
|
||||
#include "cospad.h"
|
||||
#include "led.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#include "rgblight.h"
|
||||
#endif
|
||||
|
||||
// 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 _BL 0
|
||||
#define _FL 1
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: (Base Layer) Default Layer
|
||||
* ,-------------------.
|
||||
* |Esc |TAB | FN | BS |
|
||||
* |----|----|----|----|
|
||||
* | NL | / | * | - |
|
||||
* |----|----|----|----|
|
||||
* | 7 | 8 | 9 | |
|
||||
* |----|----|----| + |
|
||||
* | 4 | 5 | 6 | |
|
||||
* |----|----|----|----|
|
||||
* | 1 | 2 | 3 | |
|
||||
* |----|----|----| En |
|
||||
* | 0 | . | |
|
||||
* `-------------------'
|
||||
*/
|
||||
|
||||
[_BL] = KEYMAP(
|
||||
KC_ESC, KC_TAB, MO(_FL), KC_BSPC, \
|
||||
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS, \
|
||||
KC_P4, KC_P5, KC_P6, KC_NO, \
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
KC_P0, KC_NO, KC_PDOT, KC_NO),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
* ,-------------------.
|
||||
* |RGBT|TAB | FN | BS |
|
||||
* |----|----|----|----|
|
||||
* |RGBM|RGBP|BTOG| - |
|
||||
* |----|----|----|----|
|
||||
* |HUD |HUI |BON | |
|
||||
* |----|----|----| + |
|
||||
* |SAD |SAI |BOFF| |
|
||||
* |----|----|----|----|
|
||||
* |VAD |VAS | 3 | |
|
||||
* |----|----|----| En |
|
||||
* | 0 |RST | |
|
||||
* `-------------------'
|
||||
*/
|
||||
[_FL] = KEYMAP(
|
||||
RGB_TOG, KC_TAB, KC_TRNS, KC_BSPC, \
|
||||
RGB_MOD, RGB_M_P, BL_TOGG, KC_PMNS, \
|
||||
RGB_HUD, RGB_HUI, BL_ON, KC_PPLS, \
|
||||
RGB_SAD, RGB_SAI, BL_OFF, KC_NO, \
|
||||
RGB_VAD, RGB_VAI, KC_P3, KC_PENT, \
|
||||
KC_P0, KC_NO, RESET, KC_NO),
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = MO(_FL),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BL_TOGG:
|
||||
if (record->event.pressed) {
|
||||
cospad_bl_led_togg();
|
||||
}
|
||||
return false;
|
||||
case BL_ON:
|
||||
if (record->event.pressed) {
|
||||
cospad_bl_led_on();
|
||||
}
|
||||
return false;
|
||||
case BL_OFF:
|
||||
if(record->event.pressed) {
|
||||
cospad_bl_led_off();
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
21
keyboards/cospad/readme.md
Normal file
21
keyboards/cospad/readme.md
Normal file
@@ -0,0 +1,21 @@
|
||||
COSPAD
|
||||
===
|
||||
|
||||
A DIY Keypad Kit sold by KPRepublic, runs TKG natively.
|
||||
|
||||
Keyboard Maintainer: QMK Community
|
||||
Hardware Supported: COSPAD
|
||||
Hardware Availability: https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html
|
||||
|
||||
Only supports on and off for the backlight leds, as they are not connected to a PWM pin.
|
||||
|
||||
Supported Layouts:
|
||||
|
||||

|
||||

|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make cospad:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
|
66
keyboards/cospad/rules.mk
Normal file
66
keyboards/cospad/rules.mk
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
# MCU name
|
||||
#MCU = at90usb1287
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
# Teensy halfKay 512
|
||||
# Teensy++ halfKay 1024
|
||||
# Atmel DFU loader 4096
|
||||
# LUFA bootloader 4096
|
||||
# USBaspLoader 2048
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870)
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150)
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
74
keyboards/dz60/keymaps/iso_6u_space/keymap.c
Normal file
74
keyboards/dz60/keymaps/iso_6u_space/keymap.c
Normal file
@@ -0,0 +1,74 @@
|
||||
#include "dz60.h"
|
||||
|
||||
#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* ISO 6u layout layer 0
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Z | U | I | O | P | P | Ü | * | |
|
||||
* |-------------------------------------------------------------------------------------| +
|
||||
* | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ä | # |Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift| < | Y | X | C | V | B | N | M | , | . | . | - | RShift |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | LCtrl | LGUI | LAlt | Space | RAlt | RGUI | Layer_2 | RCtrl |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
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_NO, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
MO(1), 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_NO,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT,KC_RGUI, KC_NO, MO(2), KC_RCTL),
|
||||
|
||||
|
||||
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_NO, KC_DEL,
|
||||
KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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_LSFT, KC_NO, KC_NO, KC_NO, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LCTL, KC_LGUI, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_NO, KC_RCTL),
|
||||
|
||||
KEYMAP(
|
||||
KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_NO, KC_DEL,
|
||||
KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
|
||||
};
|
||||
|
||||
enum function_id {
|
||||
SHIFT_ESC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_FUNCTION(SHIFT_ESC),
|
||||
};
|
||||
|
||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
static uint8_t shift_esc_shift_mask;
|
||||
switch (id) {
|
||||
case SHIFT_ESC:
|
||||
shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
|
||||
if (record->event.pressed) {
|
||||
if (shift_esc_shift_mask) {
|
||||
add_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
add_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
} else {
|
||||
if (shift_esc_shift_mask) {
|
||||
del_key(KC_GRV);
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
del_key(KC_ESC);
|
||||
send_keyboard_report();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
@@ -4,26 +4,40 @@
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
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_NO, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
MO(1), 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_LCTL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_RALT, KC_NO, MO(2), KC_RCTL),
|
||||
|
||||
/* ISO 7u layout layer 0
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Z | U | I | O | P | P | Ü | * | |
|
||||
* |-------------------------------------------------------------------------------------| +
|
||||
* | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ä | # |Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift| < | Y | X | C | V | B | N | M | , | . | . | - | RShift |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | LCtrl | LGUI | LAlt | Space | RAlt | Layer_2 | RCtrl |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
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_NO, KC_DEL,
|
||||
KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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_PGUP, KC_NO, KC_NO, KC_NO, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
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_NO, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
MO(1), 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_LCTL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_RALT, KC_NO, MO(2), KC_RCTL),
|
||||
|
||||
|
||||
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_NO, KC_DEL,
|
||||
KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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_PGUP, KC_NO, KC_NO, KC_NO, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_PGDOWN, KC_LGUI, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_NO, KC_RCTL),
|
||||
|
||||
KEYMAP(
|
||||
KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL,
|
||||
KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LSFT, 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_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL,
|
||||
KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
|
||||
};
|
||||
|
||||
|
29
keyboards/dz60/keymaps/tailcall/keymap.c
Normal file
29
keyboards/dz60/keymaps/tailcall/keymap.c
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "dz60.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
KEYMAP(
|
||||
KC_GESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , XXXXXXX, KC_BSPC,
|
||||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_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, XXXXXXX, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, XXXXXXX,
|
||||
MO(1) , KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, XXXXXXX, MO(2) , KC_RCTL),
|
||||
|
||||
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_DEL ,
|
||||
_______, KC_HOME, KC_UP , KC_END , KC_PGUP, KC_INS , KC_PSCR, KC_SLCK, RGB_VAD, _______, _______, _______, _______, _______,
|
||||
KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DEL , _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
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_SLEP,
|
||||
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, BL_DEC , BL_TOGG, BL_INC , BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
};
|
237
keyboards/ergodone/keymaps/kloki/keymap.c
Normal file
237
keyboards/ergodone/keymaps/kloki/keymap.c
Normal file
@@ -0,0 +1,237 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
|
||||
#define BASE 0 // default layer
|
||||
#define QW 1 // qwerty
|
||||
#define SYMB 2 // symbols
|
||||
#define NUM 3 // media keys
|
||||
|
||||
enum custom_keycodes {
|
||||
PLACEHOLDER = SAFE_RANGE, // can always be here
|
||||
EPRM,
|
||||
VRSN,
|
||||
RGB_SLD
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | SHIFT| | SYM | 6 | 7 | 8 | 9 | 0 | Bck |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Tab | Q | D | R | W | B | `~ | | "' | J | F | U | P | : | \ | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | Ctr/Es | A | S | H | T | G |------| |------| Y | N | E | O | I | Enter |
|
||||
* |--------+------+------+------+------+------| = + | | -_ |------+------+------+------+------+--------|
|
||||
* | LShift | Z | X | M | C | V | | | | K | L | , | . | / | RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |MEH | Gui |AltShf| Left | Right| | DOWN | UP | [ | ] | ~SYM |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | ESC |Home | | PgUp | QW |
|
||||
* ,------|------|------| |------+--------+------.
|
||||
* | | ENT | End | | PgDn | | |
|
||||
* | Space| WIN |------| |------| Tab |Back |
|
||||
* | SYM | | SCTR | | SALT | SYM | |
|
||||
* `--------------------' `----------------------'
|
||||
*/
|
||||
|
||||
[BASE] = LAYOUT_ergodox( // layer 0 : default
|
||||
// left hand
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LSFT,
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_GRV,
|
||||
CTL_T(KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_EQL,
|
||||
KC_MEH, KC_LGUI, KC_LALT, KC_LEFT,KC_RGHT,
|
||||
KC_ESC, KC_HOME,
|
||||
KC_END,
|
||||
LT(SYMB, KC_SPC), LGUI_T(KC_ENT), S(KC_LGUI),
|
||||
// right hand
|
||||
TG(NUM), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_QUOT, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I , KC_ENT,
|
||||
KC_MINS, KC_K, KC_L, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,
|
||||
KC_DOWN,KC_UP, KC_LBRC,KC_RBRC, MO(SYMB),
|
||||
KC_PGUP, TG(QW),
|
||||
KC_PGDN,
|
||||
S(KC_LALT),LT(SYMB, KC_TAB), KC_BSPC
|
||||
),
|
||||
|
||||
[QW] = LAYOUT_ergodox(
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_Q, KC_W, KC_E, KC_R, KC_T, _______,
|
||||
_______, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_Y, KC_U, KC_I , KC_O, KC_P, _______,
|
||||
KC_H, KC_J, KC_K , KC_L, KC_SCLN, _______,
|
||||
_______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
/* Keymap 1: Symbol Layer
|
||||
*
|
||||
* ,---------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | DEL |
|
||||
* |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------|
|
||||
* | | ! | @ | { | } | * | | | | < | H | U | PU | * | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | # | $ | ( | ) | ` |------| |------| > | L | D | R | + | |
|
||||
* |---------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | % | ^ | [ | ] | ~ | | | | & | E | D | PD | \ | |
|
||||
* `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
// SYMBOLS
|
||||
[SYMB] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
_______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______,
|
||||
_______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_ASTR,_______,
|
||||
_______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
|
||||
_______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______,
|
||||
_______,_______,_______,_______,_______,
|
||||
_______,_______,
|
||||
_______,
|
||||
_______,_______,_______,
|
||||
// right hand
|
||||
_______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL,
|
||||
_______, KC_LABK, KC_HOME, KC_UP, KC_PGUP, KC_ASTR, _______,
|
||||
KC_RABK, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PLUS, _______,
|
||||
_______, KC_AMPR, KC_END, KC_DOWN, KC_PGDN, KC_BSLS, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
/* Keymap 2: Media and mouse keys
|
||||
*
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | | | L | MsUp | R | | | | | | 4 | 5 | 6 | | TAB |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | |MsLeft|MsDown|MsRght| |------| |------| | 1 | 2 | 3 | | |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | | | | | | | | | | | | 0 | 0 | | |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* | | | | | | | | | | | |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,-------------. ,-------------.
|
||||
* | | | | | |
|
||||
* ,------|------|------| |------+------+------.
|
||||
* | | | | | | | |
|
||||
* | | |------| |------| | |
|
||||
* | | | | | | | |
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[NUM] = LAYOUT_ergodox(
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______,
|
||||
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______,
|
||||
// right hand
|
||||
_______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_4, KC_5 , KC_6, _______, KC_TAB,
|
||||
_______, KC_1, KC_2 , KC_3, _______, _______,
|
||||
_______, _______, _______, KC_0, KC_0, _______, _______,
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______,
|
||||
_______,
|
||||
_______, _______, _______
|
||||
),
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (record->event.pressed) { // For resetting EEPROM
|
||||
eeconfig_init();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// dynamically generate these.
|
||||
case EPRM:
|
||||
if (record->event.pressed) {
|
||||
eeconfig_init();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case VRSN:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case RGB_SLD:
|
||||
if (record->event.pressed) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_mode(1);
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
uint8_t layer = biton32(layer_state);
|
||||
|
||||
ergodox_board_led_off();
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
switch (layer) {
|
||||
case 1:
|
||||
ergodox_board_led_on();
|
||||
break;
|
||||
case 3:
|
||||
ergodox_board_led_on();
|
||||
break;
|
||||
default:
|
||||
// none
|
||||
break;
|
||||
}
|
||||
|
||||
};
|
7
keyboards/ergodone/keymaps/kloki/readme.md
Normal file
7
keyboards/ergodone/keymaps/kloki/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Kloki's ergodone layout
|
||||
|
||||
-workman
|
||||
-qwerty layer
|
||||
-num layer
|
||||
-overloaded modifier
|
||||
-a lot of duplicated keys to make common shortcuts work
|
28
keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h
Executable file
28
keyboards/ergodox_ez/keymaps/bepo_tm_style/config.h
Executable file
@@ -0,0 +1,28 @@
|
||||
#include "../../config.h"
|
||||
|
||||
// Sets good default for the speed of the mouse.
|
||||
#undef MOUSEKEY_INTERVAL
|
||||
#undef MOUSEKEY_DELAY
|
||||
#undef MOUSEKEY_TIME_TO_MAX
|
||||
#undef MOUSEKEY_MAX_SPEED
|
||||
|
||||
#define MOUSEKEY_INTERVAL 20
|
||||
#define MOUSEKEY_DELAY 100
|
||||
#define MOUSEKEY_TIME_TO_MAX 60
|
||||
#define MOUSEKEY_MAX_SPEED 7
|
||||
|
||||
#undef MOUSEKEY_WHEEL_MAX_SPEED
|
||||
#undef MOUSEKEY_WHEEL_TIME_TO_MAX
|
||||
#undef MOUSEKEY_WHEEL_DELAY
|
||||
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 5
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 60
|
||||
#define MOUSEKEY_WHEEL_DELAY 100
|
||||
|
||||
#undef TAPPING_TOGGLE
|
||||
#undef TAPPING_TERM
|
||||
#undef IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
#define TAPPING_TOGGLE 1
|
||||
#define TAPPING_TERM 150
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
353
keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c
Executable file
353
keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c
Executable file
@@ -0,0 +1,353 @@
|
||||
// An Ergodox EZ keymap meant to be used with a bépo layout (FR ergonomic
|
||||
// layout, dvorak style). The overall design is slightly inspired by the
|
||||
// TypeMatrix keyboard. Switching between a TypeMatrix and an Ergodox with this
|
||||
// layout should be relatively easy.
|
||||
//
|
||||
// See the README.md file for an image of this keymap.
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_bepo.h"
|
||||
|
||||
// The layers that we are defining for this keyboards.
|
||||
#define BASE 0
|
||||
#define FN 1
|
||||
#define MOUSE 2
|
||||
#define NUMS 3
|
||||
#define SWAP 4
|
||||
#define SYSLEDS 5
|
||||
|
||||
// The Tap Dance identifiers, used in the TD keycode and tap_dance_actions array.
|
||||
#define TAP_MACRO 0
|
||||
|
||||
// A 'transparent' key code (that falls back to the layers below it).
|
||||
#define ___ KC_TRANSPARENT
|
||||
|
||||
// A 'blocking' key code. Does nothing but prevent falling back to another layer.
|
||||
#define XXX KC_NO
|
||||
|
||||
// Some combined keys (one normal keycode when tapped and one modifier or layer
|
||||
// toggle when held).
|
||||
#define ESC_FN LT(FN, KC_ESC) // ESC key and FN layer toggle.
|
||||
#define M_RSFT MT(MOD_RSFT, BP_M) // 'M' key and right shift modifier.
|
||||
#define W_RCTL MT(MOD_RCTL, BP_W) // 'W' key and right control modifier.
|
||||
#define SPC_RALT MT(MOD_RALT, KC_SPC) // SPACE key and right alt modifier.
|
||||
#define PERC_FN LT(FN, BP_PERC) // '%' key and FN layer toggle.
|
||||
|
||||
// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators).
|
||||
#define MK_CUT LSFT(KC_DEL) // shift + delete
|
||||
#define MK_COPY LCTL(KC_INS) // ctrl + insert
|
||||
#define MK_PASTE LSFT(KC_INS) // shift + insert
|
||||
|
||||
// Custom keycodes
|
||||
enum {
|
||||
// SAFE_RANGE must be used to tag the first element of the enum.
|
||||
// DYNAMIC_MACRO_RANGE must always be the last element of the enum if other
|
||||
// values are added (as its value is used to create a couple of other keycodes
|
||||
// after it).
|
||||
DYNAMIC_MACRO_RANGE = SAFE_RANGE,
|
||||
};
|
||||
|
||||
// This file must be included after DYNAMIC_MACRO_RANGE is defined...
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Layer 0: basic keys.
|
||||
[BASE] = KEYMAP(
|
||||
/* left hand */
|
||||
BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL,
|
||||
KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC,
|
||||
KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM,
|
||||
KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT,
|
||||
ESC_FN, BP_ECRC, KC_LGUI, KC_LALT, SPC_RALT,
|
||||
TT(SWAP), KC_MNXT,
|
||||
KC_MPLY,
|
||||
TT(FN), TT(NUMS), KC_MPRV,
|
||||
/* right hand */
|
||||
KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL,
|
||||
KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z,
|
||||
BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT,
|
||||
KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, W_RCTL,
|
||||
SPC_RALT, KC_LALT, TT(SYSLEDS), BP_CCED, PERC_FN,
|
||||
KC_LEFT, KC_RIGHT,
|
||||
KC_UP,
|
||||
KC_DOWN, TD(TAP_MACRO), TT(MOUSE)),
|
||||
|
||||
// Layer 1: function and media keys.
|
||||
[FN] = KEYMAP(
|
||||
/* left hand */
|
||||
KC_SLEP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, KC_LSFT,
|
||||
___, ___, MK_CUT, MK_COPY, MK_PASTE, KC_LCTRL, ___,
|
||||
___, ___, ___, ___, ___,
|
||||
___, KC_VOLU,
|
||||
KC_VOLD,
|
||||
___, ___, KC_MUTE,
|
||||
/* right hand */
|
||||
___, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
___, ___, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_F12,
|
||||
___, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDN, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___,
|
||||
KC_HOME, KC_END,
|
||||
KC_PGUP,
|
||||
KC_PGDN, ___, ___),
|
||||
// Note that any change to the FN layer above must be added to
|
||||
// the MOUSE layer below (except for the arrow keys).
|
||||
|
||||
// Layer 2: Mouse control.
|
||||
[MOUSE] = KEYMAP(
|
||||
/* left hand */
|
||||
KC_SLEP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ___,
|
||||
___, ___, KC_BTN4, KC_MS_U, KC_BTN5, ___, ___,
|
||||
___, ___, KC_MS_L, KC_MS_D, KC_MS_R, KC_LSFT,
|
||||
___, ___, MK_CUT, MK_COPY, MK_PASTE, KC_LCTRL, ___,
|
||||
___, ___, ___, ___, ___,
|
||||
___, KC_VOLU,
|
||||
KC_VOLD,
|
||||
___, ___, KC_MUTE,
|
||||
/* right hand */
|
||||
___, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
___, ___, XXX, KC_WH_U, XXX, XXX, KC_F12,
|
||||
___, KC_WH_L, KC_WH_D, KC_WH_R, XXX, ___,
|
||||
___, ___, KC_ACL0, KC_ACL1, KC_ACL2, ___, ___,
|
||||
KC_BTN1, KC_BTN2, KC_BTN3, ___, ___,
|
||||
___, ___,
|
||||
___,
|
||||
___, ___, ___),
|
||||
|
||||
// Layer 3: Numeric keypad and system keys.
|
||||
[NUMS] = KEYMAP(
|
||||
/* left hand */
|
||||
KC_PSCR, KC_INS, KC_PAUS, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___,
|
||||
___, ___, MK_CUT, MK_COPY, MK_PASTE, ___, ___,
|
||||
___, ___, ___, ___, ___,
|
||||
___, ___,
|
||||
___,
|
||||
___, ___, ___,
|
||||
/* right hand */
|
||||
___, ___, ___, ___, ___, ___, KC_NLCK,
|
||||
___, KC_PEQL, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_SLCK,
|
||||
KC_PCMM, KC_P4, KC_P5, KC_P6, KC_PPLS, ___,
|
||||
KC_PENT, KC_P0, KC_P1, KC_P2, KC_P3, KC_PAST, ___,
|
||||
___, ___, ___, KC_PSLS, ___,
|
||||
___, ___,
|
||||
___,
|
||||
___, ___, ___),
|
||||
|
||||
// Layer 4: hand swap, all keys are mirrored to the other side of the keyboard
|
||||
// except for the layer toggle itself (so there is no right arrow when this
|
||||
// layer is activated).
|
||||
[SWAP] = KEYMAP(
|
||||
/* left hand */
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___,
|
||||
TT(SWAP), ___,
|
||||
___,
|
||||
___, ___, ___,
|
||||
/* right hand */
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___,
|
||||
___, TT(SWAP),
|
||||
___,
|
||||
___, ___, ___),
|
||||
|
||||
// Layer 5: The LEDs are showing the "standard" caps/num/scroll lock indicator
|
||||
// instead of their default which shows the currently active layers (FN, NUMS,
|
||||
// and MOUSE in that order).
|
||||
[SYSLEDS] = KEYMAP(
|
||||
/* left hand */
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___,
|
||||
___, ___,
|
||||
___,
|
||||
___, ___, ___,
|
||||
/* right hand */
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___,
|
||||
___, ___, ___, ___, ___, ___, ___,
|
||||
___, ___, TT(SYSLEDS), ___, ___,
|
||||
___, ___,
|
||||
___,
|
||||
___, ___, ___),
|
||||
};
|
||||
|
||||
// Whether the macro 1 is currently being recorded.
|
||||
static bool is_macro1_recording = false;
|
||||
|
||||
// The current set of active layers (as a bitmask).
|
||||
// There is a global 'layer_state' variable but it is set after the call
|
||||
// to layer_state_set_user().
|
||||
static uint32_t current_layer_state = 0;
|
||||
uint32_t layer_state_set_user(uint32_t state);
|
||||
|
||||
// Method called at the end of the tap dance on the TAP_MACRO key. That key is
|
||||
// used to start recording a macro (double tap or more), to stop recording (any
|
||||
// number of tap), or to play the recorded macro (1 tap).
|
||||
void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) {
|
||||
uint16_t keycode;
|
||||
keyrecord_t record;
|
||||
dprintf("macro_tap_dance_fn %d\n", state->count);
|
||||
if (is_macro1_recording) {
|
||||
keycode = DYN_REC_STOP;
|
||||
is_macro1_recording = false;
|
||||
layer_state_set_user(current_layer_state);
|
||||
} else if (state->count == 1) {
|
||||
keycode = DYN_MACRO_PLAY1;
|
||||
} else {
|
||||
keycode = DYN_REC_START1;
|
||||
is_macro1_recording = true;
|
||||
layer_state_set_user(current_layer_state);
|
||||
}
|
||||
|
||||
record.event.pressed = true;
|
||||
process_record_dynamic_macro(keycode, &record);
|
||||
record.event.pressed = false;
|
||||
process_record_dynamic_macro(keycode, &record);
|
||||
}
|
||||
|
||||
// The definition of the tap dance actions:
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// This Tap dance plays the macro 1 on TAP and records it on double tap.
|
||||
[TAP_MACRO] = ACTION_TAP_DANCE_FN(macro_tapdance_fn),
|
||||
};
|
||||
|
||||
// Runs for each key down or up event.
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (keycode != TD(TAP_MACRO)) {
|
||||
// That key is processed by the macro_tapdance_fn. Not ignoring it here is
|
||||
// mostly a no-op except that it is recorded in the macros (and uses space).
|
||||
// We can't just return false when the key is a tap dance, because
|
||||
// process_record_user, is called before the tap dance processing (and
|
||||
// returning false would eat the tap dance).
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true; // Let QMK send the enter press/release events
|
||||
}
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
ergodox_right_led_1_off();
|
||||
ergodox_right_led_2_off();
|
||||
ergodox_right_led_3_off();
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// The state of the LEDs requested by the system, as a bitmask.
|
||||
static uint8_t sys_led_state = 0;
|
||||
|
||||
// Use these masks to read the system LEDs state.
|
||||
static const uint8_t sys_led_mask_num_lock = 1 << USB_LED_NUM_LOCK;
|
||||
static const uint8_t sys_led_mask_caps_lock = 1 << USB_LED_CAPS_LOCK;
|
||||
static const uint8_t sys_led_mask_scroll_lock = 1 << USB_LED_SCROLL_LOCK;
|
||||
|
||||
// Value to use to switch LEDs on. The default value of 255 is far too bright.
|
||||
static const uint8_t max_led_value = 20;
|
||||
|
||||
// Whether the given layer (one of the constant defined at the top) is active.
|
||||
#define LAYER_ON(layer) (current_layer_state & (1<<layer))
|
||||
|
||||
void led_1_on(void) {
|
||||
ergodox_right_led_1_on();
|
||||
ergodox_right_led_1_set(max_led_value);
|
||||
}
|
||||
|
||||
void led_2_on(void) {
|
||||
ergodox_right_led_2_on();
|
||||
ergodox_right_led_2_set(max_led_value);
|
||||
}
|
||||
|
||||
void led_3_on(void) {
|
||||
ergodox_right_led_3_on();
|
||||
ergodox_right_led_3_set(max_led_value);
|
||||
}
|
||||
|
||||
void led_1_off(void) {
|
||||
ergodox_right_led_1_off();
|
||||
}
|
||||
|
||||
void led_2_off(void) {
|
||||
ergodox_right_led_2_off();
|
||||
}
|
||||
|
||||
void led_3_off(void) {
|
||||
ergodox_right_led_3_off();
|
||||
}
|
||||
|
||||
// Called when the computer wants to change the state of the keyboard LEDs.
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
sys_led_state = usb_led;
|
||||
if (LAYER_ON(SYSLEDS)) {
|
||||
if (sys_led_state & sys_led_mask_caps_lock) {
|
||||
led_1_on();
|
||||
} else {
|
||||
led_1_off();
|
||||
}
|
||||
if (sys_led_state & sys_led_mask_num_lock) {
|
||||
led_2_on();
|
||||
} else {
|
||||
led_2_off();
|
||||
}
|
||||
if (sys_led_state & sys_led_mask_scroll_lock) {
|
||||
led_3_on();
|
||||
} else {
|
||||
led_3_off();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
current_layer_state = state;
|
||||
swap_hands = LAYER_ON(SWAP);
|
||||
|
||||
if (is_macro1_recording) {
|
||||
led_1_on();
|
||||
led_2_on();
|
||||
led_3_on();
|
||||
return state;
|
||||
}
|
||||
|
||||
if (LAYER_ON(SYSLEDS)) {
|
||||
led_set_user(sys_led_state);
|
||||
return state;
|
||||
}
|
||||
|
||||
if (LAYER_ON(FN)) {
|
||||
led_1_on();
|
||||
} else {
|
||||
led_1_off();
|
||||
}
|
||||
|
||||
if (LAYER_ON(NUMS)) {
|
||||
led_2_on();
|
||||
} else {
|
||||
led_2_off();
|
||||
}
|
||||
|
||||
if (LAYER_ON(MOUSE)) {
|
||||
led_3_on();
|
||||
} else {
|
||||
led_3_off();
|
||||
}
|
||||
|
||||
return state;
|
||||
};
|
22
keyboards/ergodox_ez/keymaps/bepo_tm_style/readme.md
Executable file
22
keyboards/ergodox_ez/keymaps/bepo_tm_style/readme.md
Executable file
@@ -0,0 +1,22 @@
|
||||
# Bépo compatible keymap for the Ergodox EZ, *TypeMatrix* style.
|
||||
|
||||
This keymap is meant to be used with a [Bépo](http://bepo.fr) layout. It is
|
||||
designed to be somewhat similar to a TypeMatrix keyboard so that switching
|
||||
between one and the other is easy.
|
||||
|
||||

|
||||
|
||||
## Build instruction
|
||||
|
||||
To build this on Windows, under Cygwin, provided that you have installed the
|
||||
Arduino environment and Teensy loaded in the default path, you can do:
|
||||
|
||||
```shell
|
||||
PATH=/cygdrive/c/Program\ Files\ \(x86\)/Arduino/hardware/tools/avr/bin:$PATH
|
||||
make ergodox_ez:bepo_tm_style:all
|
||||
```
|
||||
|
||||
## Debug
|
||||
|
||||
See https://github.com/tmk/tmk_keyboard#magic-commands for command that can help
|
||||
debug, together with the hid_listen tool (https://docs.qmk.fm/faq_debug.html).
|
15
keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk
Executable file
15
keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk
Executable file
@@ -0,0 +1,15 @@
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - for issues, see github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
ONEHAND_ENABLE = yes # Allow swapping hands of keyboard
|
||||
KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key
|
||||
TAP_DANCE_ENABLE = yes # Enable the tap dance feature.
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
UNICODE_ENABLE = no
|
||||
SLEEP_LED_ENABLE = no
|
||||
API_SYSEX_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGBLIGHT_ANIMATION = no
|
@@ -1,9 +1,8 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
#include "../../config.h"
|
||||
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
@@ -13,6 +12,12 @@
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#define FORCE_NKRO
|
||||
#ifdef TAPPING_TERM
|
||||
#undef TAPPING_TERM
|
||||
#endif
|
||||
#define TAPPING_TERM 150
|
||||
#undef PERMISSIVE_HOLD
|
||||
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
|
||||
#define ONESHOT_TAP_TOGGLE 2
|
||||
|
||||
#endif
|
||||
|
@@ -15,15 +15,8 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "version.h"
|
||||
#include "drashna.h"
|
||||
|
||||
#include "keymap_german.h"
|
||||
|
||||
#include "keymap_nordic.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,18 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
bool skip_leds = false;
|
||||
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
#define KC_D3_1 TD(TD_D3_1)
|
||||
#define KC_D3_2 TD(TD_D3_2)
|
||||
#define KC_D3_3 TD(TD_D3_3)
|
||||
#define KC_D3_4 TD(TD_D3_4)
|
||||
#else
|
||||
#define KC_D3_1 KC_1
|
||||
#define KC_D3_2 KC_2
|
||||
#define KC_D3_3 KC_3
|
||||
#define KC_D3_4 KC_4
|
||||
#endif
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap 0: Basic layer
|
||||
@@ -71,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(_DIABLO),
|
||||
KC_BSPACE, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_LSHIFT, LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z),KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRAVE),KC_QUOTE, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
|
||||
ALT_T(KC_APPLICATION), KC_LGUI,
|
||||
@@ -81,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS,
|
||||
TG(_DIABLO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH,
|
||||
KC_H, KC_J, KC_K, KC_L, KC_SCOLON, GUI_T(KC_QUOTE),
|
||||
TG(_GAMEPAD), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),KC_RSHIFT,
|
||||
TG(_GAMEPAD), KC_N, KC_M, KC_COMMA, KC_DOT, RCTL_T(KC_SLASH),OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESCAPE),
|
||||
KC_PGUP,
|
||||
@@ -115,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LGUI,
|
||||
KC_HOME,
|
||||
@@ -124,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
|
||||
KC_H, KC_N, KC_E, KC_I, KC_O, GUI_T(KC_QUOTE),
|
||||
TG(_GAMEPAD),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
TG(_GAMEPAD),KC_K, KC_M, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_RGUI, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
@@ -156,9 +137,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_DVORAK] = LAYOUT_ergodox(
|
||||
// left hand
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I,
|
||||
KC_LSFT, LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_GAMEPAD),
|
||||
OSM(MOD_LSFT), LCTL_T(KC_SCLN), KC_Q, KC_J, KC_K, KC_X, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET, KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
@@ -167,7 +148,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
TG(_DIABLO), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH,
|
||||
KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,
|
||||
TG(_GAMEPAD),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), KC_RSHIFT,
|
||||
TG(_GAMEPAD),KC_B, KC_M, KC_W, KC_V, RCTL_T(KC_Z), OSM(MOD_RSFT),
|
||||
KC_LEFT,KC_DOWN,KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
@@ -178,11 +159,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,--------------------------------------------------. ,--------------------------------------------------.
|
||||
* | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
|
||||
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
|
||||
* | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ |
|
||||
* | Del | Q | D | R | W | B | L1 | | L1 | J | F | U | P | ; | \ |
|
||||
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
|
||||
* | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' |
|
||||
* | BkSp | A | S | H | T | D |------| |------| Y | N | E | O | I | ' |
|
||||
* |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------|
|
||||
* | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift |
|
||||
* | LShift |Z/Ctrl| X | M | C | V | | | | K | L | , | . |//Ctrl| RShift |
|
||||
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
|
||||
* |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
@@ -201,7 +182,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(_MOUS),
|
||||
KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, TG(_DIABLO),
|
||||
KC_BSPC, KC_A, KC_S, KC_H, KC_T, KC_G,
|
||||
KC_LSFT, LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(_GAMEPAD),
|
||||
OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V, TG(_GAMEPAD),
|
||||
LT(_SYMB,KC_GRV),KC_QUOT, KC_LGUI, KC_LBRACKET,KC_RBRACKET,
|
||||
ALT_T(KC_APP), KC_LEAD,
|
||||
KC_HOME,
|
||||
@@ -210,7 +191,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
TG(_MOUS), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
|
||||
TG(_DIABLO), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS,
|
||||
KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE,
|
||||
TG(_GAMEPAD),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), KC_RSHIFT,
|
||||
TG(_GAMEPAD),KC_K, KC_L, KC_COMM,KC_DOT, RCTL_T(KC_SLASH), OSM(MOD_RSFT),
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TT(_SYMB),
|
||||
KC_LALT, CTL_T(KC_ESC),
|
||||
KC_PGUP,
|
||||
@@ -239,7 +220,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_SYMB] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
EPRM, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_WORKMAN,
|
||||
VRSN, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_DVORAK,
|
||||
KC_MAKE, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRAVE,
|
||||
KC_RESET, KC_PERC, KC_CIRC, KC_LBRACKET,KC_RBRACKET,KC_TILD, KC_COLEMAK,
|
||||
@@ -280,7 +261,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_GAMEPAD] = LAYOUT_ergodox(
|
||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_ESCAPE, KC_TRNS, KC_TRNS, KC_TRNS, HYPR(KC_D), HYPR(KC_Q), HYPR(KC_GRV),
|
||||
KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F,
|
||||
KC_LCTL, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_TRNS,
|
||||
@@ -294,7 +275,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
TG(_GAMEPAD), KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_NO,
|
||||
KC_NO, KC_NO,
|
||||
KC_HYPR, MAGIC_TOGGLE_NKRO,
|
||||
KC_NO,
|
||||
KC_PGDOWN, KC_DELETE, KC_ENTER
|
||||
),
|
||||
@@ -364,7 +345,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* `--------------------' `--------------------'
|
||||
*/
|
||||
[_MOUS] = LAYOUT_ergodox(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_SECRET_1,KC_SECRET_2,KC_SECRET_3,KC_SECRET_4,KC_SECRET_5,KC_TRNS,
|
||||
KC_NO, KC_NO, KC_MS_U, KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO,
|
||||
KC_NO, KC_ACL0, KC_ACL1, KC_ACL2, KC_NO, KC_NO, KC_TRNS,
|
||||
|
@@ -4,8 +4,3 @@ COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
RGBLIGHT_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
|
||||
EXTRAFLAGS = -flto
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
61
keyboards/gherkin/keymaps/wanleg/config.h
Normal file
61
keyboards/gherkin/keymaps/wanleg/config.h
Normal file
@@ -0,0 +1,61 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6060
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER 40 Percent Club
|
||||
#define PRODUCT Gherkin
|
||||
#define DESCRIPTION A 30 key ortholinear keyboard
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
|
||||
#define MATRIX_COL_PINS { B4, E6, D7, C6, D4, D0 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B5
|
||||
#ifdef BACKLIGHT_PIN
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#endif
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
/*tap dance definition */
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
|
||||
#ifdef RGB_DI_PIN
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 0
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#endif
|
||||
|
||||
#endif
|
221
keyboards/gherkin/keymaps/wanleg/keymap.c
Normal file
221
keyboards/gherkin/keymaps/wanleg/keymap.c
Normal file
@@ -0,0 +1,221 @@
|
||||
/* Copyright 2017 Brian Fong
|
||||
*
|
||||
* 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 "gherkin.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 _QW 0
|
||||
#define DIR 1
|
||||
#define NUM 2
|
||||
#define ETC 3
|
||||
|
||||
|
||||
/////////////// TAP DANCE SECTION START ///////////////
|
||||
//Tap Dance Declarations (list of my tap dance configurations)
|
||||
enum {
|
||||
TD_SFT_CAPS = 0
|
||||
,TD_Q_ESC
|
||||
,ENT_TAP_DANCE
|
||||
,DEL_TAP_DANCE
|
||||
};
|
||||
|
||||
///// QUAD FUNCTION TAP DANCE GENERAL SETUP SECTION START /////
|
||||
///// (no need to edit this section) /////
|
||||
//Enums used to clearly convey the state of the tap dance
|
||||
enum {
|
||||
SINGLE_TAP = 1,
|
||||
SINGLE_HOLD = 2,
|
||||
DOUBLE_TAP = 3,
|
||||
DOUBLE_HOLD = 4,
|
||||
DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP
|
||||
// Add more enums here if you want for triple, quadruple, etc.
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
bool is_press_action;
|
||||
int state;
|
||||
} tap;
|
||||
|
||||
int cur_dance (qk_tap_dance_state_t *state) {
|
||||
if (state->count == 1) {
|
||||
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
|
||||
if (state->interrupted || !state->pressed) return SINGLE_TAP;
|
||||
if (state->interrupted) return SINGLE_TAP;
|
||||
else return SINGLE_HOLD;
|
||||
}
|
||||
//If count = 2, and it has been interrupted - assume that user is trying to type the letter associated
|
||||
//with single tap.
|
||||
else if (state->count == 2) {
|
||||
if (state->interrupted) return DOUBLE_SINGLE_TAP;
|
||||
else if (state->pressed) return DOUBLE_HOLD;
|
||||
else return DOUBLE_TAP;
|
||||
}
|
||||
else return 6; //magic number. At some point this method will expand to work for more presses
|
||||
}
|
||||
///// QUAD FUNCTION TAP DANCE GENERAL SETUP SECTION END /////
|
||||
///// QUAD FUNCTION TAP DANCE PERSONALIZATION SECTION START /////
|
||||
//instantialize an instance of 'tap' for the 'ENT' tap dance.
|
||||
static tap ENTtap_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void ENT_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
ENTtap_state.state = cur_dance(state);
|
||||
switch (ENTtap_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_SPC); break;
|
||||
case SINGLE_HOLD: register_code(KC_LSFT); break;
|
||||
case DOUBLE_TAP: register_code(KC_ENT); break;
|
||||
case DOUBLE_HOLD: register_code(KC_NO); break; // setting double hold to do nothing (change this if you want)
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_SPC); unregister_code(KC_SPC); register_code(KC_SPC);
|
||||
//Last case is for fast typing. Assuming your key is `f`:
|
||||
//For example, when typing the word `buffer`, and you want to make sure that you send `ff` and not `Esc`.
|
||||
//In order to type `ff` when typing fast, the next character will have to be hit within the `TAPPING_TERM`, which by default is 200ms.
|
||||
}
|
||||
}
|
||||
|
||||
void ENT_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (ENTtap_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_SPC); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_LSFT); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_ENT); break;
|
||||
case DOUBLE_HOLD: unregister_code(KC_NO);
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_SPC);
|
||||
}
|
||||
ENTtap_state.state = 0;
|
||||
}
|
||||
|
||||
//instanalize an instance of 'tap' for the 'DEL' tap dance.
|
||||
static tap DELtap_state = {
|
||||
.is_press_action = true,
|
||||
.state = 0
|
||||
};
|
||||
|
||||
void DEL_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||
DELtap_state.state = cur_dance(state);
|
||||
switch (DELtap_state.state) {
|
||||
case SINGLE_TAP: register_code(KC_BSPC); break;
|
||||
case SINGLE_HOLD: register_code(KC_LCTL); break;
|
||||
case DOUBLE_TAP: register_code(KC_DEL); break;
|
||||
case DOUBLE_HOLD: register_code(KC_NO); break;
|
||||
case DOUBLE_SINGLE_TAP: register_code(KC_BSPC); unregister_code(KC_BSPC); register_code(KC_BSPC);
|
||||
}
|
||||
}
|
||||
|
||||
void DEL_reset (qk_tap_dance_state_t *state, void *user_data) {
|
||||
switch (DELtap_state.state) {
|
||||
case SINGLE_TAP: unregister_code(KC_BSPC); break;
|
||||
case SINGLE_HOLD: unregister_code(KC_LCTL); break;
|
||||
case DOUBLE_TAP: unregister_code(KC_DEL); break;
|
||||
case DOUBLE_HOLD: unregister_code(KC_NO);
|
||||
case DOUBLE_SINGLE_TAP: unregister_code(KC_BSPC);
|
||||
}
|
||||
DELtap_state.state = 0;
|
||||
}
|
||||
///// QUAD FUNCTION TAP DANCE PERSONALIZATION SECTION END /////
|
||||
|
||||
//Tap Dance Definitions
|
||||
//THIS SECTION HAS TO BE AT THE END OF THE TAP DANCE SECTION
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_SFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS)
|
||||
// Other declarations would go here, separated by commas, if you have them
|
||||
,[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC)
|
||||
,[ENT_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ENT_finished, ENT_reset)
|
||||
,[DEL_TAP_DANCE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, DEL_finished, DEL_reset)
|
||||
};
|
||||
|
||||
//In Layer declaration, add tap dance item in place of a key code
|
||||
//TD(TD_SFT_CAPS)
|
||||
|
||||
///////////// TAP DANCE SECTION END ///////////////
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* .-----------------------------------------------------------------------------------------.
|
||||
* | Q//ESC | W | E | R | T | Y | U | I | O | P |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | A | S | D | F | G | H | J | K | L | ENTER |
|
||||
* | | | | | | | | | |SFThold |
|
||||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
* | Z | X | C | V/NUM | B/ETC | N | M/DIR | ,/GUI | ./ALT | BKSC |
|
||||
* | SFThold| | | | | | | | |CTRLhold|
|
||||
* '-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_QW] = KEYMAP( /* Qwerty*/
|
||||
TD(TD_Q_ESC), 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, SFT_T(KC_SPC),
|
||||
SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V), LT(ETC, KC_B), KC_N, LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC)
|
||||
),
|
||||
|
||||
|
||||
//
|
||||
///*
|
||||
// * Directional Modifiers
|
||||
// * .-----------------------------------------------------------------------------------------.
|
||||
// * | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = |
|
||||
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
// * | left | down | right | PrScr | SHIFT | CTRL | PgDn | END | [ | ] |
|
||||
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
// * | | | | | | | | | ALT | / |
|
||||
// * '-----------------------------------------------------------------------------------------'
|
||||
// */
|
||||
//
|
||||
[DIR] = KEYMAP( /* Directional Modifiers */
|
||||
KC_TAB, KC_UP, KC_TRNS, KC_INS, KC_LCTL, KC_RSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL ,
|
||||
KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC ,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_SLSH
|
||||
),
|
||||
//
|
||||
// /*
|
||||
// * Numbers
|
||||
// * .-----------------------------------------------------------------------------------------.
|
||||
// * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |
|
||||
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
// * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |
|
||||
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
// * | F11 | F12 | | | | ENTER | SHIFT | GUI | ./ALT | BKSC |
|
||||
// * | | | | | | | | | |CTRLhold|
|
||||
// * '-----------------------------------------------------------------------------------------'
|
||||
// */
|
||||
//
|
||||
[NUM] = KEYMAP ( /* Numbers */
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 ,
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 ,
|
||||
KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC)
|
||||
),
|
||||
//
|
||||
//
|
||||
// /*
|
||||
// * ETC
|
||||
// * .-----------------------------------------------------------------------------------------.
|
||||
// * | ` | | | | | | | | | \ |
|
||||
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
// * | CAPS | P-Brk | | | | | | | ; | ' |
|
||||
// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
// * | SHIFT | | | | | C-A-D | | GUI | | DEL |
|
||||
// * '-----------------------------------------------------------------------------------------'
|
||||
// */
|
||||
//
|
||||
[ETC] = KEYMAP( /* ETC */
|
||||
KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS ,
|
||||
KC_CAPS, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT ,
|
||||
KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LALT(LCTL(KC_DEL)), KC_TRNS, KC_RGUI, KC_TRNS, KC_DEL
|
||||
),
|
||||
};
|
12
keyboards/gherkin/keymaps/wanleg/readme.md
Normal file
12
keyboards/gherkin/keymaps/wanleg/readme.md
Normal file
@@ -0,0 +1,12 @@
|
||||

|
||||
|
||||
# Gherkin Wanleg Layout
|
||||
|
||||
Here is the layout I came up with to preserve a standard QWERTY layout as much as possible, in as few layers as possible for a 30 key board.
|
||||
I originally set up a few Tap Dance keys, but eventually dropped most of them in favor of chorded versions, since in actual use, they tended to impede typing speed more than their (current) two-key versions.
|
||||
I've left them in my layout ready for use if anyone wants to try them out:
|
||||
Single tap - Double tap - Hold
|
||||
space - enter - shift
|
||||
backspace - delete - control
|
||||
shift - caps lock - XXXX
|
||||
KC_Q - escape - XXXX
|
63
keyboards/gherkin/keymaps/wanleg/rules.mk
Normal file
63
keyboards/gherkin/keymaps/wanleg/rules.mk
Normal file
@@ -0,0 +1,63 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Processor frequency.
|
||||
# This will define a symbol, F_CPU, in all source code files equal to the
|
||||
# processor frequency in Hz. You can then use this symbol in your source code to
|
||||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
|
||||
# automatically to create a 32-bit value in your source code.
|
||||
#
|
||||
# This will be an integer division of F_USB below, as it is sourced by
|
||||
# F_USB after it has run through any CPU prescalers. Note that this value
|
||||
# does not *change* the processor frequency - it should merely be updated to
|
||||
# reflect the processor speed set externally so that the code can use accurate
|
||||
# software delays.
|
||||
F_CPU = 16000000
|
||||
|
||||
#
|
||||
# LUFA specific
|
||||
#
|
||||
# Target architecture (see library "Board Types" documentation).
|
||||
ARCH = AVR8
|
||||
|
||||
# Input clock frequency.
|
||||
# This will define a symbol, F_USB, in all source code files equal to the
|
||||
# input clock frequency (before any prescaling is performed) in Hz. This value may
|
||||
# differ from F_CPU if prescaling is used on the latter, and is required as the
|
||||
# raw input clock is fed directly to the PLL sections of the AVR for high speed
|
||||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
|
||||
# at the end, this will be done automatically to create a 32-bit value in your
|
||||
# source code.
|
||||
#
|
||||
# If no clock division is performed on the input clock inside the AVR (via the
|
||||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
# Interrupt driven control endpoint task(+60)
|
||||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = caterina
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
TAP_DANCE_ENABLE = yes # Enable Tap Dance (comment if not being implemented)
|
@@ -17,7 +17,7 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
#include QMK_KEYBOARD_CONFIG_H
|
||||
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
#define TAPPING_TERM 200
|
||||
|
@@ -74,9 +74,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
RESET , DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, DEBUG , RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------|
|
||||
BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
BL_STEP, RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------'
|
||||
_______, _______, _______, _______, _______, _______
|
||||
// `--------+--------+--------' `--------+--------+--------'
|
||||
|
@@ -23,6 +23,14 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
// output low
|
||||
DDRB |= (1<<2);
|
||||
PORTB &= ~(1<<2);
|
||||
} else {
|
||||
// Hi-Z
|
||||
DDRB &= ~(1<<2);
|
||||
PORTB &= ~(1<<2);
|
||||
}
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
1
keyboards/jc65/keymaps/coth/config.h
Normal file
1
keyboards/jc65/keymaps/coth/config.h
Normal file
@@ -0,0 +1 @@
|
||||
#include "../../config.h"
|
25
keyboards/jc65/keymaps/coth/keymap.c
Normal file
25
keyboards/jc65/keymaps/coth/keymap.c
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "jc65.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_INS,
|
||||
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_DEL,
|
||||
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_PGUP,
|
||||
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_UP, KC_PGDN,
|
||||
KC_LALT, KC_LCTL, KC_LGUI, KC_SPACE, KC_SPACE, KC_SPACE, MO(1), KC_NO, MO(2), KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
[1] = 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_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_BTN2, KC_MS_U, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_HOME, KC_END, KC_DEL, KC_TRNS,
|
||||
KC_CAPS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END
|
||||
),
|
||||
[2] = KEYMAP(
|
||||
RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_MOD, RGB_RMOD, BL_STEP, BL_TOGG, KC_TRNS, KC_TRNS, RESET,
|
||||
KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_MOD, 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
|
||||
),
|
||||
};
|
14
keyboards/jc65/keymaps/coth/readme.md
Normal file
14
keyboards/jc65/keymaps/coth/readme.md
Normal file
@@ -0,0 +1,14 @@
|
||||
ChildoftheHorn's Keymap
|
||||
===
|
||||
|
||||
Layer 1: "HHKB Mac" Split backspace, 6.25u space, caps is cntl
|
||||
|
||||
Layer 2: V60++ with mouse controls on WASD
|
||||
|
||||
Layer 3: RGB control on number row, LED controls, and Reset
|
||||
|
||||
Keymap Maintainer: [Stacy Devino](https://github.com/childofthehorn)
|
||||
|
||||
Difference from base layout: Primarily the HHKB-ness
|
||||
|
||||
Intended usage: Daily driver for programming
|
0
keyboards/jc65/keymaps/coth/rules.mk
Normal file
0
keyboards/jc65/keymaps/coth/rules.mk
Normal file
@@ -50,13 +50,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
// action_function_tap may also handle this...
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(3);
|
||||
breathing_period_set(3);
|
||||
breathing_enable();
|
||||
layer_on(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_period_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(1);
|
||||
}
|
||||
@@ -64,13 +64,13 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
case M_LAYER2:
|
||||
if (record->event.pressed)
|
||||
{
|
||||
breathing_speed_set(2);
|
||||
breathing_period_set(2);
|
||||
breathing_pulse();
|
||||
layer_on(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
breathing_speed_set(1);
|
||||
breathing_period_set(1);
|
||||
breathing_self_disable();
|
||||
layer_off(2);
|
||||
}
|
||||
|
@@ -15,6 +15,8 @@ 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 "config_common.h"
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
@@ -39,6 +41,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#define NO_UART 1
|
||||
|
||||
/* RGB underglow */
|
||||
// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards.
|
||||
// The same pin is used on the JJ40, at least.
|
||||
#define RGBLED_NUM 5
|
||||
#define RGB_DI_PIN E2
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
|
||||
|
||||
|
@@ -22,19 +22,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#include "action_layer.h"
|
||||
#include "quantum.h"
|
||||
|
||||
#include "i2c.h"
|
||||
|
||||
// custom RGB driver
|
||||
extern rgblight_config_t rgblight_config;
|
||||
void rgblight_set(void) {
|
||||
if (!rgblight_config.enable) {
|
||||
for (uint8_t i=0; i<RGBLED_NUM; i++) {
|
||||
led[i].r = 0;
|
||||
led[i].g = 0;
|
||||
led[i].b = 0;
|
||||
}
|
||||
}
|
||||
|
||||
i2c_init();
|
||||
i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM);
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
/* Nothing to do here... yet */
|
||||
rgblight_task();
|
||||
/* Nothing else for now. */
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
|
||||
// Call the keymap level matrix init.
|
||||
matrix_init_user();
|
||||
|
||||
// Set our LED pins as output
|
||||
DDRB |= (1<<6);
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
}
|
@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifndef KEYMAP_COMMON_H
|
||||
#define KEYMAP_COMMON_H
|
||||
|
||||
#include "quantum.h"
|
||||
#include "quantum_keycodes.h"
|
||||
#include "keycode.h"
|
||||
#include "action.h"
|
||||
@@ -64,6 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
{ K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \
|
||||
}
|
||||
|
||||
#define KEYMAP KEYMAP_OFFSET
|
||||
#define KEYMAP KEYMAP_MIT
|
||||
|
||||
#endif
|
||||
|
@@ -11,7 +11,11 @@ MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = yes # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_CUSTOM_DRIVER = yes
|
||||
DISABLE_WS2812 = yes
|
||||
|
||||
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
||||
|
85
keyboards/jj40/keymaps/krusli/keymap.c
Normal file
85
keyboards/jj40/keymaps/krusli/keymap.c
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "jj40.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
|
||||
enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
};
|
||||
|
||||
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 | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP( \
|
||||
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, KC_ENT , \
|
||||
_______, KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP( \
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,_______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | RGB | RGB | RGB | RGB |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | RGB | RGB | RGB | RGB | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = KEYMAP( \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, _______, \
|
||||
_______, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
|
||||
)
|
||||
};
|
2
keyboards/jj40/keymaps/krusli/readme.md
Normal file
2
keyboards/jj40/keymaps/krusli/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# krusli
|
||||
Default JJ40 keymap, adapted with RGB underglow support. GUI and LAlt is also swapped.
|
@@ -26,6 +26,10 @@ enum custom_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
CC_ARRW,
|
||||
CC_PRN,
|
||||
CC_BRC,
|
||||
CC_CBR,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
@@ -51,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Ins | | | | | | Left | Down | Up |Right | | |
|
||||
* | Ins | | | () | [] | {} | Left | Down | Up |Right | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* |PrScr | Back | Fwd | | | | | | Mute | Vol- | Vol+ | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
@@ -60,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
*/
|
||||
[_LOWER] = 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_INS, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \
|
||||
KC_PSCR, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \
|
||||
_______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \
|
||||
),
|
||||
@@ -71,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Tab | $ | % | ^ | [ | ] | 4 | 5 | 6 | - | + |Enter |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | ` | ! | @ | # | { | } | 1 | 2 | 3 | . | \ | | |
|
||||
* | -> | ! | @ | # | { | } | 1 | 2 | 3 | . | \ | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | OS | Alt | |Shift | | 0 | Home | PgDn | PgUp | End |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
@@ -79,7 +83,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_RAISE] = KEYMAP( \
|
||||
KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, KC_BSPC, KC_DEL, \
|
||||
KC_TAB, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, _______, \
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, KC_PIPE, \
|
||||
CC_ARRW, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, KC_PIPE, \
|
||||
_______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case CC_ARRW:
|
||||
SEND_STRING("->");
|
||||
return false;
|
||||
case CC_PRN:
|
||||
SEND_STRING("()"SS_TAP(X_LEFT));
|
||||
return false;
|
||||
case CC_BRC:
|
||||
SEND_STRING("[]"SS_TAP(X_LEFT));
|
||||
return false;
|
||||
case CC_CBR:
|
||||
SEND_STRING("{}"SS_TAP(X_LEFT));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ F_CPU = 12000000
|
||||
|
||||
# Bootloader
|
||||
# This definition is optional, and if your keyboard supports multiple bootloaders of
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# different sizes, comment this out, and the correct address will be loaded
|
||||
# automatically (+60). See bootloader.mk for all options.
|
||||
BOOTLOADER = bootloadHID
|
||||
|
||||
@@ -37,8 +37,11 @@ EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGBLIGHT_CUSTOM_DRIVER = no
|
||||
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGBLIGHT_CUSTOM_DRIVER = yes
|
||||
DISABLE_WS2812 = yes # TODO check if this is necessary
|
||||
|
||||
KEY_LOCK_ENABLE = yes
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
|
@@ -118,7 +118,8 @@ section at the end of this file).
|
||||
/* Define this to 1 if the device has its own power supply. Set it to 0 if the
|
||||
* device is powered from the USB bus.
|
||||
*/
|
||||
#define USB_CFG_MAX_BUS_POWER 500
|
||||
// max power draw with maxed white underglow measured at 120 mA (peaks)
|
||||
#define USB_CFG_MAX_BUS_POWER 150
|
||||
/* Set this variable to the maximum USB bus power consumption of your device.
|
||||
* The value is in milliamperes. [It will be divided by two since USB
|
||||
* communicates power requirements in units of 2 mA.]
|
||||
|
191
keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.c
Normal file
191
keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.c
Normal file
@@ -0,0 +1,191 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
#include "hal.h"
|
||||
|
||||
#if HAL_USE_PAL || defined(__DOXYGEN__)
|
||||
/**
|
||||
* @brief PAL setup.
|
||||
* @details Digital I/O ports static configuration as defined in @p board.h.
|
||||
* This variable is used by the HAL when initializing the PAL driver.
|
||||
*/
|
||||
const PALConfig pal_default_config =
|
||||
{
|
||||
.ports = {
|
||||
{
|
||||
/*
|
||||
* PORTA setup.
|
||||
*
|
||||
* PTA4 - PIN33
|
||||
* PTA5 - PIN24
|
||||
* PTA12 - PIN3
|
||||
* PTA13 - PIN4
|
||||
*
|
||||
* PTA18/19 crystal
|
||||
* PTA0/3 SWD
|
||||
*/
|
||||
.port = IOPORT1,
|
||||
.pads = {
|
||||
PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* PORTB setup.
|
||||
*
|
||||
* PTB0 - PIN16
|
||||
* PTB1 - PIN17
|
||||
* PTB2 - PIN19
|
||||
* PTB3 - PIN18
|
||||
* PTB16 - PIN0 - UART0_TX
|
||||
* PTB17 - PIN1 - UART0_RX
|
||||
* PTB18 - PIN32
|
||||
* PTB19 - PIN25
|
||||
*/
|
||||
.port = IOPORT2,
|
||||
.pads = {
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3,
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* PORTC setup.
|
||||
*
|
||||
* PTC0 - PIN15
|
||||
* PTC1 - PIN22
|
||||
* PTC2 - PIN23
|
||||
* PTC3 - PIN9
|
||||
* PTC4 - PIN10
|
||||
* PTC5 - PIN13
|
||||
* PTC6 - PIN11
|
||||
* PTC7 - PIN12
|
||||
* PTC8 - PIN28
|
||||
* PTC9 - PIN27
|
||||
* PTC10 - PIN29
|
||||
* PTC11 - PIN30
|
||||
*/
|
||||
.port = IOPORT3,
|
||||
.pads = {
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* PORTD setup.
|
||||
*
|
||||
* PTD0 - PIN2
|
||||
* PTD1 - PIN14
|
||||
* PTD2 - PIN7
|
||||
* PTD3 - PIN8
|
||||
* PTD4 - PIN6
|
||||
* PTD5 - PIN20
|
||||
* PTD6 - PIN21
|
||||
* PTD7 - PIN5
|
||||
*/
|
||||
.port = IOPORT4,
|
||||
.pads = {
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL,
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
},
|
||||
},
|
||||
{
|
||||
/*
|
||||
* PORTE setup.
|
||||
*
|
||||
* PTE0 - PIN31
|
||||
* PTE1 - PIN26
|
||||
*/
|
||||
.port = IOPORT5,
|
||||
.pads = {
|
||||
PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
// NOTE: This value comes from kiibohd/controller and is the location of a value
|
||||
// which needs to be checked before disabling the watchdog (which happens in
|
||||
// k20x_clock_init)
|
||||
#define WDOG_TMROUTL *(volatile uint16_t *)0x40052012
|
||||
|
||||
/**
|
||||
* @brief Early initialization code.
|
||||
* @details This initialization must be performed just after stack setup
|
||||
* and before any other initialization.
|
||||
*/
|
||||
void __early_init(void) {
|
||||
// This is a dirty hack and should only be used as a temporary fix until this
|
||||
// is upstreamed.
|
||||
while (WDOG_TMROUTL < 2); // Must wait for WDOG timer if already running, before jumping
|
||||
|
||||
k20x_clock_init();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Board-specific initialization code.
|
||||
* @todo Add your board-specific code, if any.
|
||||
*/
|
||||
void boardInit(void) {
|
||||
}
|
295
keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.h
Normal file
295
keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.h
Normal file
@@ -0,0 +1,295 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
/*
|
||||
* Setup for the PJRC Teensy 3.1 board.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Board identifier.
|
||||
*/
|
||||
#define BOARD_PJRC_TEENSY_3_1
|
||||
#define BOARD_NAME "PJRC Teensy 3.1"
|
||||
|
||||
/* External 16 MHz crystal */
|
||||
#define KINETIS_XTAL_FREQUENCY 16000000UL
|
||||
|
||||
/* Use internal capacitors for the crystal */
|
||||
#define KINETIS_BOARD_OSCILLATOR_SETTING OSC_CR_SC8P|OSC_CR_SC2P
|
||||
|
||||
/*
|
||||
* MCU type
|
||||
*/
|
||||
#define K20x7
|
||||
|
||||
/*
|
||||
* IO pins assignments.
|
||||
*/
|
||||
#define PORTA_PIN0 0
|
||||
#define PORTA_PIN1 1
|
||||
#define PORTA_PIN2 2
|
||||
#define PORTA_PIN3 3
|
||||
#define TEENSY_PIN33 4
|
||||
#define TEENSY_PIN24 5
|
||||
#define PORTA_PIN6 6
|
||||
#define PORTA_PIN7 7
|
||||
#define PORTA_PIN8 8
|
||||
#define PORTA_PIN9 9
|
||||
#define PORTA_PIN10 10
|
||||
#define PORTA_PIN11 11
|
||||
#define TEENSY_PIN3 12
|
||||
#define TEENSY_PIN4 13
|
||||
#define PORTA_PIN14 14
|
||||
#define PORTA_PIN15 15
|
||||
#define PORTA_PIN16 16
|
||||
#define PORTA_PIN17 17
|
||||
#define PORTA_PIN18 18
|
||||
#define PORTA_PIN19 19
|
||||
#define PORTA_PIN20 20
|
||||
#define PORTA_PIN21 21
|
||||
#define PORTA_PIN22 22
|
||||
#define PORTA_PIN23 23
|
||||
#define PORTA_PIN24 24
|
||||
#define PORTA_PIN25 25
|
||||
#define PORTA_PIN26 26
|
||||
#define PORTA_PIN27 27
|
||||
#define PORTA_PIN28 28
|
||||
#define PORTA_PIN29 29
|
||||
#define PORTA_PIN30 30
|
||||
#define PORTA_PIN31 31
|
||||
|
||||
#define TEENSY_PIN3_IOPORT IOPORT1
|
||||
#define TEENSY_PIN4_IOPORT IOPORT1
|
||||
#define TEENSY_PIN24_IOPORT IOPORT1
|
||||
#define TEENSY_PIN33_IOPORT IOPORT1
|
||||
|
||||
#define TEENSY_PIN16 0
|
||||
#define TEENSY_PIN17 1
|
||||
#define TEENSY_PIN19 2
|
||||
#define TEENSY_PIN18 3
|
||||
#define PORTB_PIN4 4
|
||||
#define PORTB_PIN5 5
|
||||
#define PORTB_PIN6 6
|
||||
#define PORTB_PIN7 7
|
||||
#define PORTB_PIN8 8
|
||||
#define PORTB_PIN9 9
|
||||
#define PORTB_PIN10 10
|
||||
#define PORTB_PIN11 11
|
||||
#define PORTB_PIN12 12
|
||||
#define PORTB_PIN13 13
|
||||
#define PORTB_PIN14 14
|
||||
#define PORTB_PIN15 15
|
||||
#define TEENSY_PIN0 16
|
||||
#define TEENSY_PIN1 17
|
||||
#define TEENSY_PIN32 18
|
||||
#define TEENSY_PIN25 19
|
||||
#define PORTB_PIN20 20
|
||||
#define PORTB_PIN21 21
|
||||
#define PORTB_PIN22 22
|
||||
#define PORTB_PIN23 23
|
||||
#define PORTB_PIN24 24
|
||||
#define PORTB_PIN25 25
|
||||
#define PORTB_PIN26 26
|
||||
#define PORTB_PIN27 27
|
||||
#define PORTB_PIN28 28
|
||||
#define PORTB_PIN29 29
|
||||
#define PORTB_PIN30 30
|
||||
#define PORTB_PIN31 31
|
||||
|
||||
#define TEENSY_PIN0_IOPORT IOPORT2
|
||||
#define TEENSY_PIN1_IOPORT IOPORT2
|
||||
#define TEENSY_PIN16_IOPORT IOPORT2
|
||||
#define TEENSY_PIN17_IOPORT IOPORT2
|
||||
#define TEENSY_PIN18_IOPORT IOPORT2
|
||||
#define TEENSY_PIN19_IOPORT IOPORT2
|
||||
#define TEENSY_PIN25_IOPORT IOPORT2
|
||||
#define TEENSY_PIN32_IOPORT IOPORT2
|
||||
|
||||
#define TEENSY_PIN15 0
|
||||
#define TEENSY_PIN22 1
|
||||
#define TEENSY_PIN23 2
|
||||
#define TEENSY_PIN9 3
|
||||
#define TEENSY_PIN10 4
|
||||
#define TEENSY_PIN13 5
|
||||
#define TEENSY_PIN11 6
|
||||
#define TEENSY_PIN12 7
|
||||
#define TEENSY_PIN28 8
|
||||
#define TEENSY_PIN27 9
|
||||
#define TEENSY_PIN29 10
|
||||
#define TEENSY_PIN30 11
|
||||
#define PORTC_PIN12 12
|
||||
#define PORTC_PIN13 13
|
||||
#define PORTC_PIN14 14
|
||||
#define PORTC_PIN15 15
|
||||
#define PORTC_PIN16 16
|
||||
#define PORTC_PIN17 17
|
||||
#define PORTC_PIN18 18
|
||||
#define PORTC_PIN19 19
|
||||
#define PORTC_PIN20 20
|
||||
#define PORTC_PIN21 21
|
||||
#define PORTC_PIN22 22
|
||||
#define PORTC_PIN23 23
|
||||
#define PORTC_PIN24 24
|
||||
#define PORTC_PIN25 25
|
||||
#define PORTC_PIN26 26
|
||||
#define PORTC_PIN27 27
|
||||
#define PORTC_PIN28 28
|
||||
#define PORTC_PIN29 29
|
||||
#define PORTC_PIN30 30
|
||||
#define PORTC_PIN31 31
|
||||
|
||||
#define TEENSY_PIN9_IOPORT IOPORT3
|
||||
#define TEENSY_PIN10_IOPORT IOPORT3
|
||||
#define TEENSY_PIN11_IOPORT IOPORT3
|
||||
#define TEENSY_PIN12_IOPORT IOPORT3
|
||||
#define TEENSY_PIN13_IOPORT IOPORT3
|
||||
#define TEENSY_PIN15_IOPORT IOPORT3
|
||||
#define TEENSY_PIN22_IOPORT IOPORT3
|
||||
#define TEENSY_PIN23_IOPORT IOPORT3
|
||||
#define TEENSY_PIN27_IOPORT IOPORT3
|
||||
#define TEENSY_PIN28_IOPORT IOPORT3
|
||||
#define TEENSY_PIN29_IOPORT IOPORT3
|
||||
#define TEENSY_PIN30_IOPORT IOPORT3
|
||||
|
||||
#define TEENSY_PIN2 0
|
||||
#define TEENSY_PIN14 1
|
||||
#define TEENSY_PIN7 2
|
||||
#define TEENSY_PIN8 3
|
||||
#define TEENSY_PIN6 4
|
||||
#define TEENSY_PIN20 5
|
||||
#define TEENSY_PIN21 6
|
||||
#define TEENSY_PIN5 7
|
||||
#define PORTD_PIN8 8
|
||||
#define PORTD_PIN9 9
|
||||
#define PORTD_PIN10 10
|
||||
#define PORTD_PIN11 11
|
||||
#define PORTD_PIN12 12
|
||||
#define PORTD_PIN13 13
|
||||
#define PORTD_PIN14 14
|
||||
#define PORTD_PIN15 15
|
||||
#define PORTD_PIN16 16
|
||||
#define PORTD_PIN17 17
|
||||
#define PORTD_PIN18 18
|
||||
#define PORTD_PIN19 19
|
||||
#define PORTD_PIN20 20
|
||||
#define PORTD_PIN21 21
|
||||
#define PORTD_PIN22 22
|
||||
#define PORTD_PIN23 23
|
||||
#define PORTD_PIN24 24
|
||||
#define PORTD_PIN25 25
|
||||
#define PORTD_PIN26 26
|
||||
#define PORTD_PIN27 27
|
||||
#define PORTD_PIN28 28
|
||||
#define PORTD_PIN29 29
|
||||
#define PORTD_PIN30 30
|
||||
#define PORTD_PIN31 31
|
||||
|
||||
#define TEENSY_PIN2_IOPORT IOPORT4
|
||||
#define TEENSY_PIN5_IOPORT IOPORT4
|
||||
#define TEENSY_PIN6_IOPORT IOPORT4
|
||||
#define TEENSY_PIN7_IOPORT IOPORT4
|
||||
#define TEENSY_PIN8_IOPORT IOPORT4
|
||||
#define TEENSY_PIN14_IOPORT IOPORT4
|
||||
#define TEENSY_PIN20_IOPORT IOPORT4
|
||||
#define TEENSY_PIN21_IOPORT IOPORT4
|
||||
|
||||
#define TEENSY_PIN31 0
|
||||
#define TEENSY_PIN26 1
|
||||
#define PORTE_PIN2 2
|
||||
#define PORTE_PIN3 3
|
||||
#define PORTE_PIN4 4
|
||||
#define PORTE_PIN5 5
|
||||
#define PORTE_PIN6 6
|
||||
#define PORTE_PIN7 7
|
||||
#define PORTE_PIN8 8
|
||||
#define PORTE_PIN9 9
|
||||
#define PORTE_PIN10 10
|
||||
#define PORTE_PIN11 11
|
||||
#define PORTE_PIN12 12
|
||||
#define PORTE_PIN13 13
|
||||
#define PORTE_PIN14 14
|
||||
#define PORTE_PIN15 15
|
||||
#define PORTE_PIN16 16
|
||||
#define PORTE_PIN17 17
|
||||
#define PORTE_PIN18 18
|
||||
#define PORTE_PIN19 19
|
||||
#define PORTE_PIN20 20
|
||||
#define PORTE_PIN21 21
|
||||
#define PORTE_PIN22 22
|
||||
#define PORTE_PIN23 23
|
||||
#define PORTE_PIN24 24
|
||||
#define PORTE_PIN25 25
|
||||
#define PORTE_PIN26 26
|
||||
#define PORTE_PIN27 27
|
||||
#define PORTE_PIN28 28
|
||||
#define PORTE_PIN29 29
|
||||
#define PORTE_PIN30 30
|
||||
#define PORTE_PIN31 31
|
||||
|
||||
#define TEENSY_PIN26_IOPORT IOPORT5
|
||||
#define TEENSY_PIN31_IOPORT IOPORT5
|
||||
|
||||
#define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1)
|
||||
#define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2)
|
||||
#define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3)
|
||||
#define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4)
|
||||
#define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5)
|
||||
#define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6)
|
||||
#define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7)
|
||||
#define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8)
|
||||
#define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9)
|
||||
#define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10)
|
||||
#define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11)
|
||||
#define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12)
|
||||
#define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13)
|
||||
#define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14)
|
||||
#define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15)
|
||||
#define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16)
|
||||
#define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17)
|
||||
#define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18)
|
||||
#define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19)
|
||||
#define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20)
|
||||
#define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21)
|
||||
#define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22)
|
||||
#define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23)
|
||||
#define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24)
|
||||
#define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25)
|
||||
#define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25)
|
||||
#define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26)
|
||||
#define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27)
|
||||
#define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28)
|
||||
#define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29)
|
||||
#define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30)
|
||||
#define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31)
|
||||
#define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32)
|
||||
#define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33)
|
||||
|
||||
#define LINE_LED LINE_PIN13
|
||||
|
||||
#if !defined(_FROM_ASM_)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void boardInit(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _FROM_ASM_ */
|
||||
|
||||
#endif /* _BOARD_H_ */
|
5
keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.mk
Normal file
5
keyboards/k_type/boards/K_TYPE_TEENSY_3_1/board.mk
Normal file
@@ -0,0 +1,5 @@
|
||||
# List of all the board related files.
|
||||
BOARDSRC = $(BOARD_PATH)/boards/K_TYPE_TEENSY_3_1/board.c
|
||||
|
||||
# Required include directories
|
||||
BOARDINC = $(BOARD_PATH)/boards/K_TYPE_TEENSY_3_1
|
1
keyboards/k_type/bootloader_defs.h
Normal file
1
keyboards/k_type/bootloader_defs.h
Normal file
@@ -0,0 +1 @@
|
||||
#define KIIBOHD_BOOTLOADER
|
524
keyboards/k_type/chconf.h
Normal file
524
keyboards/k_type/chconf.h
Normal file
@@ -0,0 +1,524 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file templates/chconf.h
|
||||
* @brief Configuration file template.
|
||||
* @details A copy of this file must be placed in each project directory, it
|
||||
* contains the application specific kernel settings.
|
||||
*
|
||||
* @addtogroup config
|
||||
* @details Kernel related settings and hooks.
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef CHCONF_H
|
||||
#define CHCONF_H
|
||||
|
||||
#define _CHIBIOS_RT_CONF_
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name System timers settings
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief System time counter resolution.
|
||||
* @note Allowed values are 16 or 32 bits.
|
||||
*/
|
||||
#define CH_CFG_ST_RESOLUTION 32
|
||||
|
||||
/**
|
||||
* @brief System tick frequency.
|
||||
* @details Frequency of the system timer that drives the system ticks. This
|
||||
* setting also defines the system tick time unit.
|
||||
*/
|
||||
#define CH_CFG_ST_FREQUENCY 100000
|
||||
|
||||
/**
|
||||
* @brief Time delta constant for the tick-less mode.
|
||||
* @note If this value is zero then the system uses the classic
|
||||
* periodic tick. This value represents the minimum number
|
||||
* of ticks that is safe to specify in a timeout directive.
|
||||
* The value one is not valid, timeouts are rounded up to
|
||||
* this value.
|
||||
*/
|
||||
#define CH_CFG_ST_TIMEDELTA 0
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel parameters and options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Round robin interval.
|
||||
* @details This constant is the number of system ticks allowed for the
|
||||
* threads before preemption occurs. Setting this value to zero
|
||||
* disables the preemption for threads with equal priority and the
|
||||
* round robin becomes cooperative. Note that higher priority
|
||||
* threads can still preempt, the kernel is always preemptive.
|
||||
* @note Disabling the round robin preemption makes the kernel more compact
|
||||
* and generally faster.
|
||||
* @note The round robin preemption is not supported in tickless mode and
|
||||
* must be set to zero in that case.
|
||||
*/
|
||||
#define CH_CFG_TIME_QUANTUM 20
|
||||
|
||||
/**
|
||||
* @brief Managed RAM size.
|
||||
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||
* then the whole available RAM is used. The core memory is made
|
||||
* available to the heap allocator and/or can be used directly through
|
||||
* the simplified core memory allocator.
|
||||
*
|
||||
* @note In order to let the OS manage the whole RAM the linker script must
|
||||
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||
*/
|
||||
#define CH_CFG_MEMCORE_SIZE 0
|
||||
|
||||
/**
|
||||
* @brief Idle thread automatic spawn suppression.
|
||||
* @details When this option is activated the function @p chSysInit()
|
||||
* does not spawn the idle thread. The application @p main()
|
||||
* function becomes the idle thread and must implement an
|
||||
* infinite loop.
|
||||
*/
|
||||
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||
|
||||
/* Use __WFI in the idle thread for waiting. Does lower the power
|
||||
* consumption. */
|
||||
#define CORTEX_ENABLE_WFI_IDLE TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Performance options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief OS optimization.
|
||||
* @details If enabled then time efficient rather than space efficient code
|
||||
* is used when two possible implementations exist.
|
||||
*
|
||||
* @note This is not related to the compiler optimization options.
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_OPTIMIZE_SPEED TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Subsystem options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Time Measurement APIs.
|
||||
* @details If enabled then the time measurement APIs are included in
|
||||
* the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_TM FALSE
|
||||
|
||||
/**
|
||||
* @brief Threads registry APIs.
|
||||
* @details If enabled then the registry APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_REGISTRY TRUE
|
||||
|
||||
/**
|
||||
* @brief Threads synchronization APIs.
|
||||
* @details If enabled then the @p chThdWait() function is included in
|
||||
* the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_WAITEXIT TRUE
|
||||
|
||||
/**
|
||||
* @brief Semaphores APIs.
|
||||
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||
|
||||
/**
|
||||
* @brief Semaphores queuing mode.
|
||||
* @details If enabled then the threads are enqueued on semaphores by
|
||||
* priority rather than in FIFO order.
|
||||
*
|
||||
* @note The default is @p FALSE. Enable this if you have special
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||
*/
|
||||
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||
|
||||
/**
|
||||
* @brief Mutexes APIs.
|
||||
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MUTEXES TRUE
|
||||
|
||||
/**
|
||||
* @brief Enables recursive behavior on mutexes.
|
||||
* @note Recursive mutexes are heavier and have an increased
|
||||
* memory footprint.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||
*/
|
||||
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||
|
||||
/**
|
||||
* @brief Conditional Variables APIs.
|
||||
* @details If enabled then the conditional variables APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS TRUE
|
||||
|
||||
/**
|
||||
* @brief Conditional Variables APIs with timeout.
|
||||
* @details If enabled then the conditional variables APIs with timeout
|
||||
* specification are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||
*/
|
||||
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs.
|
||||
* @details If enabled then the event flags APIs are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_EVENTS TRUE
|
||||
|
||||
/**
|
||||
* @brief Events Flags APIs with timeout.
|
||||
* @details If enabled then the events APIs with timeout specification
|
||||
* are included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||
*/
|
||||
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||
|
||||
/**
|
||||
* @brief Synchronous Messages APIs.
|
||||
* @details If enabled then the synchronous messages APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES TRUE
|
||||
|
||||
/**
|
||||
* @brief Synchronous Messages queuing mode.
|
||||
* @details If enabled then messages are served by priority rather than in
|
||||
* FIFO order.
|
||||
*
|
||||
* @note The default is @p FALSE. Enable this if you have special
|
||||
* requirements.
|
||||
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||
*/
|
||||
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||
|
||||
/**
|
||||
* @brief Mailboxes APIs.
|
||||
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||
* included in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||
*/
|
||||
#define CH_CFG_USE_MAILBOXES TRUE
|
||||
|
||||
/**
|
||||
* @brief Core Memory Manager APIs.
|
||||
* @details If enabled then the core memory manager APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMCORE TRUE
|
||||
|
||||
/**
|
||||
* @brief Heap Allocator APIs.
|
||||
* @details If enabled then the memory heap allocator APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||
* @p CH_CFG_USE_SEMAPHORES.
|
||||
* @note Mutexes are recommended.
|
||||
*/
|
||||
#define CH_CFG_USE_HEAP TRUE
|
||||
|
||||
/**
|
||||
* @brief Memory Pools Allocator APIs.
|
||||
* @details If enabled then the memory pools allocator APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
*/
|
||||
#define CH_CFG_USE_MEMPOOLS TRUE
|
||||
|
||||
/**
|
||||
* @brief Dynamic Threads APIs.
|
||||
* @details If enabled then the dynamic threads creation APIs are included
|
||||
* in the kernel.
|
||||
*
|
||||
* @note The default is @p TRUE.
|
||||
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||
*/
|
||||
#define CH_CFG_USE_DYNAMIC TRUE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Debug options
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Debug option, kernel statistics.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_STATISTICS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, system state check.
|
||||
* @details If enabled the correct call protocol for system APIs is checked
|
||||
* at runtime.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, parameters checks.
|
||||
* @details If enabled then the checks on the API functions input
|
||||
* parameters are activated.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, consistency checks.
|
||||
* @details If enabled then all the assertions in the kernel code are
|
||||
* activated. This includes consistency checks inside the kernel,
|
||||
* runtime anomalies and port-defined checks.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, trace buffer.
|
||||
* @details If enabled then the trace buffer is activated.
|
||||
*
|
||||
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||
*/
|
||||
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||
|
||||
/**
|
||||
* @brief Trace buffer entries.
|
||||
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||
*/
|
||||
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||
|
||||
/**
|
||||
* @brief Debug option, stack checks.
|
||||
* @details If enabled then a runtime stack check is performed.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note The stack check is performed in a architecture/port dependent way.
|
||||
* It may not be implemented or some ports.
|
||||
* @note The default failure mode is to halt the system with the global
|
||||
* @p panic_msg variable set to @p NULL.
|
||||
*/
|
||||
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, stacks initialization.
|
||||
* @details If enabled then the threads working area is filled with a byte
|
||||
* value when a thread is created. This can be useful for the
|
||||
* runtime measurement of the used stack.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
*/
|
||||
#define CH_DBG_FILL_THREADS FALSE
|
||||
|
||||
/**
|
||||
* @brief Debug option, threads profiling.
|
||||
* @details If enabled then a field is added to the @p thread_t structure that
|
||||
* counts the system ticks occurred while executing the thread.
|
||||
*
|
||||
* @note The default is @p FALSE.
|
||||
* @note This debug option is not currently compatible with the
|
||||
* tickless mode.
|
||||
*/
|
||||
#define CH_DBG_THREADS_PROFILING FALSE
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/**
|
||||
* @name Kernel hooks
|
||||
* @{
|
||||
*/
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Threads descriptor structure extension.
|
||||
* @details User fields added to the end of the @p thread_t structure.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||
/* Add threads custom fields here.*/
|
||||
|
||||
/**
|
||||
* @brief Threads initialization hook.
|
||||
* @details User initialization code added to the @p chThdInit() API.
|
||||
*
|
||||
* @note It is invoked from within @p chThdInit() and implicitly from all
|
||||
* the threads creation APIs.
|
||||
*/
|
||||
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||
/* Add threads initialization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Threads finalization hook.
|
||||
* @details User finalization code added to the @p chThdExit() API.
|
||||
*/
|
||||
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||
/* Add threads finalization code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Context switch hook.
|
||||
* @details This hook is invoked just before switching between threads.
|
||||
*/
|
||||
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||
/* Context switch code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR enter hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||
/* IRQ prologue code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ISR exit hook.
|
||||
*/
|
||||
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||
/* IRQ epilogue code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread enter hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
* should be invoked from here.
|
||||
* @note This macro can be used to activate a power saving mode.
|
||||
*/
|
||||
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||
/* Idle-enter code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle thread leave hook.
|
||||
* @note This hook is invoked within a critical zone, no OS functions
|
||||
* should be invoked from here.
|
||||
* @note This macro can be used to deactivate a power saving mode.
|
||||
*/
|
||||
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||
/* Idle-leave code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Idle Loop hook.
|
||||
* @details This hook is continuously invoked by the idle thread loop.
|
||||
*/
|
||||
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||
/* Idle loop code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief System tick event hook.
|
||||
* @details This hook is invoked in the system tick handler immediately
|
||||
* after processing the virtual timers queue.
|
||||
*/
|
||||
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||
/* System tick event code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief System halt hook.
|
||||
* @details This hook is invoked in case to a system halting error before
|
||||
* the system is halted.
|
||||
*/
|
||||
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||
/* System halt code here.*/ \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Trace hook.
|
||||
* @details This hook is invoked each time a new record is written in the
|
||||
* trace buffer.
|
||||
*/
|
||||
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||
/* Trace code here.*/ \
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||
/*===========================================================================*/
|
||||
|
||||
#endif /* CHCONF_H */
|
||||
|
||||
/** @} */
|
71
keyboards/k_type/config.h
Normal file
71
keyboards/k_type/config.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Copyright 2015 Jun Wako <wakojun@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
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x1c11
|
||||
#define PRODUCT_ID 0xb04d
|
||||
#define DEVICE_VER 673
|
||||
/* in python2: list(u"whatever".encode('utf-16-le')) */
|
||||
/* at most 32 characters or the ugly hack in usb_main.c borks */
|
||||
#define MANUFACTURER "Input Club"
|
||||
#define USBSTR_MANUFACTURER 'I', '\x00', 'n', '\x00', 'p', '\x00', 'u', '\x00', 't', '\x00', ' ', '\x00', 'C', '\x00', 'l', '\x00', 'u', '\x00', 'b', '\x00'
|
||||
#define PRODUCT "K-Type/QMK"
|
||||
#define USBSTR_PRODUCT 'K', '\x00', '-', '\x00', 'T', '\x00', 'y', '\x00', 'p', '\x00', 'e', '\x00', '/', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00'
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 10
|
||||
|
||||
/* define if matrix has ghost */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
//#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
//#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
353
keyboards/k_type/halconf.h
Normal file
353
keyboards/k_type/halconf.h
Normal file
@@ -0,0 +1,353 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file templates/halconf.h
|
||||
* @brief HAL configuration header.
|
||||
* @details HAL configuration file, this file allows to enable or disable the
|
||||
* various device drivers from your application. You may also use
|
||||
* this file in order to override the device drivers default settings.
|
||||
*
|
||||
* @addtogroup HAL_CONF
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _HALCONF_H_
|
||||
#define _HALCONF_H_
|
||||
|
||||
#include "mcuconf.h"
|
||||
|
||||
/**
|
||||
* @brief Enables the PAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PAL TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the ADC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_ADC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the CAN subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_CAN FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the DAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_DAC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the EXT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_EXT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the GPT subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_GPT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2C subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2C TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the I2S subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2S FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the ICU subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_ICU FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the MAC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_MAC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the MMC_SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_MMC_SPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the PWM subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_PWM FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the RTC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_RTC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SDC subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SDC FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL over USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL_USB TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SPI subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SPI FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the UART subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_UART FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_USB TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the WDG subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_WDG FALSE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* ADC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define ADC_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* CAN driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Sleep mode related APIs inclusion switch.
|
||||
*/
|
||||
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||
#define CAN_USE_SLEEP_MODE TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* I2C driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||
*/
|
||||
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* MAC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables an event sources for incoming packets.
|
||||
*/
|
||||
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||
#define MAC_USE_ZERO_COPY FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables an event sources for incoming packets.
|
||||
*/
|
||||
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||
#define MAC_USE_EVENTS TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* MMC_SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Delays insertions.
|
||||
* @details If enabled this options inserts delays into the MMC waiting
|
||||
* routines releasing some extra CPU time for the threads with
|
||||
* lower priority, this may slow down the driver a bit however.
|
||||
* This option is recommended also if the SPI driver does not
|
||||
* use a DMA channel and heavily loads the CPU.
|
||||
*/
|
||||
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||
#define MMC_NICE_WAITING TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SDC driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Number of initialization attempts before rejecting the card.
|
||||
* @note Attempts are performed at 10mS intervals.
|
||||
*/
|
||||
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||
#define SDC_INIT_RETRY 100
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Include support for MMC cards.
|
||||
* @note MMC support is not yet implemented so this option must be kept
|
||||
* at @p FALSE.
|
||||
*/
|
||||
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||
#define SDC_MMC_SUPPORT FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Delays insertions.
|
||||
* @details If enabled this options inserts delays into the MMC waiting
|
||||
* routines releasing some extra CPU time for the threads with
|
||||
* lower priority, this may slow down the driver a bit however.
|
||||
*/
|
||||
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||
#define SDC_NICE_WAITING TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SERIAL driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Default bit rate.
|
||||
* @details Configuration parameter, this is the baud rate selected for the
|
||||
* default configuration.
|
||||
*/
|
||||
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_DEFAULT_BITRATE 38400
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Serial buffers size.
|
||||
* @details Configuration parameter, you can change the depth of the queue
|
||||
* buffers depending on the requirements of your application.
|
||||
* @note The default is 64 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_BUFFERS_SIZE 16
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SERIAL_USB driver related setting. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Serial over USB buffers size.
|
||||
* @details Configuration parameter, the buffer size must be a multiple of
|
||||
* the USB data endpoint maximum packet size.
|
||||
* @note The default is 64 bytes for both the transmission and receive
|
||||
* buffers.
|
||||
*/
|
||||
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||
#define SERIAL_USB_BUFFERS_SIZE 256
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* SPI driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* USB driver related settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Enables synchronous APIs.
|
||||
* @note Disabling this option saves both code and data space.
|
||||
*/
|
||||
#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__)
|
||||
#define USB_USE_WAIT TRUE
|
||||
#endif
|
||||
|
||||
#endif /* _HALCONF_H_ */
|
||||
|
||||
/** @} */
|
33
keyboards/k_type/k_type.c
Normal file
33
keyboards/k_type/k_type.c
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
Copyright 2012,2013 Jun Wako <wakojun@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 "k_type.h"
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
};
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
};
|
42
keyboards/k_type/k_type.h
Normal file
42
keyboards/k_type/k_type.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2017 Input Club
|
||||
|
||||
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 K_TYPE_H
|
||||
#define K_TYPE_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, K16, \
|
||||
K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, \
|
||||
K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K50, \
|
||||
K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63, \
|
||||
K64, K65, K66, K67, K68, K69, K70, K71, K72, K73, K74, K75, K76, \
|
||||
K77, K78, K79, K80, K81, K82, K83, K84, K85, K86, K87 \
|
||||
) { \
|
||||
{ K01, K11, K21, K30, K39, K48, K58, K65, KC_NO, K83, }, \
|
||||
{ K02, K12, K22, KC_NO, K40, K49, K59, K66, K75, K84, }, \
|
||||
{ K03, K13, K23, K31, K41, K50, K60, K67, KC_NO, K85, }, \
|
||||
{ K04, K14, K24, K32, K42, K51, K61, K68, K76, K86, }, \
|
||||
{ K05, K15, K25, K33, K43, K52, K62, K69, K77, K87, }, \
|
||||
{ K06, K16, K26, K34, K44, K53, KC_NO, K70, K78, KC_NO, }, \
|
||||
{ K07, K17, K27, K35, K45, K54, K63, K71, K79, KC_NO, }, \
|
||||
{ K08, K18, K28, K36, K46, K55, KC_NO, K72, K80, KC_NO, }, \
|
||||
{ K09, K19, K29, K37, K47, K56, K64, K73, K81, KC_NO, }, \
|
||||
{ K10, K20, KC_NO, K38, KC_NO, K57, KC_NO, K74, K82, KC_NO, }, \
|
||||
}
|
||||
|
||||
#endif
|
37
keyboards/k_type/keymaps/belak/keymap.c
Normal file
37
keyboards/k_type/keymaps/belak/keymap.c
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "k_type.h"
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
#define _QW 0
|
||||
#define _L1 1
|
||||
|
||||
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QW] = 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_SLCK, KC_PAUS, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
|
||||
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_END, KC_PGDN, \
|
||||
MO(_L1), 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, KC_UP, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_L1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
[_L1] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_VOLU, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MSTP, KC_MPRV, KC_VOLD, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END),
|
||||
};
|
||||
|
||||
const uint16_t fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
};
|
25
keyboards/k_type/keymaps/default/keymap.c
Normal file
25
keyboards/k_type/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "k_type.h"
|
||||
|
||||
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = KEYMAP(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \
|
||||
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_END, KC_PGDN, \
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
};
|
||||
|
||||
const uint16_t fn_actions[] = {
|
||||
|
||||
};
|
||||
|
||||
// Runs just one time when the keyboard initializes.
|
||||
void matrix_init_user(void) {
|
||||
|
||||
};
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
};
|
138
keyboards/k_type/matrix.c
Normal file
138
keyboards/k_type/matrix.c
Normal file
@@ -0,0 +1,138 @@
|
||||
//#include <stdint.h>
|
||||
//#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "hal.h"
|
||||
#include "timer.h"
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "matrix.h"
|
||||
#include "debug.h"
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
static bool debouncing = false;
|
||||
static uint16_t debouncing_time = 0;
|
||||
|
||||
void matrix_init(void)
|
||||
{
|
||||
debug_matrix = true;
|
||||
|
||||
/* Column(sense) */
|
||||
palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOC, 1, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOC, 2, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOC, 3, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOC, 4, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOC, 5, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOC, 6, PAL_MODE_INPUT_PULLDOWN);
|
||||
palSetPadMode(GPIOC, 7, PAL_MODE_INPUT_PULLDOWN);
|
||||
|
||||
/* Row(strobe) */
|
||||
palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 18, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOB, 19, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOC, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOC, 9, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOD, 1, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPadMode(GPIOD, 4, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
|
||||
memset(matrix, 0, MATRIX_ROWS);
|
||||
memset(matrix_debouncing, 0, MATRIX_ROWS);
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||
matrix_row_t data = 0;
|
||||
// strobe row
|
||||
switch (row) {
|
||||
case 0: palSetPad(GPIOB, 2); break;
|
||||
case 1: palSetPad(GPIOB, 3); break;
|
||||
case 2: palSetPad(GPIOB, 18); break;
|
||||
case 3: palSetPad(GPIOB, 19); break;
|
||||
case 4: palSetPad(GPIOC, 0); break;
|
||||
case 5: palSetPad(GPIOC, 8); break;
|
||||
case 6: palSetPad(GPIOC, 9); break;
|
||||
case 7: palSetPad(GPIOD, 0); break;
|
||||
case 8: palSetPad(GPIOD, 1); break;
|
||||
case 9: palSetPad(GPIOD, 4); break;
|
||||
}
|
||||
|
||||
// need wait to settle pin state
|
||||
// if you wait too short, or have a too high update rate
|
||||
// the keyboard might freeze, or there might not be enough
|
||||
// processing power to update the LCD screen properly.
|
||||
// 20us, or two ticks at 100000Hz seems to be OK
|
||||
wait_us(20);
|
||||
|
||||
// read col data: { PTD5, PTD6, PTD7, PTC1, PTC2, PTC3, PTC4, PTC5, PTC6, PTC7 }
|
||||
data = ((palReadPort(GPIOC) & 0xFEUL) << 2) |
|
||||
((palReadPort(GPIOD) & 0xE0UL) >> 5);
|
||||
|
||||
// un-strobe row
|
||||
switch (row) {
|
||||
case 0: palClearPad(GPIOB, 2); break;
|
||||
case 1: palClearPad(GPIOB, 3); break;
|
||||
case 2: palClearPad(GPIOB, 18); break;
|
||||
case 3: palClearPad(GPIOB, 19); break;
|
||||
case 4: palClearPad(GPIOC, 0); break;
|
||||
case 5: palClearPad(GPIOC, 8); break;
|
||||
case 6: palClearPad(GPIOC, 9); break;
|
||||
case 7: palClearPad(GPIOD, 0); break;
|
||||
case 8: palClearPad(GPIOD, 1); break;
|
||||
case 9: palClearPad(GPIOD, 4); break;
|
||||
}
|
||||
|
||||
if (matrix_debouncing[row] != data) {
|
||||
matrix_debouncing[row] = data;
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
}
|
||||
|
||||
if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) {
|
||||
for (int row = 0; row < MATRIX_ROWS; row++) {
|
||||
matrix[row] = matrix_debouncing[row];
|
||||
}
|
||||
debouncing = false;
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & (1 << col));
|
||||
}
|
||||
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
xprintf("\nr/c 01234567\n");
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
xprintf("%02X: ", row);
|
||||
matrix_row_t data = matrix_get_row(row);
|
||||
for (int col = 0; col < MATRIX_COLS; col++) {
|
||||
if (data & (1<<col))
|
||||
xprintf("1");
|
||||
else
|
||||
xprintf("0");
|
||||
}
|
||||
xprintf("\n");
|
||||
}
|
||||
|
||||
wait_ms(50);
|
||||
}
|
54
keyboards/k_type/mcuconf.h
Normal file
54
keyboards/k_type/mcuconf.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _MCUCONF_H_
|
||||
#define _MCUCONF_H_
|
||||
|
||||
#define K20x_MCUCONF
|
||||
|
||||
/*
|
||||
* HAL driver system settings.
|
||||
*/
|
||||
|
||||
/* Select the MCU clocking mode below by enabling the appropriate block. */
|
||||
|
||||
#define KINETIS_NO_INIT FALSE
|
||||
|
||||
/* PEE mode - 48MHz system clock driven by external crystal. */
|
||||
#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE
|
||||
#define KINETIS_PLLCLK_FREQUENCY 72000000UL
|
||||
#define KINETIS_SYSCLK_FREQUENCY 72000000UL
|
||||
#define KINETIS_BUSCLK_FREQUENCY 36000000UL
|
||||
#define KINETIS_FLASHCLK_FREQUENCY 24000000UL
|
||||
|
||||
/*
|
||||
* SERIAL driver system settings.
|
||||
*/
|
||||
#define KINETIS_SERIAL_USE_UART0 TRUE
|
||||
|
||||
/*
|
||||
* USB driver settings
|
||||
*/
|
||||
#define KINETIS_USB_USE_USB0 TRUE
|
||||
#define KINETIS_USB_USB0_IRQ_PRIORITY 5
|
||||
|
||||
/*
|
||||
* I2C driver settings
|
||||
*/
|
||||
#define KINETIS_I2C_USE_I2C0 TRUE
|
||||
#define KINETIS_I2C_I2C0_PRIORITY 4
|
||||
|
||||
#endif /* _MCUCONF_H_ */
|
@@ -1,29 +1,12 @@
|
||||
# Target file name (without extension).
|
||||
PROJECT = ch
|
||||
|
||||
# Directory common source files exist
|
||||
TMK_DIR = ../../tmk_core
|
||||
|
||||
# Directory keyboard dependent files exist
|
||||
TARGET_DIR = .
|
||||
|
||||
# project specific files
|
||||
SRC = matrix.c \
|
||||
led.c
|
||||
|
||||
ifdef KEYMAP
|
||||
SRC := keymap_$(KEYMAP).c $(SRC)
|
||||
else
|
||||
SRC := keymap_plain.c $(SRC)
|
||||
endif
|
||||
|
||||
CONFIG_H = config.h
|
||||
SRC = matrix.c
|
||||
|
||||
## chip/board settings
|
||||
# - the next two should match the directories in
|
||||
# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)
|
||||
# - For Teensies, FAMILY = KINETIS and SERIES is either
|
||||
# KL2x (LC) or K20x (3.0,3.1,3.2).
|
||||
# - For Infinity KB, SERIES = K20x
|
||||
MCU_FAMILY = KINETIS
|
||||
MCU_SERIES = K20x
|
||||
|
||||
@@ -35,13 +18,15 @@ MCU_SERIES = K20x
|
||||
# - MKL26Z64 for Teensy LC
|
||||
# - MK20DX128 for Teensy 3.0
|
||||
# - MK20DX256 for Teensy 3.1 and 3.2
|
||||
MCU_LDSCRIPT = MK20DX256
|
||||
# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader
|
||||
# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader
|
||||
MCU_LDSCRIPT = MK20DX256BLDR8
|
||||
|
||||
# Startup code to use
|
||||
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
|
||||
# - STARTUP =
|
||||
# - kl2x for Teensy LC
|
||||
# - k20x5 for Teensy 3.0
|
||||
# - k20x5 for Teensy 3.0 and Infinity KB
|
||||
# - k20x7 for Teensy 3.1 and 3.2
|
||||
MCU_STARTUP = k20x7
|
||||
|
||||
@@ -51,7 +36,11 @@ MCU_STARTUP = k20x7
|
||||
# - PJRC_TEENSY_LC for Teensy LC
|
||||
# - PJRC_TEENSY_3 for Teensy 3.0
|
||||
# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2
|
||||
BOARD = PJRC_TEENSY_3_1
|
||||
# - MCHCK_K20 for Infinity KB
|
||||
|
||||
# This board was copied from PJRC_TEENSY_3_1. The only difference should be a
|
||||
# hack to ensure the watchdog has started before trying to disable it.
|
||||
BOARD = K_TYPE_TEENSY_3_1
|
||||
|
||||
# Cortex version
|
||||
# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
|
||||
@@ -61,10 +50,18 @@ MCU = cortex-m4
|
||||
# I.e. 6 for Teensy LC; 7 for Teensy 3.x
|
||||
ARMV = 7
|
||||
|
||||
# Vector table for application
|
||||
# 0x00000000-0x00001000 area is occupied by bootloader.*/
|
||||
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
|
||||
#OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
|
||||
OPT_DEFS =
|
||||
|
||||
DFU_ARGS = -d 1c11:b007
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
||||
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
@@ -72,6 +69,5 @@ CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
|
||||
include $(TMK_DIR)/tool/chibios/common.mk
|
||||
include $(TMK_DIR)/tool/chibios/chibios.mk
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
DEBUG_ENABLE = yes
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user