-
-
Notifications
You must be signed in to change notification settings - Fork 37.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AL1 keyboard to QMK #3049
Add AL1 keyboard to QMK #3049
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "al1.h" | ||
|
||
void matrix_init_kb(void) { | ||
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) { | ||
CONFIG_LED_IO; | ||
print_dec(usb_led); | ||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) | ||
PORTB &= ~(1<<7); | ||
else | ||
PORTB |= (1<<7); | ||
|
||
if (usb_led & (1<<USB_LED_NUM_LOCK)) | ||
PORTD &= ~(1<<0); | ||
else | ||
PORTD |= (1<<0); | ||
|
||
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) | ||
PORTD &= ~(1<<1); | ||
else | ||
PORTD |= (1<<1); | ||
led_set_user(usb_led); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef AL1_H | ||
#define AL1_H | ||
|
||
#include "quantum.h" | ||
|
||
#define CONFIG_LED_IO \ | ||
DDRB |= (1<<7) | (1<<6); \ | ||
DDRD |= (1<<0) | (1<<1); | ||
|
||
|
||
#define KEYMAP( \ | ||
K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\ | ||
K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\ | ||
K502, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ | ||
K503, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K412,\ | ||
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \ | ||
) \ | ||
{ \ | ||
{ 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, K113, K114, K115}, \ | ||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \ | ||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \ | ||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \ | ||
{ K500, K501, K502, K503, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} \ | ||
} | ||
|
||
#define KEYMAP_SPLITBS( \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you rename this to |
||
K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K512, K012, K013, K014, K015, K415, K414, \ | ||
K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\ | ||
K502, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ | ||
K503, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K412,\ | ||
K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \ | ||
) \ | ||
{ \ | ||
{ 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, K113, K114, K115}, \ | ||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \ | ||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \ | ||
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \ | ||
{ K500, K501, K502, K503, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K512, KC_NO, KC_NO, KC_NO} \ | ||
} | ||
|
||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef CONFIG_H | ||
#define CONFIG_H | ||
|
||
#include "config_common.h" | ||
|
||
|
||
/* USB Device descriptor parameter */ | ||
#define VENDOR_ID 0xFEED | ||
#define PRODUCT_ID 0x6050 | ||
#define DEVICE_VER 0x0104 | ||
#define MANUFACTURER Alsoran | ||
#define PRODUCT AL1 | ||
|
||
/* key matrix size */ | ||
#define MATRIX_ROWS 7 | ||
#define MATRIX_COLS 20 | ||
|
||
/* COL2ROW or ROW2COL */ | ||
#define DIODE_DIRECTION COL2ROW | ||
|
||
#define BACKLIGHT_PIN B6 | ||
#define BACKLIGHT_BREATHING | ||
#define BACKLIGHT_LEVELS 3 | ||
|
||
|
||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
#define DEBOUNCING_DELAY 5 | ||
|
||
/* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
//#define MATRIX_HAS_GHOST | ||
|
||
/* number of backlight levels */ | ||
|
||
/* 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 magic key command */ | ||
#define IS_COMMAND() ( \ | ||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
) | ||
|
||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#include "al1.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please replace |
||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[0] = KEYMAP(\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change |
||
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_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ | ||
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_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\ | ||
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_P4, KC_P5, KC_P6, \ | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ | ||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT ), | ||
[1] = KEYMAP(\ | ||
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_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\ | ||
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_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\ | ||
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_P4, KC_P5, KC_P6, \ | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ | ||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_FN1, KC_FN2, KC_FN3, KC_P0, KC_PDOT ), | ||
}; | ||
|
||
|
||
const uint16_t PROGMEM fn_actions[] = { | ||
[0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay | ||
[1] = ACTION_BACKLIGHT_TOGGLE(), // BackLight TOGGLE | ||
[2] = ACTION_BACKLIGHT_DECREASE(), // BackLight - | ||
[3] = ACTION_BACKLIGHT_INCREASE(), // BackLight + | ||
}; | ||
|
||
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) { | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#include "al1.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to |
||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[0] = KEYMAP_SPLITBS(\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to |
||
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_GRAVE, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ | ||
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_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\ | ||
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_P4, KC_P5, KC_P6, \ | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ | ||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT ), | ||
[1] = KEYMAP_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_GRAVE, KC_DELETE, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ | ||
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_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\ | ||
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_P4, KC_P5, KC_P6, \ | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_FN0, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ | ||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_FN0, KC_RGUI, KC_RCTRL, KC_FN1, KC_FN2, KC_FN3, KC_P0, KC_PDOT ), | ||
}; | ||
|
||
|
||
const uint16_t PROGMEM fn_actions[] = { | ||
[0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay | ||
[1] = ACTION_BACKLIGHT_TOGGLE(), // BackLight TOGGLE | ||
[2] = ACTION_BACKLIGHT_DECREASE(), // BackLight - | ||
[3] = ACTION_BACKLIGHT_INCREASE(), // BackLight + | ||
}; | ||
|
||
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) { | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rename
KEYMAP
toLAYOUT_all
in this .h file and in the keymap.c files that reference it?