summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-08-29 01:38:01 +0000
committerQMK Bot <hello@qmk.fm>2022-08-29 01:38:01 +0000
commit0d40c65aeed11363b7fcfb9ee67e2894b0e91115 (patch)
tree24acf49b2d1768c3792d992907ab5b263183fa4d
parent6a13ae9fd75a1187642191b217d066d7c1eb7151 (diff)
parent3f99c42800167a7be8829a8e8fbb1c64cf966eeb (diff)
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r--keyboards/moonlander/matrix.c4
-rw-r--r--keyboards/moonlander/moonlander.h2
-rw-r--r--keyboards/moonlander/readme.md16
3 files changed, 21 insertions, 1 deletions
diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c
index b6bac9515e..36017fcd12 100644
--- a/keyboards/moonlander/matrix.c
+++ b/keyboards/moonlander/matrix.c
@@ -227,3 +227,7 @@ void matrix_power_up(void) {
}
}
+
+bool is_transport_connected(void) {
+ return mcp23018_initd;
+} \ No newline at end of file
diff --git a/keyboards/moonlander/moonlander.h b/keyboards/moonlander/moonlander.h
index 8598260211..90ce84b3e3 100644
--- a/keyboards/moonlander/moonlander.h
+++ b/keyboards/moonlander/moonlander.h
@@ -82,3 +82,5 @@ typedef union {
} keyboard_config_t;
extern keyboard_config_t keyboard_config;
+
+bool is_transport_connected(void); \ No newline at end of file
diff --git a/keyboards/moonlander/readme.md b/keyboards/moonlander/readme.md
index bf80f05569..733780abde 100644
--- a/keyboards/moonlander/readme.md
+++ b/keyboards/moonlander/readme.md
@@ -41,4 +41,18 @@ If you're using the Smart LED (layer indication) feature from the Oryx Configura
This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off.
-Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already.
+Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already.
+
+### Detecting split / Gaming mode
+
+To make it extra gaming friendly, you can configure what happens when you disconnect the right half. This is especially useful when using gaming unfriendly layers or layouts (e.g. home row mods, dvorak, colemak).
+
+Example for enabling a specific layer while right side is disconnected:
+
+```
+void housekeeping_task_user(void) {
+ if (!is_transport_connected()) {
+ // set layer
+ }
+}
+``` \ No newline at end of file