summaryrefslogtreecommitdiff
path: root/keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2021-08-21 22:53:49 -0500
committerGitHub <noreply@github.com>2021-08-22 13:53:49 +1000
commit78ccd9c201199444bc06161b05ee8d7ba9c31613 (patch)
tree726d9e55d8cde510fe72bc1fb9bb2a7dabdbecc2 /keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h
parentc70abc8d047319830e369ae4e14cd43bae3bd3b8 (diff)
Organize KPrepublic, K.T.E.C, xiudi boards into directories (#12159)
* reset; redoing my steps; and recommit * include xd002/.noci
Diffstat (limited to 'keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h')
-rw-r--r--keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h b/keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h
new file mode 100644
index 0000000000..d0460856b2
--- /dev/null
+++ b/keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h
@@ -0,0 +1,90 @@
+/*
+ * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ * Version 2, December 2004
+ *
+ * Copyright (C) 2019 4sStylZ <4sstylz@protonmail.ch>
+ *
+ * Everyone is permitted to copy and distribute verbatim or modified
+ * copies of this license document, and changing it is allowed as long
+ * as the name is changed.
+ *
+ * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ *
+ * 0. You just DO WHAT THE FUCK YOU WANT TO.
+ */
+#include QMK_KEYBOARD_H
+
+/**
+ * Macro for selecting all the text in the document.
+ * Usual shortcut : Ctrl+A.
+ *
+ * @param keyrecord_t *record
+ *
+ * @return void
+ */
+void select_all(keyrecord_t *record) {
+ if (record->event.pressed) {
+ tap_code16(C(KC_A));
+ }
+}
+
+/**
+ * Macro for selecting the current row.
+ *
+ * @param keyrecord_t *record
+ *
+ * @return void
+ */
+void select_row(keyrecord_t *record) {
+ if (record->event.pressed) {
+ tap_code(KC_HOME);
+ tap_code16(S(KC_END));
+ }
+}
+
+/**
+ * Macro for selecting the current word.
+ * Usage : You need to have the cursor into the word or directly at the right.
+ *
+ *
+ * Usual shortcut : Ctrl+A.
+ *
+ * @param keyrecord_t *record
+ *
+ * @return void
+ */
+void select_word(keyrecord_t *record) {
+ if (record->event.pressed) {
+ register_code(KC_LCTL);
+ tap_code(KC_LEFT);
+ tap_code16(S(KC_RGHT));
+ unregister_code(KC_LCTL);
+ }
+}
+
+/**
+ * Macro for inserting two 0 with keypad.
+ * Be carefull to have the keypad lock enabled
+ *
+ * @param keyrecord_t *record
+ *
+ * @return void
+ */
+void insert_00(keyrecord_t *record) {
+ if (record->event.pressed) {
+ tap_code16(S(KC_0));
+ tap_code16(S(KC_0));
+ }
+}
+
+/**
+ * Bépo Windows lock
+ *
+ * @param keyrecord_t *record
+ *
+ * @return void
+ */
+void windows_lock(void) {
+ tap_code16(G(KC_O));
+}