summaryrefslogtreecommitdiff
path: root/keyboards/keebio/bdn9/keymaps/vosechu-browser
diff options
context:
space:
mode:
authorChuck Lauer Vose <vosechu@gmail.com>2019-05-06 22:36:21 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-06 22:36:21 -0700
commit97b8567a1f4a64fe1d43cf54683472aeb534489b (patch)
tree35a5c05924c13ce2b3eef404c4100d62ad596128 /keyboards/keebio/bdn9/keymaps/vosechu-browser
parentf3d5b1091d364468cd9f5510aef9e723d8542279 (diff)
downloadqmk_firmware-97b8567a1f4a64fe1d43cf54683472aeb534489b.tar.gz
qmk_firmware-97b8567a1f4a64fe1d43cf54683472aeb534489b.zip
Adding bdn9 keymap examples for company event (#5800)
* Adding bdn9 keymap examples for company event * Simplify some code w/ tap_code16 [pr feedback] - Also remove backslashes - Remove xxx and ___ layer definitions - Properly name enums - Add newline after slack reaction
Diffstat (limited to 'keyboards/keebio/bdn9/keymaps/vosechu-browser')
-rw-r--r--keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c
new file mode 100644
index 0000000000..ca8679d574
--- /dev/null
+++ b/keyboards/keebio/bdn9/keymaps/vosechu-browser/keymap.c
@@ -0,0 +1,57 @@
+#include QMK_KEYBOARD_H
+
+// Macro keys for some apps
+#define SLACKUP LALT(LSFT(KC_UP))
+#define SLACKDN LALT(LSFT(KC_DOWN))
+#define RELOAD LGUI(KC_R)
+
+enum custom_keycodes {
+ PAWFIVE = SAFE_RANGE
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT(
+ RESET , PAWFIVE, RELOAD ,
+ SLACKUP, KC_UP , KC_PGUP,
+ SLACKDN, KC_DOWN, KC_PGDN
+ ),
+};
+
+void keyboard_post_init_user(void) {
+ // Call the post init code.
+ rgblight_enable_noeeprom(); // enables Rgb, without saving settings
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); // sets mode to Slow breathing without saving
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case PAWFIVE:
+ if (record->event.pressed) {
+ SEND_STRING("+:pawfive:\n");
+ return false;
+ }
+ }
+
+ return true;
+}
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) {
+ if (clockwise) {
+ // Tab right
+ tap_code16(LSFT(LGUI(KC_RBRC)));
+ } else {
+ // Tab left
+ tap_code16(LSFT(LGUI(KC_LBRC)));
+ }
+ }
+ else if (index == 1) {
+ if (clockwise) {
+ // History forward
+ tap_code16(LGUI(KC_RBRC));
+ } else {
+ // History back
+ tap_code16(LGUI(KC_LBRC));
+ }
+ }
+}