summaryrefslogtreecommitdiffstats
path: root/keyboards/hid_liber
diff options
context:
space:
mode:
authorbakageta <amo@bakageta.com>2018-07-30 23:37:34 -0700
committerDrashna Jaelre <drashna@live.com>2018-07-30 23:37:34 -0700
commit76f3a10eecbc1c04237b3852a0f3384e681a3492 (patch)
treede3cf3c237f28fe89e1367b778c262107637f29a /keyboards/hid_liber
parent98fa82ceeff2e93a7d65ccf719a2f43ec8c04e08 (diff)
Keyboard: Add support for bpiphany's HID Liberation Device (#3470)
* Keyboard: Added support for HID Liberation Device * Keymap: Custom (bakageta) layout for HID Liberation Device * Updated with requested changes
Diffstat (limited to 'keyboards/hid_liber')
-rwxr-xr-xkeyboards/hid_liber/config.h170
-rwxr-xr-xkeyboards/hid_liber/hid_liber.c57
-rwxr-xr-xkeyboards/hid_liber/hid_liber.h75
-rwxr-xr-xkeyboards/hid_liber/keymaps/bakageta/config.h3
-rwxr-xr-xkeyboards/hid_liber/keymaps/bakageta/keymap.c89
-rwxr-xr-xkeyboards/hid_liber/keymaps/bakageta/readme.md58
-rwxr-xr-xkeyboards/hid_liber/keymaps/bakageta/rules.mk33
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/config.h1
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/keymap.c79
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/readme.md41
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/rules.mk33
-rwxr-xr-xkeyboards/hid_liber/matrix.c269
-rwxr-xr-xkeyboards/hid_liber/readme.md15
-rwxr-xr-xkeyboards/hid_liber/rules.mk73
14 files changed, 996 insertions, 0 deletions
diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h
new file mode 100755
index 0000000000..0817db0012
--- /dev/null
+++ b/keyboards/hid_liber/config.h
@@ -0,0 +1,170 @@
+/* Copyright 2012 Jun Wako <wakojun@gmail.com>: Original Configuration
+ * Copyright 2018 bakageta <amo@bakageta.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 0xB919
+#define DEVICE_VER 0x0001
+#define MANUFACTURER "bpiphany"
+#define USBSTR_MANUFACTURER 'b', '\x00', 'p', '\x00', 'i', '\x00', 'p', '\x00', 'h', '\x00', 'a', '\x00', 'n', '\x00', 'y', '\x00'
+#define PRODUCT "HIDLiberation"
+#define USBSTR_PRODUCT 'H', '\x00', 'I', '\x00', 'D', '\x00', ' ', '\x00', 'L', '\x00', 'i', '\x00', 'b', '\x00', 'e', '\x00', 'r', '\x00', 'a', '\x00', 't', '\x00', 'i', '\x00', 'o', '\x00', 'n', '\x00'
+#define DESCRIPTION "HID Liberation powered by QMK"
+
+/* key matrix size */
+#define MATRIX_ROWS 18
+#define MATRIX_COLS 8
+
+// HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3.
+#define DIODE_DIRECTION CUSTOM_MATRIX
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+/* 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
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* enable basic MIDI features:
+ - MIDI notes can be sent when in Music mode is on
+*/
+//#define MIDI_BASIC
+
+/* enable advanced MIDI features:
+ - MIDI notes can be added to the keymap
+ - Octave shift and transpose
+ - Virtual sustain, portamento, and modulation wheel
+ - etc.
+*/
+//#define MIDI_ADVANCED
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+#endif
diff --git a/keyboards/hid_liber/hid_liber.c b/keyboards/hid_liber/hid_liber.c
new file mode 100755
index 0000000000..6517c92062
--- /dev/null
+++ b/keyboards/hid_liber/hid_liber.c
@@ -0,0 +1,57 @@
+/* Copyright 2012 Jun Wako <wakojun@gmail.com>: LED init
+ * Copyright 2017 Mathias Andersson <wraul@dbox.se>: Phantom config
+ * Copyright 2018 bakageta <amo@bakageta.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 "hid_liber.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ led_init_ports();
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_init_ports(void) {
+ DDRB |= (1<<5) | (1<<6); // OUT
+}
+
+void led_set_kb(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK))
+ PORTB &= ~(1<<5);
+ else
+ PORTB |= (1<<5);
+
+ if (usb_led & (1<<USB_LED_SCROLL_LOCK))
+ PORTB &= ~(1<<6);
+ else
+ PORTB |= (1<<6);
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/hid_liber/hid_liber.h b/keyboards/hid_liber/hid_liber.h
new file mode 100755
index 0000000000..f36152b646
--- /dev/null
+++ b/keyboards/hid_liber/hid_liber.h
@@ -0,0 +1,75 @@
+/* Copyright 2011 Jun Wako <wakojun@gmail.com>: Original TMK layout
+ * Copyright 2018 bakageta <amo@bakageta.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 HID_LIBER_H
+#define HID_LIBER_H
+
+#include "quantum.h"
+
+#define ___ KC_NO
+
+/* Tenkeyless keyboard default layout, ISO & ANSI (ISO is between Left Shift
+ * and Z, and the ANSI \ key above Return/Enter is used for the additional ISO
+ * switch in the ASD row next to enter. Use NUBS as keycode for the first and
+ * NUHS as the keycode for the second.
+ *
+ * ,---. ,---------------. ,---------------. ,---------------. ,-----------.
+ * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
+ * `---' `---------------' `---------------' `---------------' `-----------'
+ * ,-----------------------------------------------------------. ,-----------.
+ * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU|
+ * |-----------------------------------------------------------| |-----------|
+ * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD|
+ * |-----------------------------------------------------------| `-----------'
+ * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
+ * |-----------------------------------------------------------| ,---.
+ * |Shft|ISO| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
+ * |-----------------------------------------------------------| ,-----------.
+ * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
+ * `-----------------------------------------------------------' `-----------'
+ */
+#define LAYOUT( \
+ KG1, KH7, KJ7, KJ6, KJ1, KO5, KL1, KA6, KA7, KD7, KD5, KD1, KD2, KB5, KB3, KO3, \
+ KG7, KG5, KH5, KJ5, KI5, KI7, KK7, KK5, KL5, KA5, KC5, KC7, KL7, KD6, KQ7, KN7, KM7, \
+ KG6, KG3, KH3, KJ3, KI3, KI6, KK6, KK3, KL3, KA3, KC3, KC6, KL6, KD4, KP7, KN5, KM5, \
+ KH6, KG4, KH4, KJ4, KI4, KI1, KK1, KK4, KL4, KA4, KC4, KC1, KD0, \
+ KF6, KH1, KG0, KH0, KJ0, KI0, KI2, KK2, KK0, KL0, KA0, KC2, KF4, KN1, \
+ KO7, KE6, KB1, KP1, KB2, KR4, KA2, KO0, KN2, KP2, KQ2 \
+) { \
+/* 0 1 2 3 4 5 6 7 */ \
+/* A */ { KA0 , ___ , KA2 , KA3 , KA4 , KA5 , KA6 , KA7 }, \
+/* B */ { ___ , KB1 , KB2 , KB3 , ___ , KB5 , ___ , ___ }, \
+/* C */ { ___ , KC1 , KC2 , KC3 , KC4 , KC5 , KC6 , KC7 }, \
+/* D */ { KD0 , KD1 , KD2 , ___ , KD4 , KD5 , KD6 , KD7 }, \
+/* E */ { ___ , ___ , ___ , ___ , ___ , ___ , KE6 , ___ }, \
+/* F */ { ___ , ___ , ___ , ___ , KF4 , ___ , KF6 , ___ }, \
+/* G */ { KG0 , KG1 , ___ , KG3 , KG4 , KG5 , KG6 , KG7 }, \
+/* H */ { KH0 , KH1 , ___ , KH3 , KH4 , KH5 , KH6 , KH7 }, \
+/* I */ { KI0 , KI1 , KI2 , KI3 , KI4 , KI5 , KI6 , KI7 }, \
+/* J */ { KJ0 , KJ1 , ___ , KJ3 , KJ4 , KJ5 , KJ6 , KJ7 }, \
+/* K */ { KK0 , KK1 , KK2 , KK3 , KK4 , KK5 , KK6 , KK7 }, \
+/* L */ { KL0 , KL1 , ___ , KL3 , KL4 , KL5 , KL6 , KL7 }, \
+/* M */ { ___ , ___ , ___ , ___ , ___ , KM5 , ___ , KM7 }, \
+/* N */ { ___ , KN1 , KN2 , ___ , ___ , KN5 , ___ , KN7 }, \
+/* O */ { KO0 , ___ , ___ , KO3 , ___ , KO5 , ___ , KO7 }, \
+/* P */ { ___ , KP1 , KP2 , ___ , ___ , ___ , ___ , KP7 }, \
+/* Q */ { ___ , ___ , KQ2 , ___ , ___ , ___ , ___ , KQ7 }, \
+/* R */ { ___ , ___ , ___ , ___ , KR4 , ___ , ___ , ___ } \
+}
+
+
+
+#endif
diff --git a/keyboards/hid_liber/keymaps/bakageta/config.h b/keyboards/hid_liber/keymaps/bakageta/config.h
new file mode 100755
index 0000000000..b158e2d5a2
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/bakageta/config.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#define PERMISSIVE_HOLD
diff --git a/keyboards/hid_liber/keymaps/bakageta/keymap.c b/keyboards/hid_liber/keymaps/bakageta/keymap.c
new file mode 100755
index 0000000000..9754a70dfc
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/bakageta/keymap.c
@@ -0,0 +1,89 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>: Phantom Layout
+ * Copyright 2018 bakageta <amo@bakageta.com>: HID Liberation layouts
+ *
+ * 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 "hid_liber.h"
+
+// Helpful defines
+#define _______ KC_TRNS
+#define FN_CAPS LT(_FL, KC_CAPSLOCK)
+
+// 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 // Base Layer
+#define _GL 1 // Gaming Layer
+#define _FL 2 // Function 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, \
+ FN_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_NO, 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, TT(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [_GL] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+ [_FL] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, TO(_BL), TO(_GL), _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, \
+ _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT, \
+ _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, \
+ _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______ \
+ ),
+};
+
+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) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ 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) {
+
+}
diff --git a/keyboards/hid_liber/keymaps/bakageta/readme.md b/keyboards/hid_liber/keymaps/bakageta/readme.md
new file mode 100755
index 0000000000..2b13586c0f
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/bakageta/readme.md
@@ -0,0 +1,58 @@
+# bakageta's Keymap for the HID Liberation Device
+
+A personal keymap intended for the HID Liberation Device.
+
+See [keymap.c](keymap.c) for details.
+
+## Layers
+
+This keymap has a base layer with combined Fn/Caps, Fn replacing APP, and an otherwise standard ANSI layout. The gaming layer blocks LGUI, and reverts caps back to a regular key for games that bind something to it. The function layer adds media keys to the nav cluster and a virtual numpad, with 1 and 2 selecting between Base and Gaming respectively.
+
+### Layer 1: Base Layer
+ ,---. ,---------------. ,---------------. ,---------------. ,-----------.
+ |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
+ `---' `---------------' `---------------' `---------------' `-----------'
+ ,-----------------------------------------------------------. ,-----------.
+ |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU|
+ |-----------------------------------------------------------| |-----------|
+ |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD|
+ |-----------------------------------------------------------| '-----------'
+ |Fn/Cps| A| S| D| F| G| H| J| K| L| ;| '|Return |
+ |-----------------------------------------------------------| ,---.
+ |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
+ |-----------------------------------------------------------| ,-----------.
+ |Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig|
+ `-----------------------------------------------------------' `-----------'
+
+### Layer 2: Gaming Layer
+ ,---. ,---------------. ,---------------. ,---------------. ,-----------.
+ | | | | | | | | | | | | | | | | | | | | |
+ `---' `---------------' `---------------' `---------------' `-----------'
+ ,-----------------------------------------------------------. ,-----------.
+ | | | | | | | | | | | | | | | | | | |
+ |-----------------------------------------------------------| |-----------|
+ | | | | | | | | | | | | | | | | | | |
+ |-----------------------------------------------------------| '-----------'
+ | Caps | | | | | | | | | | | | |
+ |-----------------------------------------------------------| ,---.
+ | | | | | | | | | | | | | | |
+ |-----------------------------------------------------------| ,-----------.
+ | |XXX| | | | | | | | | | |
+ `-----------------------------------------------------------' `-----------'
+
+
+### Layer 3: Function Layer
+ ,---. ,---------------. ,---------------. ,---------------. ,-----------.
+ | | | | | | | | | | | | | | | | | | | | |
+ `---' `---------------' `---------------' `---------------' `-----------'
+ ,-----------------------------------------------------------. ,-----------.
+ | | BL| GL| | | | | | | | | | | | |Vo-|Stp|Vo+|
+ |-----------------------------------------------------------| |-----------|
+ | | | | | | | | | | | | | | | |Prv|Ply|Nxt|
+ |-----------------------------------------------------------| '-----------'
+ | | | | | | | | | | | | | |
+ |-----------------------------------------------------------| ,---.
+ | | | | | | | | | | | | | | |
+ |-----------------------------------------------------------| ,-----------.
+ | | | | | | | | | | | | |
+ `-----------------------------------------------------------' `-----------'
diff --git a/keyboards/hid_liber/keymaps/bakageta/rules.mk b/keyboards/hid_liber/keymaps/bakageta/rules.mk
new file mode 100755
index 0000000000..0f131bce9b
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/bakageta/rules.mk
@@ -0,0 +1,33 @@
+# Copyright 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/>.
+
+
+# QMK 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 = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # 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
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+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. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file
diff --git a/keyboards/hid_liber/keymaps/default/config.h b/keyboards/hid_liber/keymaps/default/config.h
new file mode 100755
index 0000000000..7b9637ef9c
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/default/config.h
@@ -0,0 +1 @@
+#pragma once \ No newline at end of file
diff --git a/keyboards/hid_liber/keymaps/default/keymap.c b/keyboards/hid_liber/keymaps/default/keymap.c
new file mode 100755
index 0000000000..337b4829d2
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/default/keymap.c
@@ -0,0 +1,79 @@
+/* Copyright 2017 Mathias Andersson <wraul@dbox.se>: Phantom Layout
+ * Copyright 2018 bakageta <amo@bakageta.com>: HID Liberation layouts
+ *
+ * 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 "hid_liber.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 // 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, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+};
+
+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) {
+ register_code(KC_RSFT);
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ break;
+ }
+ 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) {
+
+}
diff --git a/keyboards/hid_liber/keymaps/default/readme.md b/keyboards/hid_liber/keymaps/default/readme.md
new file mode 100755
index 0000000000..963524389e
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/default/readme.md
@@ -0,0 +1,41 @@
+# ANSI Keymap for the HID Liberation Device
+
+A basic keymap intended for the HID Liberation Device using the standard ANSI layout.
+
+See [keymap.c](keymap.c) for details.
+
+## Layers
+
+This keymap has two layers. To access the functions on the second layer, hold down `Fn` and press the corresponding key.
+
+### Layer 1: Base Layer
+ ,---. ,---------------. ,---------------. ,---------------. ,-----------.
+ |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
+ `---' `---------------' `---------------' `---------------' `-----------'
+ ,-----------------------------------------------------------. ,-----------.
+ |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU|
+ |-----------------------------------------------------------| |-----------|
+ |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD|
+ |-----------------------------------------------------------| '-----------'
+ |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
+ |-----------------------------------------------------------| ,---.
+ |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
+ |-----------------------------------------------------------| ,-----------.
+ |Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig|
+ `-----------------------------------------------------------' `-----------'
+
+### Layer 2: Media Layer
+ ,---. ,---------------. ,---------------. ,---------------. ,-----------.
+ | | | | | | | | | | | | | | | | | | | | |
+ `---' `---------------' `---------------' `---------------' `-----------'
+ ,-----------------------------------------------------------. ,-----------.
+ | | | | | | | | | | | | | | | |Vo-|Stp|Vo+|
+ |-----------------------------------------------------------| |-----------|
+ | | | | | | | | | | | | | | | |Prv|Ply|Nxt|
+ |-----------------------------------------------------------| '-----------'
+ | | | | | | | | | | | | | |
+ |-----------------------------------------------------------| ,---.
+ | | | | | | | | | | | | | | |
+ |-----------------------------------------------------------| ,-----------.
+ | | | | | | | | | | | | |
+ `-----------------------------------------------------------' `-----------'
diff --git a/keyboards/hid_liber/keymaps/default/rules.mk b/keyboards/hid_liber/keymaps/default/rules.mk
new file mode 100755
index 0000000000..0f131bce9b
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/default/rules.mk
@@ -0,0 +1,33 @@
+# Copyright 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/>.
+
+
+# QMK 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 = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = yes # 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
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+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. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file
diff --git a/keyboards/hid_liber/matrix.c b/keyboards/hid_liber/matrix.c
new file mode 100755
index 0000000000..de154890d5
--- /dev/null
+++ b/keyboards/hid_liber/matrix.c
@@ -0,0 +1,269 @@
+/* Copyright 2012 Jun Wako <wakojun@gmail.com>: TMK Matrix
+ * Copyright 2018 bakageta <amo@bakageta.com>
+ *
+ * This is heavily based on hid_liber/board.{c|h}.
+ * https://github.com/BathroomEpiphanies/AVR-Keyboard
+ *
+ * Copyright (c) 2012 Fredrik Atmer, Bathroom Epiphanies Inc
+ * http://bathroomepiphanies.com
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdint.h>
+#include <stdbool.h>
+#if defined(__AVR__)
+#include <avr/io.h>
+#endif
+#include <util/delay.h>
+#include "wait.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include "matrix.h"
+#include "timer.h"
+
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+static uint8_t debouncing = DEBOUNCE;
+
+// bit array of key state(1:on, 0:off)
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+
+#define _DDRA (uint8_t *const)&DDRA
+#define _DDRB (uint8_t *const)&DDRB
+#define _DDRC (uint8_t *const)&DDRC
+#define _DDRD (uint8_t *const)&DDRD
+#define _DDRE (uint8_t *const)&DDRE
+#define _DDRF (uint8_t *const)&DDRF
+
+#define _PINA (uint8_t *const)&PINA
+#define _PINB (uint8_t *const)&PINB