[Keyboard] Adding AEK64 keyboard (#6725)

* Adding AEK64 keyboard

* Deleting useless layout definition

* Resolving many code review issues

* Documenting my 4sStylZ keymap

* Adding default keymap

* Apply suggestions from code review

Code review corrections

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>
Co-Authored-By: fauxpark <fauxpark@gmail.com>

* Update keyboards/handwired/aek64/readme.md

Co-Authored-By: noroadsleft <18669334+noroadsleft@users.noreply.github.com>

* Correcting the NKRO implementation
master
Noan Mousy 2019-09-17 19:17:03 +02:00 committed by Drashna Jaelre
parent 32b2486c6b
commit ab48ffd5c5
8 changed files with 361 additions and 0 deletions

View File

@ -0,0 +1,36 @@
/*
Copyright 2012,2013 Jun Wako <wakojun@gmail.com> <4sStylZ@protonmail.ch>
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 "quantum.h"
/*
* Hardware function pre initialisation.
* See https://docs.qmk.fm/#/custom_quantum_functions?id=example-keyboard_pre_init_user-implementation
*/
void keyboard_pre_init_user(void) {
// Call the keyboard pre init code.
// Set our LED pins as output
setPinOutput(C3);
}
void matrix_init_kb(void) {
// Flash the led 1 sec on startup.
writePinHigh(C3);
wait_ms(1000);
writePinLow(C3);
}

View File

@ -0,0 +1,34 @@
/*
Copyright 2012,2013 Jun Wako <wakojun@gmail.com> <4sStylZ@protonmail.ch>
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/>.
*/
#pragma once
#include "quantum.h"
/* Alps64 physical definition macro */
#define LAYOUT( \
k00, k01, k02, k03 , k04 , k05 , k06, k07 , k08 , k09 , k010 , k011, k012, k013 , \
k10, k11, k12, k13 , k14 , k15 , k16, k17 , k18 , k19 , k110 , k111, k112, \
k20, k21, k22, k23 , k24 , k25 , k26, k27 , k28 , k29 , k210 , k211, k212, k213 , \
k30, k31, k32, k33 , k34 , k35 , k36, k37 , k38 , k39 , k310 , k311, k312, \
k40, k41, k42, k46, k411, k412, k413 \
) { \
{ k00, k01, k02, k03 , k04 , k05 , k06, k07 , k08 , k09 , k010 , k011, k012, k013 }, \
{ k10, k11, k12, k13 , k14 , k15 , k16, k17 , k18 , k19 , k110 , k111, k112, KC_NO }, \
{ k20, k21, k22, k23 , k24 , k25 , k26, k27 , k28 , k29 , k210 , k211, k212, k213 }, \
{ k30, k31, k32, k33 , k34 , k35 , k36, k37 , k38 , k39 , k310 , k311, k312, KC_NO }, \
{ k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, k413 }, \
}

View File

