mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 19:39:27 +00:00
HID Liberation Device Refactor and Configurator layout support (#9394)
This commit is contained in:
parent
d8e3294aea
commit
b008a9afe6
@ -24,34 +24,16 @@ void matrix_init_kb(void) {
|
|||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
|
||||||
// put your looping keyboard code here
|
|
||||||
// runs every cycle (a lot)
|
|
||||||
|
|
||||||
matrix_scan_user();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
|
||||||
// put your per-action keyboard code here
|
|
||||||
// runs for every action, just before processing by the firmware
|
|
||||||
|
|
||||||
return process_record_user(keycode, record);
|
|
||||||
}
|
|
||||||
|
|
||||||
void led_init_ports(void) {
|
void led_init_ports(void) {
|
||||||
DDRB |= (1<<5) | (1<<6); // OUT
|
setPinOutput(B5);
|
||||||
|
setPinOutput(B6);
|
||||||
}
|
}
|
||||||
|
|
||||||
void led_set_kb(uint8_t usb_led) {
|
bool led_update_kb(led_t led_state) {
|
||||||
if (usb_led & (1<<USB_LED_CAPS_LOCK))
|
bool res = led_update_user(led_state);
|
||||||
PORTB &= ~(1<<5);
|
if(res) {
|
||||||
else
|
writePin(B5, !led_state.caps_lock);
|
||||||
PORTB |= (1<<5);
|
writePin(B6, !led_state.scroll_lock);
|
||||||
|
}
|
||||||
if (usb_led & (1<<USB_LED_SCROLL_LOCK))
|
return res;
|
||||||
PORTB &= ~(1<<6);
|
|
||||||
else
|
|
||||||
PORTB |= (1<<6);
|
|
||||||
|
|
||||||
led_set_user(usb_led);
|
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#ifndef HID_LIBER_H
|
#pragma once
|
||||||
#define HID_LIBER_H
|
|
||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
@ -69,7 +68,3 @@
|
|||||||
/* Q */ { ___ , ___ , KQ2 , ___ , ___ , ___ , ___ , KQ7 }, \
|
/* Q */ { ___ , ___ , KQ2 , ___ , ___ , ___ , ___ , KQ7 }, \
|
||||||
/* R */ { ___ , ___ , ___ , ___ , KR4 , ___ , ___ , ___ } \
|
/* R */ { ___ , ___ , ___ , ___ , KR4 , ___ , ___ , ___ } \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
101
keyboards/hid_liber/info.json
Normal file
101
keyboards/hid_liber/info.json
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "bpiphany HIDLiberation",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 18.25,
|
||||||
|
"height": 6.5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT": {
|
||||||
|
"layout": [
|
||||||
|
{"label":"KG1", "x":0, "y":0},
|
||||||
|
{"label":"KH7", "x":2, "y":0},
|
||||||
|
{"label":"KJ7", "x":3, "y":0},
|
||||||
|
{"label":"KJ6", "x":4, "y":0},
|
||||||
|
{"label":"KJ1", "x":5, "y":0},
|
||||||
|
{"label":"KO5", "x":6.5, "y":0},
|
||||||
|
{"label":"KL1", "x":7.5, "y":0},
|
||||||
|
{"label":"KA6", "x":8.5, "y":0},
|
||||||
|
{"label":"KA7", "x":9.5, "y":0},
|
||||||
|
{"label":"KD7", "x":11, "y":0},
|
||||||
|
{"label":"KD5", "x":12, "y":0},
|
||||||
|
{"label":"KD1", "x":13, "y":0},
|
||||||
|
{"label":"KD2", "x":14, "y":0},
|
||||||
|
{"label":"KB5", "x":15.25, "y":0},
|
||||||
|
{"label":"KB3", "x":16.25, "y":0},
|
||||||
|
{"label":"KO3", "x":17.25, "y":0},
|
||||||
|
{"label":"KG7", "x":0, "y":1.5},
|
||||||
|
{"label":"KG5", "x":1, "y":1.5},
|
||||||
|
{"label":"KH5", "x":2, "y":1.5},
|
||||||
|
{"label":"KJ5", "x":3, "y":1.5},
|
||||||
|
{"label":"KI5", "x":4, "y":1.5},
|
||||||
|
{"label":"KI7", "x":5, "y":1.5},
|
||||||
|
{"label":"KK7", "x":6, "y":1.5},
|
||||||
|
{"label":"KK5", "x":7, "y":1.5},
|
||||||
|
{"label":"KL5", "x":8, "y":1.5},
|
||||||
|
{"label":"KA5", "x":9, "y":1.5},
|
||||||
|
{"label":"KC5", "x":10, "y":1.5},
|
||||||
|
{"label":"KC7", "x":11, "y":1.5},
|
||||||
|
{"label":"KL7", "x":12, "y":1.5},
|
||||||
|
{"label":"KD6", "x":13, "y":1.5, "w":2},
|
||||||
|
{"label":"KQ7", "x":15.25, "y":1.5},
|
||||||
|
{"label":"KN7", "x":16.25, "y":1.5},
|
||||||
|
{"label":"KM7", "x":17.25, "y":1.5},
|
||||||
|
{"label":"KG6", "x":0, "y":2.5, "w":1.5},
|
||||||
|
{"label":"KG3", "x":1.5, "y":2.5},
|
||||||
|
{"label":"KH3", "x":2.5, "y":2.5},
|
||||||
|
{"label":"KJ3", "x":3.5, "y":2.5},
|
||||||
|
{"label":"KI3", "x":4.5, "y":2.5},
|
||||||
|
{"label":"KI6", "x":5.5, "y":2.5},
|
||||||
|
{"label":"KK6", "x":6.5, "y":2.5},
|
||||||
|
{"label":"KK3", "x":7.5, "y":2.5},
|
||||||
|
{"label":"KL3", "x":8.5, "y":2.5},
|
||||||
|
{"label":"KA3", "x":9.5, "y":2.5},
|
||||||
|
{"label":"KC3", "x":10.5, "y":2.5},
|
||||||
|
{"label":"KC6", "x":11.5, "y":2.5},
|
||||||
|
{"label":"KL6", "x":12.5, "y":2.5},
|
||||||
|
{"label":"KD4", "x":13.5, "y":2.5, "w":1.5},
|
||||||
|
{"label":"KP7", "x":15.25, "y":2.5},
|
||||||
|
{"label":"KN5", "x":16.25, "y":2.5},
|
||||||
|
{"label":"KM5", "x":17.25, "y":2.5},
|
||||||
|
{"label":"KH6", "x":0, "y":3.5, "w":1.75},
|
||||||
|
{"label":"KG4", "x":1.75, "y":3.5},
|
||||||
|
{"label":"KH4", "x":2.75, "y":3.5},
|
||||||
|
{"label":"KJ4", "x":3.75, "y":3.5},
|
||||||
|
{"label":"KI4", "x":4.75, "y":3.5},
|
||||||
|
{"label":"KI1", "x":5.75, "y":3.5},
|
||||||
|
{"label":"KK1", "x":6.75, "y":3.5},
|
||||||
|
{"label":"KK4", "x":7.75, "y":3.5},
|
||||||
|
{"label":"KL4", "x":8.75, "y":3.5},
|
||||||
|
{"label":"KA4", "x":9.75, "y":3.5},
|
||||||
|
{"label":"KC4", "x":10.75, "y":3.5},
|
||||||
|
{"label":"KC1", "x":11.75, "y":3.5},
|
||||||
|
{"label":"KD0", "x":12.75, "y":3.5, "w":2.25},
|
||||||
|
{"label":"KF6", "x":0, "y":4.5, "w":1.25},
|
||||||
|
{"label":"KH1", "x":1.25, "y":4.5},
|
||||||
|
{"label":"KG0", "x":2.25, "y":4.5},
|
||||||
|
{"label":"KH0", "x":3.25, "y":4.5},
|
||||||
|
{"label":"KJ0", "x":4.25, "y":4.5},
|
||||||
|
{"label":"KI0", "x":5.25, "y":4.5},
|
||||||
|
{"label":"KI2", "x":6.25, "y":4.5},
|
||||||
|
{"label":"KK2", "x":7.25, "y":4.5},
|
||||||
|
{"label":"KK0", "x":8.25, "y":4.5},
|
||||||
|
{"label":"KL0", "x":9.25, "y":4.5},
|
||||||
|
{"label":"KA0", "x":10.25, "y":4.5},
|
||||||
|
{"label":"KC2", "x":11.25, "y":4.5},
|
||||||
|
{"label":"KF4", "x":12.25, "y":4.5, "w":2.75},
|
||||||
|
{"label":"KN1", "x":16.25, "y":4.5},
|
||||||
|
{"label":"KO7", "x":0, "y":5.5, "w":1.25},
|
||||||
|
{"label":"KE6", "x":1.25, "y":5.5, "w":1.25},
|
||||||
|
{"label":"KB1", "x":2.5, "y":5.5, "w":1.25},
|
||||||
|
{"label":"KP1", "x":3.75, "y":5.5, "w":6.25},
|
||||||
|
{"label":"KB2", "x":10, "y":5.5, "w":1.25},
|
||||||
|
{"label":"KR4", "x":11.25, "y":5.5, "w":1.25},
|
||||||
|
{"label":"KA2", "x":12.5, "y":5.5, "w":1.25},
|
||||||
|
{"label":"KO0", "x":13.75, "y":5.5, "w":1.25},
|
||||||
|
{"label":"KN2", "x":15.25, "y":5.5},
|
||||||
|
{"label":"KP2", "x":16.25, "y":5.5},
|
||||||
|
{"label":"KQ2", "x":17.25, "y":5.5}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1 +0,0 @@
|
|||||||
#pragma once
|
|
@ -16,45 +16,26 @@
|
|||||||
*/
|
*/
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
enum layer_names {
|
||||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
_BL, // Base Layer
|
||||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
_FL, // Media Layer
|
||||||
// entirely and just use numbers.
|
|
||||||
|
|
||||||
#define _BL 0 // Base Layer
|
|
||||||
#define _FL 1 // Media Layer
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
||||||
[_BL] = LAYOUT( \
|
|
||||||
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_BRK, \
|
|
||||||
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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
|
|
||||||
),
|
|
||||||
[_FL] = LAYOUT( \
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, \
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT, \
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
|
||||||
),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_user(void) {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BL] = LAYOUT(
|
||||||
}
|
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_BRK,
|
||||||
|
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,
|
||||||
void matrix_scan_user(void) {
|
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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
),
|
||||||
return true;
|
[_FL] = LAYOUT(
|
||||||
}
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU,
|
||||||
void led_set_user(uint8_t usb_led) {
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
}
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# ANSI Keymap for the HID Liberation Device
|
# The default keymap for the HID Liberation Device
|
||||||
|
|
||||||
A basic keymap intended for the HID Liberation Device using the standard ANSI layout.
|
A basic keymap intended for the HID Liberation Device using the standard ANSI layout.
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ This keymap has two layers. To access the functions on the second layer, hold do
|
|||||||
|-----------------------------------------------------------| '-----------'
|
|-----------------------------------------------------------| '-----------'
|
||||||
|Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
|
|Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
|
||||||
|-----------------------------------------------------------| ,---.
|
|-----------------------------------------------------------| ,---.
|
||||||
|Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
|
|Sft |ISO| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
|
||||||
|-----------------------------------------------------------| ,-----------.
|
|-----------------------------------------------------------| ,-----------.
|
||||||
|Ctl |Gui |Alt | Space |Alt |Gui |Fn |Ctl | |Lef|Dow|Rig|
|
|Ctl |Gui |Alt | Space |Alt |Gui |Fn |Ctl | |Lef|Dow|Rig|
|
||||||
`-----------------------------------------------------------' `-----------'
|
`-----------------------------------------------------------' `-----------'
|
||||||
@ -35,7 +35,7 @@ This keymap has two layers. To access the functions on the second layer, hold do
|
|||||||
|-----------------------------------------------------------| '-----------'
|
|-----------------------------------------------------------| '-----------'
|
||||||
| | | | | | | | | | | | | |
|
| | | | | | | | | | | | | |
|
||||||
|-----------------------------------------------------------| ,---.
|
|-----------------------------------------------------------| ,---.
|
||||||
| | | | | | | | | | | | | | |
|
| | | | | | | | | | | | | | | |
|
||||||
|-----------------------------------------------------------| ,-----------.
|
|-----------------------------------------------------------| ,-----------.
|
||||||
| | | | | | | | | | | | |
|
| | | | | | | | | | | | |
|
||||||
`-----------------------------------------------------------' `-----------'
|
`-----------------------------------------------------------' `-----------'
|
||||||
|
@ -1 +0,0 @@
|
|||||||
CONSOLE_ENABLE = yes
|
|
@ -1,15 +1,17 @@
|
|||||||
HID Liberation Device
|
# HID Liberation Device
|
||||||
=====================
|
|
||||||
DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities.
|
DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities. The PCB was engineered by bpiphany.
|
||||||
The PCB was engineered by bpiphany.
|
|
||||||
|
|
||||||
## Wiki on Deskthority.net
|
## Wiki on Deskthority.net
|
||||||
- [Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_Instructions)
|
- [Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_Instructions)
|
||||||
- [Assembly Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions)
|
- [Assembly Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions)
|
||||||
|
|
||||||
## Build
|
* Keyboard Maintainer: [The QMK Community](https://github.com/qmk)
|
||||||
|
* Hardware Supported: HID Liberation Device (ATmega32U4)
|
||||||
|
* Hardware Availability: Discontinued
|
||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make hid_liber:default
|
make hid_liber:default
|
||||||
|
|
||||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
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).
|
||||||
|
@ -17,7 +17,7 @@ BOOTLOADER = atmel-dfu
|
|||||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
CUSTOM_MATRIX = yes # Custom matrix file
|
CUSTOM_MATRIX = yes # Custom matrix file
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
Loading…
Reference in New Issue
Block a user