Skip to content
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

Added info.json for mt980 keyboard and fixes to walker keymap #5391

Merged
merged 16 commits into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added info.json and minor fixes to walker keymap
  • Loading branch information
walkerstop committed Mar 13, 2019
commit 9f8622295789d5fdf9832f9eedf059c4e9386dec
117 changes: 117 additions & 0 deletions keyboards/mt980/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"keyboard_name": "mt980",
"url": "https://github.com/walkerstop",
"maintainer": "walkerstop",
"width": 19.5,
"height": 6.75,
"layouts": {
"LAYOUT": {
"key_count": 103,
"layout": [
{"label":"K50", "x":0, "y":0},
{"label":"K52", "x":1.25, "y":0},
{"label":"K53", "x":2.25, "y":0},
{"label":"K54", "x":3.25, "y":0},
{"label":"K55", "x":4.25, "y":0},
{"label":"K57", "x":5.5, "y":0},
{"label":"K58", "x":6.5, "y":0},
{"label":"KB8", "x":7.5, "y":0},
{"label":"KB7", "x":8.5, "y":0},
{"label":"KB5", "x":9.75, "y":0},
{"label":"KB4", "x":10.75, "y":0},
{"label":"KB3", "x":11.75, "y":0},
{"label":"KB6", "x":12.75, "y":0},
{"label":"K51", "x":14, "y":0},
{"label":"KB2", "x":15.5, "y":0},
{"label":"KB1", "x":16.5, "y":0},
{"label":"KB0", "x":17.5, "y":0},
{"label":"K63", "x":18.5, "y":0},
{"label":"K40", "x":0, "y":1.5},
{"label":"K41", "x":1, "y":1.5},
{"label":"K42", "x":2, "y":1.5},
{"label":"K43", "x":3, "y":1.5},
{"label":"K44", "x":4, "y":1.5},
{"label":"K45", "x":5, "y":1.5},
{"label":"K46", "x":6, "y":1.5},
{"label":"K47", "x":7, "y":1.5},
{"label":"K48", "x":8, "y":1.5},
{"label":"KA8", "x":9, "y":1.5},
{"label":"KA7", "x":10, "y":1.5},
{"label":"KA5", "x":11, "y":1.5},
{"label":"KA4", "x":12, "y":1.5},
{"label":"KA3", "x":13, "y":1.5},
{"label":"KA6", "x":14, "y":1.5},
{"label":"KA2", "x":15.5, "y":1.5},
{"label":"KA1", "x":16.5, "y":1.5},
{"label":"KA0", "x":17.5, "y":1.5},
{"label":"K64", "x":18.5, "y":1.5},
{"label":"K30", "x":0, "y":2.5, "w":1.5},
{"label":"K31", "x":1.5, "y":2.5},
{"label":"K32", "x":2.5, "y":2.5},
{"label":"K33", "x":3.5, "y":2.5},
{"label":"K34", "x":4.5, "y":2.5},
{"label":"K35", "x":5.5, "y":2.5},
{"label":"K36", "x":6.5, "y":2.5},
{"label":"K37", "x":7.5, "y":2.5},
{"label":"K38", "x":8.5, "y":2.5},
{"label":"K98", "x":9.5, "y":2.5},
{"label":"K97", "x":10.5, "y":2.5},
{"label":"K95", "x":11.5, "y":2.5},
{"label":"K94", "x":12.5, "y":2.5},
{"label":"K84", "x":13.5, "y":2.5, "w":1.5},
{"label":"K96", "x":15.5, "y":2.5},
{"label":"K92", "x":16.5, "y":2.5},
{"label":"K91", "x":17.5, "y":2.5},
{"label":"K90", "x":18.5, "y":2.5},
{"label":"K20", "x":0, "y":3.5, "w":1.75},
{"label":"K21", "x":1.75, "y":3.5},
{"label":"K22", "x":2.75, "y":3.5},
{"label":"K23", "x":3.75, "y":3.5},
{"label":"K24", "x":4.75, "y":3.5},
{"label":"K25", "x":5.75, "y":3.5},
{"label":"K26", "x":6.75, "y":3.5},
{"label":"K27", "x":7.75, "y":3.5},
{"label":"K28", "x":8.75, "y":3.5},
{"label":"K88", "x":9.75, "y":3.5},
{"label":"K87", "x":10.75, "y":3.5},
{"label":"K85", "x":11.75, "y":3.5},
{"label":"K93", "x":12.75, "y":3.5, "w":2.25},
{"label":"K86", "x":15.5, "y":3.5},
{"label":"K82", "x":16.5, "y":3.5},
{"label":"K81", "x":17.5, "y":3.5},
{"label":"K80", "x":18.5, "y":3.5},
{"label":"K10", "x":0, "y":4.5, "w":1.25},
{"label":"K11", "x":1.25, "y":4.5},
{"label":"K12", "x":2.25, "y":4.5},
{"label":"K13", "x":3.25, "y":4.5},
{"label":"K14", "x":4.25, "y":4.5},
{"label":"K15", "x":5.25, "y":4.5},
{"label":"K16", "x":6.25, "y":4.5},
{"label":"K17", "x":7.25, "y":4.5},
{"label":"K18", "x":8.25, "y":4.5},
{"label":"K78", "x":9.25, "y":4.5},
{"label":"K77", "x":10.25, "y":4.5},
{"label":"K75", "x":11.25, "y":4.5},
{"label":"K74", "x":12.25, "y":4.5, "w":1.75},
{"label":"K76", "x":15.5, "y":4.5},
walkerstop marked this conversation as resolved.
Show resolved Hide resolved
{"label":"K72", "x":16.5, "y":4.5},
{"label":"K71", "x":17.5, "y":4.5},
{"label":"K70", "x":18.5, "y":4.5},
{"label":"K73", "x":14.25, "y":4.75},
walkerstop marked this conversation as resolved.
Show resolved Hide resolved
{"label":"K00", "x":0, "y":5.5, "w":1.25},
{"label":"K01", "x":1.25, "y":5.5},
{"label":"K02", "x":2.25, "y":5.5, "w":1.25},
{"label":"K06", "x":3.5, "y":5.5, "w":6.25},
{"label":"K08", "x":9.75, "y":5.5},
{"label":"K07", "x":10.75, "y":5.5},
{"label":"K05", "x":11.75, "y":5.5, "w":1.25},
{"label":"K62", "x":16.5, "y":5.5},
walkerstop marked this conversation as resolved.
Show resolved Hide resolved
{"label":"K61", "x":17.5, "y":5.5},
{"label":"K60", "x":18.5, "y":5.5},
walkerstop marked this conversation as resolved.
Show resolved Hide resolved
{"label":"K04", "x":13.25, "y":5.75},
walkerstop marked this conversation as resolved.
Show resolved Hide resolved
{"label":"K03", "x":14.25, "y":5.75},
walkerstop marked this conversation as resolved.
Show resolved Hide resolved
{"label":"K66", "x":15.25, "y":5.75}
walkerstop marked this conversation as resolved.
Show resolved Hide resolved
]
}
}
}
28 changes: 20 additions & 8 deletions keyboards/mt980/keymaps/walker/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,30 +100,42 @@ void led_set_keymap(uint8_t usb_led) {

bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case RESET:
/* Don't allow reset from oneshot layer state */
if (record->event.pressed && get_oneshot_layer() == 1)
return false;
case KC_PPLS:
if (!numlock_on) {
if (get_oneshot_layer() == 1 || layer_state & 0x2) {
register_code(KC_HOME);
unregister_code(KC_HOME);
if (record->event.pressed)
register_code(KC_HOME);
else
unregister_code(KC_HOME);
clear_oneshot_layer_state(ONESHOT_START);
}
else {
register_code(KC_PGUP);
unregister_code(KC_PGUP);
if (record->event.pressed)
register_code(KC_PGUP);
else
unregister_code(KC_PGUP);
}
return false;
}
return true;
case KC_PENT:
if (!numlock_on) {
if (get_oneshot_layer() == 1 || layer_state & 0x2) {
register_code(KC_END);
unregister_code(KC_END);
if (record->event.pressed)
register_code(KC_END);
else
unregister_code(KC_END);
clear_oneshot_layer_state(ONESHOT_START);
}
else {
register_code(KC_PGDN);
unregister_code(KC_PGDN);
if (record->event.pressed)
register_code(KC_PGDN);
else
unregister_code(KC_PGDN);
}
return false;
}
Expand Down