forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added ALU84 keyboard and TurboMech user space (qmk#2206)
* Added ALU84 Added ALU84 from mechkeys.ca. TurboMech keymap is MacOS oriented, need to still update the defualt keymap. * added alu84 and TurboMech userspace * updated keymap, config.h and rules.mk for alu84
- Loading branch information
1 parent
9cb80d6
commit e9f44ee
Showing
13 changed files
with
1,257 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |
Oops, something went wrong.