Compare commits

...
5 Commits
Author SHA1 Message Date
patrickmt 60ae309ced arm_atsam ADC0 factory calibration correction
Factory calibration data was not being loaded properly for ADC0, which affects the accuracy of 5V readings.
2019-01-28 17:16:33 -08:00
Emīls Delle 9e784841c0 [Keyboard] Additional info about TMO50 (#4980)
* Create ISO HHKB keymapping for GH60

* Add media controls to Fn layer

* Use M(x) instead of F(x), add Copyright text

* Add README for additional information about TMO50 features/quirks
2019-01-28 17:10:43 -08:00
noroadsleft 02180c87f2 handwired/space_oddity: refactor, Configurator support and readme cleanup (#4977)
* handwired/space_oddity: refactor

- config.h: updated to use #pragma once include guard
- rules.mk: replace `?=` with `=`
- space_oddity.h:
  - updated to use #pragma once include guard
  - layout macro KEYMAP renamed to LAYOUT
- default keymap:
  - updated to use #include QMK_KEYBOARD_H
  - replace references to Planck keycodes
  - replace fn_actions-powered layer switch keycode
  - rebuild keymap block comments
  - keymap layers now use short-form keycodes
  - refactor action_get_macro keycodes into process_record_user

* handwired/space_oddity: Configurator support

* handwired/space_oddity: readme cleanup

- update readme to better conform with QMK template
- fixed the make command.
2019-01-28 17:09:58 -08:00
Brice Figureau 03d9e3fe79 [Keyboard] E7-V1 keyboard support (#4965)
* Add the e7-v1 keyboard

The e7-v1 is a 75% keyboard made by Exclusive based on an Atmega32u4
pub with RGB lights on top and backlighting.

This PR add supports for the regular ANSI layout and ANSI split
backspace layout. No ISO yet :(

* My e7-v1 keymap

Difference from base layout:
 * split backspace
 * Home & End on last keys of row 0 instead of Insert/Del
 * Fn is on the End key when hold
 * supports both a windows/linux keymap and osx keymap
 * layer change is reflected in the rgb leds of the logo
2019-01-28 17:05:43 -08:00
Rockman18 df251d7a13 Backlight - New option : BACKLIGHT_CAPS_LOCK (#4769)
* [BACKLIGHT_CAPS_LOCK_INDICATOR] Use backlight toggling as Caps Lock LED

I've implemented this feature because S65-X doesn't have LED indicators
and the existing led_set_kb(usb_led) function try to use backlight as
indicator but that creates an inconsistency with backlight_config state.

- define `BACKLIGHT_CAPS_LOCK_INDICATOR` to enable Caps Lock indicator
  using backlight (for keyboards without dedicated LED)

- Don't turn off LED indicators when suspend because backlight is
  already turned off. Else led_set(0) will turn back on backlight.

- Documentation has been updated

* [BACKLIGHT_CAPS_LOCK_INDICATOR] Turn off all LED indicators except Caps Lock if BACKLIGHT_CAPS_LOCK_INDICATOR

* [BACKLIGHT_CAPS_LOCK] Rename BACKLIGHT_CAPS_LOCK_INDICATOR

* [BACKLIGHT_CAPS_LOCK] Use new IS_LED_ON method
2019-01-28 16:57:56 -08:00
23 changed files with 849 additions and 220 deletions

No files matched your search

+1
View File
@@ -40,6 +40,7 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`:
|---------------------|-------------|-------------------------------------------------------------------------------------------------------------| |---------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| |`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this|
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) | |`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) |
|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if hardware PWM is used | |`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if hardware PWM is used |
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | |`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
+47
View File
@@ -0,0 +1,47 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x7050
#define DEVICE_VER 0x0001
#define MANUFACTURER Exclusive / E - Team
#define PRODUCT E7 - V1
#define DESCRIPTION E7 - V1 QMK PCB(LED)
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 16
/* key matrix pins */
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 }
#define MATRIX_COL_PINS { B6, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7, F1 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#define BACKLIGHT_PIN B7
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 6
#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
#define RGB_DI_PIN E6
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 20
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
+25
View File
@@ -0,0 +1,25 @@
#include "e7v1.h"
void matrix_init_kb(void) {
setPinOutput(F0);
matrix_init_user();
}
void matrix_scan_kb(void) {
matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
writePinHigh(F0);
} else {
writePinLow(F0);
}
led_set_user(usb_led);
}
+103
View File
@@ -0,0 +1,103 @@
#pragma once
#include "quantum.h"
// layout with all the switches supported by the PCB
#define LAYOUT_all( \
K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, 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, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \
K500, K501, K502, K505, K510, K511, K512, K513, K514, K515 \
) { \
{ K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, 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, KC_NO }, \
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \
{ K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
}
#define LAYOUT_75_ansi( \
K000, K001, K002, K003, 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, \
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \
K500, K501, K502, K505, K510, K512, K513, K514, K515 \
) { \
{ K000, K001, K002, K003, KC_NO, 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, KC_NO }, \
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \
{ K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
}
// Ansi layout with a 7u space bar
#define LAYOUT_75_ansi_7u( \
K000, K001, K002, K003, 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, \
K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \
K500, K501, K505, K510, K512, K513, K514, K515 \
) { \
{ K000, K001, K002, K003, KC_NO, 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, KC_NO }, \
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \
{ K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
}
// ANSI layout with split backspace
#define LAYOUT_75_ansi_splitbs( \
K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, 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, \
K400 , K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \
K500, K501, K502, K505, K510, K512, K513, K514, K515 \
) { \
{ K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, 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, KC_NO }, \
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \
{ K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
}
// ANSI layout with split backspace
#define LAYOUT_75_ansi_7u_splitbs( \
K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, 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, \
K400 , K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \
K500, K501, K505, K510, K512, K513, K514, K515 \
) { \
{ K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, 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, KC_NO }, \
{ K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \
{ K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
}
#define LAYOUT_75_iso( \
K000, K001, K002, K003, 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, K215, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \
K500, K501, K502, K505, K510, K512, K513, K514, K515 \
) { \
{ K000, K001, K002, K003, KC_NO, 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, KC_NO, K215 }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \
{ K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \
}
@@ -0,0 +1,37 @@
#include QMK_KEYBOARD_H
/*
* ,---------------------------------------------------------------------|
* |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del|
* |---------------------------------------------------------------------|
* |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |\ |Del|▓PgU |
* |---------------------------------------------------------------------|
* |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | BSpc|▓PgDn|
* |---------------------------------------------------------------------|
* |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓|
* |---------------------------------------------------------------------|
* |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓|
* |---------------------------------------------------------------------|
* |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt |
* `---------------------------------------------------------------------|'
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_75_ansi_splitbs(
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_INS, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS,KC_DEL, 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_BSPC, 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, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_75_ansi_splitbs(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, MO(1), RGB_MOD, RGB_VAD, RGB_HUD),
};
@@ -0,0 +1,5 @@
# ANSI split backspace Keymap
Split backspace ANSI keymap with a base layer and an adjust layer.
Keymap Maintainer: [masterzen](https://github.com/amnesia0287)
+37
View File
@@ -0,0 +1,37 @@
#include QMK_KEYBOARD_H
/*
* ,---------------------------------------------------------------------|
* |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del|
* |---------------------------------------------------------------------|
* |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace|▓PgU |
* |---------------------------------------------------------------------|
* |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ |▓PgDn|
* |---------------------------------------------------------------------|
* |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓|
* |---------------------------------------------------------------------|
* |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓|
* |---------------------------------------------------------------------|
* |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt |
* `---------------------------------------------------------------------|'
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_75_ansi(
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_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_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, MO(1), KC_LEFT, KC_DOWN, KC_RGHT),
[1] = LAYOUT_75_ansi(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, MO(1), RGB_MOD, RGB_VAD, RGB_HUD),
};
+5
View File
@@ -0,0 +1,5 @@
# Default Keymap
Default ANSI keymap with a base layer and an adjust layer.
Keymap Maintainer: [masterzen](https://github.com/amnesia0287)
+138
View File
@@ -0,0 +1,138 @@
#include QMK_KEYBOARD_H
enum layers {
BASE, // qwerty linux
OSX, // qwerty osx
_ADJUST, // function key layer
};
enum keycodes {
// default layout switcher
LAY_LIN = SAFE_RANGE,
LAY_OSX
};
/*
* ,---------------------------------------------------------------------|
* |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Hom|▓|End|
* |---------------------------------------------------------------------|
* |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |\ |Del|▓PgU |
* |---------------------------------------------------------------------|
* |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | BSpc|▓PgDn|
* |---------------------------------------------------------------------|
* |LCTRL |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓|
* |---------------------------------------------------------------------|
* |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓|
* |---------------------------------------------------------------------|
* |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt |
* `---------------------------------------------------------------------|'
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT_75_ansi_splitbs(
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_HOME, LT(_ADJUST,KC_END),
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS,KC_DEL, 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_BSPC, KC_PGDN,
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT),
[OSX] = LAYOUT_75_ansi_splitbs(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LGUI, KC_RALT, _______, _______, _______),
[_ADJUST] = LAYOUT_75_ansi_splitbs(
RESET, LAY_LIN, LAY_OSX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(_ADJUST),
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI,
_______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_HUD),
};
extern rgblight_config_t rgblight_config;
bool edit = false;
uint32_t mode;
uint16_t hue;
uint8_t sat;
uint8_t val;
void matrix_init_user(void)
{
mode = rgblight_config.mode;
}
void persistent_default_layer_set(uint16_t default_layer)
{
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
switch (keycode)
{
/* layout switcher */
case LAY_LIN:
if (record->event.pressed)
{
persistent_default_layer_set(1UL << BASE);
}
return false;
break;
case LAY_OSX:
if (record->event.pressed)
{
persistent_default_layer_set(1UL << OSX);
}
return false;
break;
case RGB_MOD:
// allows to set the rgb mode while in the ADJUST layer which uses
// its own mode
if (record->event.pressed)
{
rgblight_mode(mode);
rgblight_step();
mode = rgblight_config.mode;
}
return false;
break;
}
return true;
}
uint32_t layer_state_set_user(uint32_t state)
{
if (state == BASE && edit == true)
{
hue = rgblight_get_hue();
sat = rgblight_get_sat();
val = rgblight_get_val();
edit = false;
}
switch (biton32(state))
{
case _ADJUST:
mode = rgblight_get_mode();
rgblight_mode_noeeprom(1);
rgblight_setrgb(0xD3, 0x7F, 0xED);
edit = true;
break;
default:
rgblight_mode(mode);
rgblight_sethsv(hue, sat, val);
break;
}
return state;
}
@@ -0,0 +1,14 @@
# masterzen's Keymap
![masterzen keymap Layout Image](https://imgur.com/SF4UP2j)
Keymap Maintainer: [masterzen](https://github.com/masterzen)
Difference from base layout:
* split backspace
* Home & End on last keys of row 0 instead of Insert/Del
* Fn is on the End key when hold
* supports both a windows/linux keymap and osx keymap
* layer change is reflected in the rgb leds of the logo
+15
View File
@@ -0,0 +1,15 @@
# E7-V1
![E7-V1](https://imgur.com/a/5v5pV9U)
A 75% keyboard made by Exclusive and run in a Geekhack group buy.
Keyboard Maintainer: [masterzen](https://github.com/masterzen)
Hardware Supported: E7 - V1 QMK PCB LED
Hardware Availability: [https://geekhack.org/index.php?topic=97182.msg2654226#msg2654226](https://geekhack.org/index.php?topic=97182.msg2654226#msg2654226)
Make example for this keyboard (after setting up your build environment):
make e7v1:default
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+54
View File
@@ -0,0 +1,54 @@
# 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
# Bootloader selection
BOOTLOADER = atmel-dfu
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = full # 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 = yes
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef CONFIG_H #pragma once
#define CONFIG_H
#include "config_common.h" #include "config_common.h"
@@ -51,5 +50,3 @@
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8
#endif #endif
#endif
@@ -0,0 +1,78 @@
{
"keyboard_name": "Space Oddity",
"url": "",
"maintainer": "qmk",
"width": 14,
"height": 6,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"Macro 0", "x":0, "y":0, "w":2},
{"label":"Macro 1", "x":2, "y":0, "w":2},
{"label":"Macro 2", "x":4, "y":0, "w":2},
{"label":"Macro 3", "x":6, "y":0, "w":2},
{"label":"Macro 4", "x":8, "y":0, "w":2},
{"label":"Dynamic Macro 1", "x":10, "y":0, "w":2},
{"label":"Dynamic Macro 2", "x":12, "y":0, "w":2},
{"label":"~", "x":0, "y":1, "w":2},
{"label":"!", "x":2, "y":1},
{"label":"@", "x":3, "y":1},
{"label":"#", "x":4, "y":1},
{"label":"$", "x":5, "y":1},
{"label":"%", "x":6, "y":1},
{"label":"^", "x":7, "y":1},
{"label":"&", "x":8, "y":1},
{"label":"*", "x":9, "y":1},
{"label":"(", "x":10, "y":1},
{"label":")", "x":11, "y":1},
{"label":"Backspace", "x":12, "y":1, "w":2},
{"label":"Tab", "x":0, "y":2, "w":2},
{"label":"Q", "x":2, "y":2},
{"label":"W", "x":3, "y":2},
{"label":"E", "x":4, "y":2},
{"label":"R", "x":5, "y":2},
{"label":"T", "x":6, "y":2},
{"label":"Y", "x":7, "y":2},
{"label":"U", "x":8, "y":2},
{"label":"I", "x":9, "y":2},
{"label":"O", "x":10, "y":2},
{"label":"P", "x":11, "y":2},
{"label":"_", "x":12, "y":2, "w":2},
{"label":"Esc (Ctrl)", "x":0, "y":3, "w":2},
{"label":"A", "x":2, "y":3},
{"label":"S", "x":3, "y":3},
{"label":"D", "x":4, "y":3},
{"label":"F", "x":5, "y":3},
{"label":"G", "x":6, "y":3},
{"label":"H", "x":7, "y":3},
{"label":"J", "x":8, "y":3},
{"label":"K", "x":9, "y":3},
{"label":"L", "x":10, "y":3},
{"label":":", "x":11, "y":3},
{"label":"\"", "x":12, "y":3, "w":2},
{"label":"Caps Lock (Shift)", "x":0.25, "y":4, "w":1.75},
{"label":"Z", "x":2, "y":4},
{"label":"X", "x":3, "y":4},
{"label":"C", "x":4, "y":4},
{"label":"V", "x":5, "y":4},
{"label":"B", "x":6, "y":4},
{"label":"N", "x":7, "y":4},
{"label":"M", "x":8, "y":4},
{"label":"<", "x":9, "y":4},
{"label":">", "x":10, "y":4},
{"label":"?", "x":11, "y":4},
{"label":"Enter (Shift)", "x":12, "y":4, "w":1.75},
{"label":"MO(2)", "x":1, "y":5},
{"label":"MO(1)", "x":2, "y":5},
{"label":"GUI", "x":3, "y":5},
{"label":"Alt", "x":4, "y":5},
{"label":"Ctrl", "x":5, "y":5, "w":2},
{"label":"Space", "x":7, "y":5, "w":2},
{"label":"Left (Alt)", "x":9, "y":5},
{"label":"Right (Hyper)", "x":10, "y":5},
{"label":"Up (MO(1))", "x":11, "y":5},
{"label":"Down (MO(2))", "x":12, "y":5}
]
}
}
}
@@ -15,12 +15,16 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
#include "space_oddity.h" #include QMK_KEYBOARD_H
// Planck keycodes needed for dynamic macros. // Custom keycodes needed for dynamic macros.
enum planck_keycodes { enum custom_keycodes {
QWERTY = SAFE_RANGE, QWERTY = SAFE_RANGE,
PAIR_PR,
PAIR_BR,
PAIR_CB,
LAMBDA,
DYNAMIC_MACRO_RANGE, DYNAMIC_MACRO_RANGE,
}; };
@@ -36,13 +40,6 @@ enum {
#define MOUSE_LAYER 2 #define MOUSE_LAYER 2
// Toggle MOUSE_LAYER. Additional layers can be added for additional layouts or other special functions.
const uint16_t PROGMEM fn_actions[] = {
[2] = ACTION_LAYER_TOGGLE(MOUSE_LAYER),
};
// Tap dance actions - double tap for Caps Lock. // Tap dance actions - double tap for Caps Lock.
qk_tap_dance_action_t tap_dance_actions[] = { qk_tap_dance_action_t tap_dance_actions[] = {
@@ -52,186 +49,185 @@ qk_tap_dance_action_t tap_dance_actions[] = {
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6. /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6.
*
___________________________________________________________________________________ * ___________________________________________________________________________________
| | | | | | Dynamic | Dynamic | * | | | | | | Dynamic | Dynamic |
| Macro 0 | Macro 1 | Macro 2 | Macro 3 | Macro 4 | Macro 1 | Macro 2 | * | () | [] | {} | NO OP | NO OP | Macro 1 | Macro 2 |
|___________|___________|___________|___________|___________|___________|___________| * |___________|___________|___________|___________|___________|___________|___________|
| | | | | | | | | | | | | * | | | | | | | | | | | | |
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP |
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | | | | | | | | | | | * | | | | | | | | | | | | |
| TAB | Q | W | E | R | T | Y | U | I | O | P | - | * | TAB | Q | W | E | R | T | Y | U | I | O | P | - |
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | | | | | | | | | | | * | | | | | | | | | | | | |
|ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' | * |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' |
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | | | | | | | | | | | * | | | | | | | | | | | | |
| SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)| * | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)|
|_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
| | | | | | | ALT | HYP | LT 1| LT 2| * | | | | | | | ALT | HYP | LT 1| LT 2|
| M2 | M1 | GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)| * |MO(2)|MO(1)| GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)|
|_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
*/
KEYMAP(
M(0), M(1), M(2), M(3), M(4), DYN_MACRO_PLAY1, DYN_MACRO_PLAY2,
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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT),
MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTRL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN)),
/* Function layer.
Blank keys correspond to the KC_TRNS keycode.
___________________________________________________________________________________
| | | | | | DYN REC | DYN REC |
| Macro 7 | | | | | 1 | 2 |
|___________|___________|___________|___________|___________|___________|___________|
| DYN REC | | | | | | | | | | | |
| STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL |
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | | | | | | | | | | |
| | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = |
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | | | | | | | | | | |
| \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | |
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | | | | | | | | | | |
| | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | |
|_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
| | | | | | | | | | |
| | | | | | | | | | |
|_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
*/ */
KEYMAP(
M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2,
DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL,
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL,
KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE,
KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
/* Mouse layer. [0] = LAYOUT( \
PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \
___________________________________________________________________________________ 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \
| | | | | | | | CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
|___________|___________|___________|___________|___________|___________|___________| TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
| | | | MS | | | | | | | | | MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN) \
| | | | UP | | | | | | | | | ),
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | MS | MS | MS | | | | | | | |
| | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | |
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | | | | | | | | | | |
| | | | | | | | | | | | |
|___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
| | | | | | | | | | | | |
| |RESET| | | | | | | | | | |
|_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
| | | | | | | | | | |
| | | | | | | | | | F(2)|
|_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
/* Function layer.
* Blank keys correspond to the KC_TRNS keycode.
*
* ___________________________________________________________________________________
* | | | | | | DYN REC | DYN REC |
* | LAMBDA | | | | | 1 | 2 |
* |___________|___________|___________|___________|___________|___________|___________|
* | DYN REC | | | | | | | | | | | |
* | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL |
* |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
* | | | | | | | | | | | | |
* | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = |
* |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
* | | | | | | | | | | | | |
* | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | |
* |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
* | | | | | | | | | | | | |
* | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | |
* |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
* | | | | | | | | | | |
* | | | | | | | | | | |
* |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
*
*/ */
KEYMAP( [1] = LAYOUT( \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LAMBDA, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, \
KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, KC_TRNS, KC_TRNS, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, \
KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, _______, \
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(2)) _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
/* Mouse layer.
*
* ___________________________________________________________________________________
* | | | | | | | |
* | | | | | | | |
* |___________|___________|___________|___________|___________|___________|___________|
* | | | | MS | | | | | | | | |
* | | | | UP | | | | | | | | |
* |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
* | | | MS | MS | MS | | | | | | | |
* | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | |
* |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
* | | | | | | | | | | | | |
* | | | | | | | | | | | | |
* |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________|
* | | | | | | | | | | | | |
* | |RESET| | | | | | | | | | |
* |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________|
* | | | | | | | | | | |
* | | | | | | | | | | F(2)|
* |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____|
*
*/
[2] = LAYOUT( \
_______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, TG(2) \
)
}; };
// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of
// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way,
// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for
// LaTeX editing.
//
// Customize to your heart's content!
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
switch (id) {
case 0:
if (record->event.pressed) {
SEND_STRING("()"SS_TAP(X_LEFT));
}
break;
case 1:
if (record->event.pressed) {
SEND_STRING("[]"SS_TAP(X_LEFT));
}
break;
case 2:
if (record->event.pressed) {
SEND_STRING("{}"SS_TAP(X_LEFT));
}
break;
// Probably something only Lisp users will appreciate...
case 7:
if (record->event.pressed) {
SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT));
}
break;
}
return MACRO_NONE;
}
void matrix_init_user(void) { void matrix_init_user(void) {
} }
void matrix_scan_user(void) { void matrix_scan_user(void) {
} }
// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of
// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way,
// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for
// LaTeX editing.
//
// Customize to your heart's content!
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) { if (!process_record_dynamic_macro(keycode, record)) {
return false; return false;
} }
switch (keycode) {
case PAIR_PR:
if (record->event.pressed) {
SEND_STRING("()"SS_TAP(X_LEFT));
}
return false;
case PAIR_BR:
if (record->event.pressed) {
SEND_STRING("[]"SS_TAP(X_LEFT));
}
return false;
case PAIR_CB:
if (record->event.pressed) {
SEND_STRING("{}"SS_TAP(X_LEFT));
}
return false;
// Probably something only Lisp users will appreciate...
case LAMBDA:
if (record->event.pressed) {
SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT));
}
return false;
}
return true; return true;
} }
void led_set_user(uint8_t usb_led) { void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) { if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) { } else {
} else {
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { }
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) { if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) { } else {
} else { }
} if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
} }
+16 -7
View File
@@ -1,5 +1,6 @@
Space Oddity Keyboard # Space Oddity Keyboard
=====================
![Space Oddity](https://i.imgur.com/dE9Y4XK.jpg)
This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro. This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro.
@@ -7,7 +8,10 @@ As originally designed, the top row consists of 2u keys which are used for user-
Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section. Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section.
A picture of the finished product can be found here: https://imgur.com/dE9Y4XK This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome!
Keyboard Maintainer: [James Taylor](https://github.com/broken-username)
Hardware Supported: Arduino Pro Micro
## Pinout ## Pinout
@@ -15,11 +19,16 @@ The following pins are used:
- Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 - Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3
- Rows 1-6: F4, F5, F6, F7, B1, B3 - Rows 1-6: F4, F5, F6, F7, B1, B3
## Compiling and loading the firmware ## Flashing
To build the firmware, run `make handwired/space_oddity` from the toplevel directory. Make example for this keyboard (after setting up your build environment):
On GNU/Linux, you can flash the default layout onto the microcontroller by using `avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex`. Note that the device name under `/dev` may be different. make handwired/space_oddity:default
On GNU/Linux, you can flash the default layout onto the microcontroller by using
This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome! avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex
Note that the device name under `/dev` may be different.
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+11 -11
View File
@@ -35,7 +35,7 @@ F_USB = $(F_CPU)
# Bootloader # Bootloader
# This definition is optional, and if your keyboard supports multiple bootloaders of # 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. # automatically (+60). See bootloader.mk for all options.
BOOTLOADER = caterina BOOTLOADER = caterina
@@ -45,14 +45,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= no # Console for debug(+400) CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE ?= no # Commands for debug and configuration COMMAND_ENABLE = no # Commands for debug and configuration
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 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 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 ?= no # Enable keyboard backlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE ?= no AUDIO_ENABLE = no
RGBLIGHT_ENABLE ?= no RGBLIGHT_ENABLE = no
TAP_DANCE_ENABLE = yes TAP_DANCE_ENABLE = yes
@@ -1,9 +1,8 @@
#ifndef KB_H #pragma once
#define KB_H
#include "quantum.h" #include "quantum.h"
#define KEYMAP( \ #define LAYOUT( \
K000, K002, K004, K006, K008, K010, K011, \ K000, K002, K004, K006, K008, K010, K011, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
@@ -18,5 +17,3 @@
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \
{ K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \ { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \
} }
#endif
+46
View File
@@ -0,0 +1,46 @@
# Additional info
## Matrix
You probably tried or will try to configure the keymapping to your liking. To make it easier configuring your layouts, photo of keyboards matrix will help.
![TMO50 matrix](https://i.imgur.com/ud7RB8d.png)
As you can see here matrix consists of 4 rows and 14 columns. But the tricky part is that topmost left key (Tab/Esc) is connected to row 3 - this is done so there's no 15th column that would connect only one key to seperate pin. This also poses an thread that you will configure your layout incorrectly because KC_TAB is not in the correct place *[visually](https://i.imgur.com/RtoD9F6.png)* in *keymap.c* file. Please take this into account when making changes and double-check this.
## Pinout
Most of the pinout can be found in *config.h* but there's here's a table of all the used pins for TMO50 (including indicator LED pins)
| Pin | Assigned to |
|---|---|
| D5 | Row 0 |
| D3 | Row 1 |
| D2 | Row 2 |
| D0 | Row 3 |
| | |
| D1 | Col 0 |
| D4 | Col 1 |
| F0 | Col 2 |
| F1 | Col 3 |
| F4 | Col 4 |
| F5 | Col 5 |
| F6 | Col 6 |
| F7 | Col 7 |
| D6 | Col 8 |
| D7 | Col 9 |
| B4 | Col 10 |
| B5 | Col 11 |
| B6 | Col 12 |
| C6 | Col 13 |
| | |
| B7 | Backlight |
| C7 | RGB LEDs |
| B0 | LED 4 (L4) |
| B1 | LED 3 (L3) |
| B2 | LED 2 (L2) |
| B3 | LED 1 (L1) |
## Indicator LEDs
Their size is 2×3×4mm. The THT hole without a circle on the pcb is VCC(+) and the other one is connect to their corresponding pin.
+1 -1
View File
@@ -1,6 +1,6 @@
# tmo50 # tmo50
![tmo50](https://imgur.com/BhRYzl6.jpg) ![TMO50](https://imgur.com/BhRYzl6.jpg)
TMO50 is a 50% mechanical keyboard with macro column on the left side. Sub60% board without compromises. TMO50 is a 50% mechanical keyboard with macro column on the left side. Sub60% board without compromises.
+18
View File
@@ -1448,6 +1448,24 @@ void led_set(uint8_t usb_led)
// PORTE &= ~(1<<6); // PORTE &= ~(1<<6);
// } // }
#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE)
// Use backlight as Caps Lock indicator
uint8_t bl_toggle_lvl = 0;
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) && !backlight_config.enable) {
// Turning Caps Lock ON and backlight is disabled in config
// Toggling backlight to the brightest level
bl_toggle_lvl = BACKLIGHT_LEVELS;
} else if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK) && backlight_config.enable) {
// Turning Caps Lock OFF and backlight is enabled in config
// Toggling backlight and restoring config level
bl_toggle_lvl = backlight_config.level;
}
// Set level without modify backlight_config to keep ability to restore state
backlight_set(bl_toggle_lvl);
#endif
led_set_kb(usb_led); led_set_kb(usb_led);
} }
+31 -24
View File
@@ -102,24 +102,31 @@ static uint8_t wdt_timeout = 0;
*/ */
static void power_down(uint8_t wdto) { static void power_down(uint8_t wdto) {
#ifdef PROTOCOL_LUFA #ifdef PROTOCOL_LUFA
if (USB_DeviceState == DEVICE_STATE_Configured) return; if (USB_DeviceState == DEVICE_STATE_Configured) return;
#endif #endif
wdt_timeout = wdto; wdt_timeout = wdto;
// Watchdog Interrupt Mode // Watchdog Interrupt Mode
wdt_intr_enable(wdto); wdt_intr_enable(wdto);
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
backlight_set(0); backlight_set(0);
#endif #endif
// Turn off LED indicators // Turn off LED indicators
led_set(0); uint8_t leds_off = 0;
#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE)
if (is_backlight_enabled()) {
// Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off
leds_off |= (1<<USB_LED_CAPS_LOCK);
}
#endif
led_set(leds_off);
#ifdef AUDIO_ENABLE #ifdef AUDIO_ENABLE
// This sometimes disables the start-up noise, so it's been disabled // This sometimes disables the start-up noise, so it's been disabled
// stop_all_notes(); // stop_all_notes();
#endif /* AUDIO_ENABLE */ #endif /* AUDIO_ENABLE */
#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE)
#ifdef RGBLIGHT_ANIMATIONS #ifdef RGBLIGHT_ANIMATIONS
rgblight_timer_disable(); rgblight_timer_disable();
@@ -135,20 +142,20 @@ static void power_down(uint8_t wdto) {
#endif #endif
suspend_power_down_kb(); suspend_power_down_kb();
// TODO: more power saving // TODO: more power saving
// See PicoPower application note // See PicoPower application note
// - I/O port input with pullup // - I/O port input with pullup
// - prescale clock // - prescale clock
// - BOD disable // - BOD disable
// - Power Reduction Register PRR // - Power Reduction Register PRR
set_sleep_mode(SLEEP_MODE_PWR_DOWN); set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable(); sleep_enable();
sei(); sei();
sleep_cpu(); sleep_cpu();
sleep_disable(); sleep_disable();
// Disable watchdog after sleep // Disable watchdog after sleep
wdt_disable(); wdt_disable();
} }
#endif #endif
+3 -3
View File
@@ -74,9 +74,9 @@ void ADC0_init(void)
while (ADC0->SYNCBUSY.bit.SAMPCTRL) { DBGC(DC_ADC0_SAMPCTRL_SYNCING_1); } while (ADC0->SYNCBUSY.bit.SAMPCTRL) { DBGC(DC_ADC0_SAMPCTRL_SYNCING_1); }
//Load factory calibration data //Load factory calibration data
ADC0->CALIB.bit.BIASCOMP = (ADC0_FUSES_BIASCOMP_ADDR >> ADC0_FUSES_BIASCOMP_Pos) & ADC0_FUSES_BIASCOMP_Msk; ADC0->CALIB.bit.BIASCOMP = ((*(uint32_t *)ADC0_FUSES_BIASCOMP_ADDR) & ADC0_FUSES_BIASCOMP_Msk) >> ADC0_FUSES_BIASCOMP_Pos;
ADC0->CALIB.bit.BIASR2R = (ADC0_FUSES_BIASR2R_ADDR >> ADC0_FUSES_BIASR2R_Pos) & ADC0_FUSES_BIASR2R_Msk; ADC0->CALIB.bit.BIASR2R = ((*(uint32_t *)ADC0_FUSES_BIASR2R_ADDR) & ADC0_FUSES_BIASR2R_Msk) >> ADC0_FUSES_BIASR2R_Pos;
ADC0->CALIB.bit.BIASREFBUF = (ADC0_FUSES_BIASREFBUF_ADDR >> ADC0_FUSES_BIASREFBUF_Pos) & ADC0_FUSES_BIASREFBUF_Msk; ADC0->CALIB.bit.BIASREFBUF = ((*(uint32_t *)ADC0_FUSES_BIASREFBUF_ADDR) & ADC0_FUSES_BIASREFBUF_Msk) >> ADC0_FUSES_BIASREFBUF_Pos;
//Enable //Enable
ADC0->CTRLA.bit.ENABLE = 1; ADC0->CTRLA.bit.ENABLE = 1;