@ -0,0 +1,78 @@
/*
Copyright 2015 Jun Wako <wakojun@gmail.com> <4sStylZ@protonmail.ch>
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/>.
*/
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6464
#define DEVICE_VER 0x0001
#define MANUFACTURER 4sStylZ and others makers
#define PRODUCT AEK64
#define DESCRIPTION QMK keyboard firmware for AEK64 handwired
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 14
// Originally made for a Teensy 2++
#define MATRIX_COL_PINS { F0, E6, E7, B0, B1, B2, B3, B4, B5, B6, B7, D0, D1, D2 }
#define MATRIX_ROW_PINS { E0, E1, C0, C1, C2 }
#define UNUSED_PINS
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
// #define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
//#define LOCKING_RESYNC_ENABLE
/* Enable the space-cadet options */
#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_PGUP
#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_PGDOWN
#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_HOME
#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_END
/* Enable double tab */
#define TAPPING_TERM 175
#define COMBO_COUNT 1
/*
* 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

View File

@ -0,0 +1,12 @@
{
"keyboard_name": "aek64",
"url": "",
"maintainer": "qmk",
"width": 14.75,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [{"label":"Esc", "x":0, "y":0, "w":1.25}, {"label":"1", "x":1.25, "y":0}, {"label":"2", "x":2.25, "y":0}, {"label":"3", "x":3.25, "y":0}, {"label":"4", "x":4.25, "y":0}, {"label":"5", "x":5.25, "y":0}, {"label":"6", "x":6.25, "y":0}, {"label":"7", "x":7.25, "y":0}, {"label":"8", "x":8.25, "y":0}, {"label":"9", "x":9.25, "y":0}, {"label":"0", "x":10.25, "y":0}, {"label":"\u00b0", "x":11.25, "y":0}, {"label":"+", "x":12.25, "y":0}, {"label":"Backspace", "x":13.25, "y":0, "w":1.75}, {"label":"Tab", "x":0, "y":1, "w":1.75}, {"label":"A", "x":1.75, "y":1}, {"label":"Z", "x":2.75, "y":1}, {"label":"E", "x":3.75, "y":1}, {"label":"R", "x":4.75, "y":1}, {"label":"T", "x":5.75, "y":1}, {"label":"Y", "x":6.75, "y":1}, {"label":"U", "x":7.75, "y":1}, {"label":"I", "x":8.75, "y":1}, {"label":"O", "x":9.75, "y":1}, {"label":"P", "x":10.75, "y":1}, {"label":"{", "x":11.75, "y":1}, {"label":"}", "x":12.75, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":2}, {"label":"Q", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":"M", "x":11, "y":2}, {"label":"%", "x":12, "y":2}, {"label":"&micro;", "x":13, "y":2}, {"label":"Enter", "x":14, "y":1, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.5}, {"label":">", "x":1.5, "y":3}, {"label":"W", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"?", "x":8.5, "y":3}, {"label":".", "x":9.5, "y":3}, {"label":"/", "x":10.5, "y":3}, {"label":"&sect;", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.5}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Opt", "x":1.5, "y":4, "w":1.25}, {"label":"Cmd", "x":2.75, "y":4, "w":1.5}, {"label":"Space", "x":4.25, "y":4, "w":6.5}, {"label":"Cmd", "x":10.75, "y":4, "w":1.5}, {"label":"Opt", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
}
}
}

View File

@ -0,0 +1,102 @@
#include QMK_KEYBOARD_H
// Implement Super-alt↯tab
// See https://docs.qmk.fm/#/feature_macros?id=super-alt↯tab
bool is_alt_tab_active = false;
uint16_t alt_tab_timer = 0;
// Defining all the custom keycodes.
enum custom_keycodes {
ALT_TAB = SAFE_RANGE
};
const uint16_t PROGMEM lock_combo[] = {KC_J, KC_K, KC_L, KC_SCLN, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {COMBO(lock_combo, LGUI(KC_O))};
// Define the keycodes for one qwerty layer and one Fn layer.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty
*
* ` Esc 1 2 3 4 5 6 7 8 9 0 - = Bksp
*
* Tab Q W E R T Y U I O P [ ]
* Enter
* Layer 2 A S D F G H J K L ; ' #
*
* Shift \ Z X C V B N M , . / Shift
*
* Ctrl Alt ATab Space Gui Alt Ctrl
*
*
* Hidden features :
* - Left Shift is also Home on a single tap.
* - Left Ctrl is also End on a single tap.
* - Right Shift is also page-up on a single tap.
* - Right Ctrl is also page-down on a single tap.
* - Press JKLM for Windows + L (Session lock)
*/
[0] = LAYOUT( \
KC_GESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC,
MO(1) , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT ,
KC_LSPO , KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC ,
KC_LCPO , KC_LALT, ALT_TAB, KC_SPC, KC_LGUI, KC_RALT, KC_RCPC
),
/* 1: second layer for media keys and many advanced features ç
*
* Alt F4 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
*
* PrtScn Brt+ Brt- Ctrl A Home Up End
*
* Cut Copy Paste Del Del Left Down Right
*
* Mute Vol- Vol+ Reset
*
*
*
*/
[1] = LAYOUT( \
LALT(KC_F4), 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_BRIU , KC_BRID, LCTL(KC_A), KC_HOME, KC_UP , KC_END , UC(0x203D) , UC(0x8593), UC(0x2E2E),
_______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_DEL , KC_LEFT, KC_DOWN, KC_RIGHT, UC(0x8592) , UC(0x8595), UC(0x8594), _______,
_______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , _______, _______ , _______, _______, _______ , _______ , RESET , _______ ,
_______ , _______ , _______ , _______, _______ , _______ , _______
)
};
// Set the unicode input mode for using UC.
void matrix_init_user(void) {
set_unicode_input_mode(UC_LNX);
}
// Processing all the key pressed.
// Alt+tab.
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Depending keycodes…
switch (keycode) { // This will do most of the grunt work with the keycodes.
case ALT_TAB:
if (record->event.pressed) {
if (!is_alt_tab_active) {
is_alt_tab_active = true;
register_code(KC_LALT);
}
alt_tab_timer = timer_read();
register_code(KC_TAB);
} else {
unregister_code(KC_TAB);
}
break;
}
return true;
}
void matrix_scan_user(void) { // The very important timer.
if (is_alt_tab_active) {
if (timer_elapsed(alt_tab_timer) > 750) {
unregister_code(KC_LALT);
is_alt_tab_active = false;
}
}
}

