forked from vial-kb/vial-qmk
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
793 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"C_Cpp.errorSquiggles": "Disabled" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Copyright 2021 James Sa | ||
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 | ||
|
||
/* key matrix size */ | ||
#define MATRIX_ROWS 5 | ||
#define MATRIX_COLS 12 | ||
|
||
/* | ||
* Keyboard Matrix Assignments | ||
* | ||
* Change this to how you wired your keyboard | ||
* COLS: AVR pins used for columns, left to right | ||
* ROWS: AVR pins used for rows, top to bottom | ||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
* | ||
*/ | ||
#define MATRIX_ROW_PINS { F4, F5, F6, F7, C6 } | ||
#define MATRIX_COL_PINS { B1, B1, B3, B3, B2, B2, B4, B4, E6, E6, D7, D7 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"keyboard_name": "Pragmatic 60A", | ||
"manufacturer": "Pragmatic Inc", | ||
"maintainer": "James Sa", | ||
"url": "www.pragmatic.com.tw", | ||
|
||
"processor": "atmega32u4", | ||
"bootloader": "caterina", | ||
|
||
"usb":{ | ||
"vid": "0x1209", | ||
"pid": "0xA805", | ||
"device_version": "4.2.1", | ||
"max_power": 80 | ||
}, | ||
|
||
"layouts": { | ||
"LAYOUT": { | ||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6.5, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6.5, "y":4}, {"x":7.5, "y":4}, {"x":8.5, "y":4}, {"x":9.5, "y":4}, {"x":10.5, "y":4}, {"x":11.5, "y":4}] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#pragma once | ||
|
||
#define VIAL_KEYBOARD_UID {0xA4, 0x6E, 0xAE, 0xC4, 0x38, 0x71, 0x57, 0x22} | ||
|
||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8 | ||
|
||
#define DEBUG_MATRIX_SCAN_RATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version": 1, "uid": -1, "layout": [[["KC_ESCAPE", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11"], ["KC_GRAVE", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_EQUAL"], ["KC_ESCAPE", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_MINUS"], ["KC_TAB", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCOLON", "KC_QUOTE"], ["KC_LSHIFT", "LALT_T(KC_Z)", "LCTL_T(KC_X)", "LSFT_T(KC_C)", "LGUI_T(KC_V)", "KC_B", "KC_N", "RGUI(KC_M)", "RSFT(KC_COMMA)", "RCTL(KC_DOT)", "RALT(KC_SLASH)", "KC_BSLASH"], ["MO(1)", "KC_LCTRL", "KC_LALT", "KC_LGUI", "KC_CAPSLOCK", "KC_BSPACE", "KC_SPACE", "KC_ENTER", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RIGHT"]], [["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "LSFT(KC_LBRACKET)", "LSFT(KC_RBRACKET)", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_LBRACKET", "KC_RBRACKET", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]], [["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]], [["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]]], "encoder_layout": [[], [], [], []], "layout_options": -1, "macro": [[], [], [], [], [], [], [], [], [], [], [], [], [], [], [], []], "vial_protocol": -1, "via_protocol": 9, "tap_dance": [], "combo": [], "key_override": [], "settings": {}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
/* Copyright 2021 James Sa | ||
* | ||
* 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 QMK_KEYBOARD_H | ||
|
||
#define NO_ACTION_MACRO | ||
#define NO_ACTION_FUNCTION | ||
|
||
// Defines names for use in layer keycodes and the keymap | ||
// enum layer_names { | ||
// _QWERTY, | ||
// }; | ||
|
||
// Defines the keycodes used by our macros in process_record_user | ||
// enum custom_keycodes { | ||
// COLEMAK = SAFE_RANGE, // colemak without home row modifier | ||
// COLEMAKm, // colemak with home row modifier | ||
// DVORAK, | ||
// QWERTY | ||
// }; | ||
|
||
#define _C(X) CTL_T(X) | ||
#define _A(X) ALT_T(X) | ||
#define _S(X) SFT_T(X) | ||
#define _G(X) CMD_T(X) | ||
#define FNBSPC LT(_FN, KC_BSPC) | ||
#define PNSPC LT(_PN, KC_SPC) | ||
// macOS shortcut | ||
#define MSNCTL C(KC_UP) | ||
#define WKSPLF C(KC_LEFT) | ||
#define WKSPRT C(KC_RGHT) | ||
#define COPY G(KC_C) | ||
#define PSTE G(KC_V) | ||
#define CUT G(KC_X) | ||
#define UNDO G(KC_Z) | ||
#define REDO G(S(KC_Z)) | ||
#define SCNSHOT S(G(KC_4)) | ||
#define SPOTLT G(KC_SPC) | ||
#define ZOOMIN G(KC_PPLS) // command + | ||
#define ZOOMOUT G(KC_PMNS) // command - | ||
#define ACTUAL G(KC_0) | ||
// window management utility | ||
#define DIVVY KC_F13 | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
/* Base */ | ||
[0] = LAYOUT( | ||
KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, | ||
KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, | ||
_A(KC_Z),_C(KC_X),_S(KC_C),_G(KC_D), KC_V, KC_K, _G(KC_H),_S(KC_COMM),_C(KC_DOT),_A(KC_SLSH), | ||
LT(3,KC_CAPS), LT(1,KC_BSPC),LT(2,KC_SPC), LT(4,KC_ENT) | ||
), | ||
[1] = LAYOUT( | ||
KC_ESC, SCNSHOT, DIVVY, SPOTLT, _______, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PERC, | ||
KC_TAB, CUT, COPY, PSTE, KC_ENT, KC_MINS, KC_P4, KC_P5, KC_P6, KC_PAST, | ||
_______, WKSPLF, MSNCTL, WKSPRT, KC_SPC, KC_DLR, KC_P1, KC_P2, KC_P3, KC_PSLS, | ||
_______, XXXXXXX, KC_P0, KC_PDOT | ||
), | ||
[2] = LAYOUT( | ||
KC_CIRC, KC_GRV, KC_TILD, KC_LCBR, KC_RCBR, KC_TAB, KC_PGUP, KC_UP, _______, _______, | ||
KC_EXLM, KC_AT, KC_HASH, KC_LPRN, KC_RPRN, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, | ||
KC_BSLS, KC_AMPR, KC_PIPE, KC_LBRC, KC_RBRC, KC_CAPS, KC_PGDN, _______, _______, _______, | ||
_______, KC_DEL, XXXXXXX, _______ | ||
), | ||
[3] = LAYOUT( | ||
_______, _______, _______, _______, _______, KC_PPLS, _______, _______, _______, _______, | ||
_______, _______, REDO, UNDO, _______, KC_MINS, KC_PEQL, KC_DQUO, KC_QUOT, _______, | ||
_______, _______, _______, _______, _______, _______, _______, KC_LABK, KC_RABK, _______, | ||
XXXXXXX, _______, KC_UNDS, _______ | ||
), | ||
[4] = LAYOUT( | ||
RESET, _______, _______, _______, _______, _______, KC_BRIU, KC_VOLU, ZOOMIN, _______, | ||
_______, _______, _______, _______, _______, _______, KC_BRID, KC_VOLD, ZOOMOUT, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, ACTUAL, _______, | ||
_______, _______, _______, XXXXXXX | ||
), | ||
[5] = LAYOUT( | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______ | ||
), | ||
[6] = LAYOUT( | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______ | ||
), | ||
[7] = LAYOUT( | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______ | ||
) | ||
}; | ||
|
||
void keyboard_post_init_user(void) { | ||
// Customise these values to desired behaviour | ||
debug_enable=true; | ||
debug_matrix=true; | ||
//debug_keyboard=true; | ||
//debug_mouse=true; | ||
} | ||
|
||
|
||
#define rot8(x,k) (((x) << (k))|((x) >> (8 - (k)))) | ||
uint8_t jsf8(void) { | ||
static uint8_t a = 0xf1, b = 0xee, c = 0xee, d = 0xee, e; | ||
e = a - rot8(b, 1); | ||
a = b ^ rot8(c, 4); | ||
b = c + d; | ||
c = d + e; | ||
return d = e + a; | ||
} | ||
|
||
#ifdef OLED_ENABLE | ||
bool oled_task_user(void) { | ||
// oled_render_layer_state(); | ||
// oled_render_keylog(); | ||
// 1234567890 | ||
oled_write_pixel(jsf8()%32,jsf8()%32, true); // performace. | ||
return false; | ||
} | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
return true; | ||
} | ||
#endif // OLED_ENABLE | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# The default keymap for pragmatic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
VIA_ENABLE = yes | ||
VIAL_ENABLE = yes | ||
VIAL_INSECURE = yes | ||
LTO_ENABLE = yes | ||
QMK_SETTINGS = no | ||
CONSOLE_ENABLE = yes # Console for debug | ||
|
||
EXTRAFLAGS += -flto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
{ | ||
"name": "Pragmatic 34", | ||
"vendorId": "0xFEED", | ||
"productId": "0x0F03", | ||
"lighting": "none", | ||
"matrix": { | ||
"rows": 4, | ||
"cols": 10 | ||
}, | ||
"layouts": { | ||
"keymap": [{ | ||
"name": "Pragmatic 34", | ||
"author": "James Sa" | ||
}, | ||
[{ | ||
"x": 2 | ||
}, | ||
"0,2", | ||
{ | ||
"x": 5.5 | ||
}, | ||
"0,7" | ||
], | ||
[{ | ||
"y": -0.5, | ||
"x": 1 | ||
}, | ||
"0,1", | ||
{ | ||
"x": 1 | ||
}, | ||
"0,3", | ||
"0,4", | ||
{ | ||
"x": 1.5 | ||
}, | ||
"0,5", | ||
"0,6", | ||
{ | ||
"x": 1 | ||
}, | ||
"0,8" | ||
], | ||
[{ | ||
"y": -0.5 | ||
}, | ||
"0,0", | ||
{ | ||
"x": 1 | ||
}, | ||
"1,2", | ||
{ | ||
"x": 5.5 | ||
}, | ||
"1,7", | ||
{ | ||
"x": 1 | ||
}, | ||
"0,9" | ||
], | ||
[{ | ||
"y": -0.5, | ||
"x": 1 | ||
}, | ||
"1,1", | ||
{ | ||
"x": 1 | ||
}, | ||
"1,3", | ||
"1,4", | ||
{ | ||
"x": 1.5 | ||
}, | ||
"1,5", | ||
"1,6", | ||
{ | ||
"x": 1 | ||
}, | ||
"1,8" | ||
], | ||
[{ | ||
"y": -0.5 | ||
}, | ||
"1,0", | ||
{ | ||
"x": 1 | ||
}, | ||
"2,2", | ||
{ | ||
"x": 5.5 | ||
}, | ||
"2,7", | ||
{ | ||
"x": 1 | ||
}, | ||
"1,9" | ||
], | ||
[{ | ||
"y": -0.5, | ||
"x": 1 | ||
}, | ||
"2,1", | ||
{ | ||
"x": 1 | ||
}, | ||
"2,3", | ||
"2,4", | ||
{ | ||
"x": 1.5 | ||
}, | ||
"2,5", | ||
"2,6", | ||
{ | ||
"x": 1 | ||
}, | ||
"2,8" | ||
], | ||
[{ | ||
"y": -0.5 | ||
}, | ||
"2,0", | ||
{ | ||
"x": 9.5 | ||
}, | ||
"2,9" | ||
], | ||
[{ | ||
"y": -0.5, | ||
"x": 3.5 | ||
}, | ||
"3,3", | ||
"3,4", | ||
{ | ||
"x": 0.5 | ||
}, | ||
"3,5", | ||
"3,6" | ||
] | ||
] | ||
} | ||
} |
Oops, something went wrong.