aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/wilba_tech/via_keycodes.h
diff options
context:
space:
mode:
authorWilba <Jason.S.Williams@gmail.com>2019-07-21 21:46:22 +1000
committerDanny <nooges@users.noreply.github.com>2019-07-21 07:46:22 -0400
commitbffbb4b42d3167125f54b5aeb7a30fef44ff5dbe (patch)
tree679ba294b68488b74e54300a435654057f09af81 /keyboards/wilba_tech/via_keycodes.h
parentd686c0ea43d6a9db7768da64ee54c3ba25c018f7 (diff)
downloadfirmware-bffbb4b42d3167125f54b5aeb7a30fef44ff5dbe.tar.gz
firmware-bffbb4b42d3167125f54b5aeb7a30fef44ff5dbe.tar.bz2
firmware-bffbb4b42d3167125f54b5aeb7a30fef44ff5dbe.zip
Refactoring wilba.tech PCBs, updating Rama Works U80-A (#6272)
* Added WT65-B, WT75-B, minor fixes * Update keyboards/wilba_tech/wt65_b/config.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/wilba_tech/wt65_b/readme.md Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update keyboards/wilba_tech/wt75_b/config.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Change DEBOUNCING_DELAY to DEBOUNCE * Change DEBOUNCING_DELAY to DEBOUNCE * Move Zeal60/Zeal65 files to keyboards/wilba_tech * Change DEBOUNCING_DELAY to DEBOUNCE * Refactoring zeal60 code to wilba_tech * Moved Rama Works PCBs to wilba_tech * Rename Rama Works files * Cleanup info.json * Cleanup readme.md * Cleanup USB device strings * U80-A RGB matrix, IS31FL3731 driver changes * Fixed #include from keyboards/zeal60
Diffstat (limited to 'keyboards/wilba_tech/via_keycodes.h')
-rw-r--r--keyboards/wilba_tech/via_keycodes.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/keyboards/wilba_tech/via_keycodes.h b/keyboards/wilba_tech/via_keycodes.h
new file mode 100644
index 000000000..bed48d64b
--- /dev/null
+++ b/keyboards/wilba_tech/via_keycodes.h
@@ -0,0 +1,77 @@
+/* Copyright 2017 Jason Williams (Wilba)
+ *
+ * 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
+
+// Can't use SAFE_RANGE here, it might change if someone adds
+// new values to enum quantum_keycodes.
+// Need to keep checking 0x5F10 is still in the safe range.
+// TODO: merge this into quantum_keycodes
+// Backlight keycodes are in range 0x5F00-0x5F0F
+enum via_keycodes {
+ FN_MO13 = 0x5F10,
+ FN_MO23,
+ MACRO00,
+ MACRO01,
+ MACRO02,
+ MACRO03,
+ MACRO04,
+ MACRO05,
+ MACRO06,
+ MACRO07,
+ MACRO08,
+ MACRO09,
+ MACRO10,
+ MACRO11,
+ MACRO12,
+ MACRO13,
+ MACRO14,
+ MACRO15,
+};
+
+enum user_keycodes {
+ USER00 = 0x5F80,
+ USER01,
+ USER02,
+ USER03,
+ USER04,
+ USER05,
+ USER06,
+ USER07,
+ USER08,
+ USER09,
+ USER10,
+ USER11,
+ USER12,
+ USER13,
+ USER14,
+ USER15,
+};
+
+// VIA specific "action functions", introduced with Zeal60
+// These are only valid IDs in action_function()
+// Use FN_TT13, FN_TT23, etc. in keymaps
+enum via_action_functions {
+ TRIPLE_TAP_1_3 = 0x31,
+ TRIPLE_TAP_2_3 = 0x32
+};
+
+// Bitwise OR the above with 0x0F00 to use in F(x) macro
+// This reserves the top 256 of the 4096 range of F(x) keycodes,
+// leaving the rest for use in fn_actions[] or actions in EEPROM.
+#define FN_TT13 F((0x0F00|TRIPLE_TAP_1_3))
+#define FN_TT23 F((0x0F00|TRIPLE_TAP_2_3))
+
+#define TG_NKRO MAGIC_TOGGLE_NKRO