View File

@ -0,0 +1,53 @@
#include QMK_KEYBOARD_H
// Define the keycodes for one qwerty layer and one Fn layer.
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty
*
* ` Esc 1 2 3 4 5 6 7 8 9 0 - = Bksp
*
* Tab Q W E R T Y U I O P [ ]
* Enter
* Layer 2 A S D F G H J K L ; ' #
*
* Shift \ Z X C V B N M , . / Shift
*
* Ctrl Alt Gui Space Gui Alt Ctrl
*
*
* Hidden features :
* - Left Shift is also Home on a single tap.
* - Left Ctrl is also End on a single tap.
* - Right Shift is also page-up on a single tap.
* - Right Ctrl is also page-down on a single tap.
* - Press JKLM for Windows + L (Session lock)
*/
[0] = LAYOUT(
KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSPC,
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC,
MO(1) , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT ,
KC_LSPO, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSPC ,
KC_LCPO, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCPC
),
/* 1: second layer for media keys and many advanced features ç
*
* Alt F4 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12
*
* Ctrl A Home Up End
*
* Cut Copy Paste Del Del Left Down Right
*
* Mute Vol- Vol+ Reset
*
*
*
*/
[1] = LAYOUT(
LALT(KC_F4), KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______,
_______ , _______ , _______ , _______ , _______ , _______, LCTL(KC_A), KC_HOME, KC_UP , KC_END , _______ , _______ , _______ ,
_______ , _______ , LSFT(KC_DEL), LCTL(KC_INS), LSFT(KC_INS), KC_DEL , KC_DEL , KC_LEFT, KC_DOWN, KC_RIGHT, _______ , _______ , _______ , _______,
_______ , _______ , KC_MUTE , KC_VOLD , KC_VOLU , _______, _______ , _______, _______, _______ , _______ , RESET , _______ ,
_______ , _______ , _______ , _______, _______ , _______ , _______
)
};

View File

@ -0,0 +1,17 @@
# AEK64
An Alps-only 60% handwired ISO AEK based on the original AEK plate.
Keyboard Maintainer: QMK Community
Hardware Supported: AEK II ISO
Hardware Availability: buy an used one and salvage / cut the plate and rip-off the switchs. For the case, a GH60 can be good.
Make example for this keyboard (after setting up your build environment):
make aek64: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).
# Known issues
* The Unicode characters on the keymap dont work.

View File

@ -0,0 +1,29 @@
# Target file name (without extension).
# project specific files
# MCU name
MCU = at90usb1286
# Boot Section Size in *bytes*
# Teensy halfKay 512
# Teensy++ halfKay 1024
# Atmel DFU loader 4096
# LUFA bootloader 4096
# USBaspLoader 2048
BOOTLOADER = halfKay
# Build Options
# change to no to disable the options.
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA
UNICODE_ENABLE = yes # Enable support for arrow keys icon on the second layer.
COMBO_ENABLE = yes # Enable combo for special function when using multiple keys at once.
TAP_DANCE_ENABLE = no # Enable use multiple tap
NKRO_ENABLE = yes