aboutsummaryrefslogtreecommitdiff
path: root/users/drashna/readme.md
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-03-31 19:38:06 -0700
committerJack Humbert <jack.humb@gmail.com>2018-03-31 22:38:06 -0400
commit61a2169ff9dea52136139ec156995efdc7929851 (patch)
tree5aebd210218859e55b211f10684ef15fc23f9dcc /users/drashna/readme.md
parentadae37f19f0d16b703e1ebce0449822492098444 (diff)
downloadqmk_firmware-61a2169ff9dea52136139ec156995efdc7929851.tar.gz
qmk_firmware-61a2169ff9dea52136139ec156995efdc7929851.zip
Update to Drashna Keymaps and Userspace (#2650)
* Change global config.h settings * Make Shift LED brighter * Compatibility Tweaks * Update ASCII art and layer comments * Add comments about MOD layer * Change ASCII art for reset, since it was out of date * Use Overwatch theme for Workman layer * Fix RGB define comments * Make sure RGB set list matches * Stop all notes for custom Faux Click * Switch to OSM for everything, and remove RGB Sleep * Never use KEYMAP now * Only enable RGB Sleep on Non-Ergodox boards * Cleanup do to new rgblight_list.h file * Add redirect message for RGB codes * Update userspace documentation * Cleanup of Userspace Add unicode support, and cleaned up comments for ifdef statements * Remove unneeded slashes * Unicode handling * Force NKRO
Diffstat (limited to 'users/drashna/readme.md')
-rw-r--r--users/drashna/readme.md39
1 files changed, 33 insertions, 6 deletions
diff --git a/users/drashna/readme.md b/users/drashna/readme.md
index 2229a3fe0..e3e5d399d 100644
--- a/users/drashna/readme.md
+++ b/users/drashna/readme.md
@@ -12,7 +12,7 @@ The reason for using seperate files here is that the `drashna.h` file doesn't ge
12 12
13However, the `rules.mk` file is included when building the firmware. So we can hijack that process to "manually" add a `config.h`. To do so, you would need to add the following to the `rules.mk` in your userspace: 13However, the `rules.mk` file is included when building the firmware. So we can hijack that process to "manually" add a `config.h`. To do so, you would need to add the following to the `rules.mk` in your userspace:
14 14
15``` 15```c
16ifneq ("$(wildcard users/$(KEYMAP)/config.h)","") 16ifneq ("$(wildcard users/$(KEYMAP)/config.h)","")
17 CONFIG_H += users/$(KEYMAP)/config.h 17 CONFIG_H += users/$(KEYMAP)/config.h
18endif 18endif
@@ -22,7 +22,7 @@ You can replace `$(KEYMAP)` with your name, but it's not necessary. This checks
22 22
23As for the `config.h` file, you want to make sure that it has an "ifdef" in it to make sure it's only used once. So you want something like this: 23As for the `config.h` file, you want to make sure that it has an "ifdef" in it to make sure it's only used once. So you want something like this:
24 24
25``` 25```c
26#ifndef USERSPACE_CONFIG_H 26#ifndef USERSPACE_CONFIG_H
27#define USERSPACE_CONFIG_H 27#define USERSPACE_CONFIG_H
28 28
@@ -122,7 +122,7 @@ If you would *also* like to take advantage of this feature, you'll first want to
122Then you can create this file and add your macro strings to it: 122Then you can create this file and add your macro strings to it:
123 123
124###### secrets.h 124###### secrets.h
125``` 125```c
126PROGMEM const char secret[][64] = { 126PROGMEM const char secret[][64] = {
127 "secret1", 127 "secret1",
128 "secret2", 128 "secret2",
@@ -132,11 +132,29 @@ PROGMEM const char secret[][64] = {
132}; 132};
133``` 133```
134 134
135Replacing the strings with the codes that you need. 135Replacing the strings with the codes that you need.
136 136
137In the `<name>.c` file, you will want to add this to the top:
137 138
138These are called in the `process_record_user` function, using this block: 139```c
140
141#if (__has_include("secrets.h") && !defined(NO_SECRETS))
142#include "secrets.h"
143#else
144// `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware
145// And I'm not familiar enough to know which is better or why...
146PROGMEM const char secret[][64] = {
147 "test1",
148 "test2",
149 "test3",
150 "test4",
151 "test5"
152};
153#endif
139``` 154```
155
156And then, in the `process_record_user` function, you'll want to add this block:
157```c
140 case KC_SECRET_1 ... KC_SECRET_5: 158 case KC_SECRET_1 ... KC_SECRET_5:
141 if (!record->event.pressed) { 159 if (!record->event.pressed) {
142 send_string_P(secret[keycode - KC_SECRET_1]); 160 send_string_P(secret[keycode - KC_SECRET_1]);
@@ -145,4 +163,13 @@ These are called in the `process_record_user` function, using this block:
145 break; 163 break;
146``` 164```
147 165
148And this requires `KC_SECRET_1` through `KC_SECRET_5` to be defined, as well. 166And this requires `KC_SECRET_1` through `KC_SECRET_5` to be defined in your `<name>.h` file fo the new macros, as well.
167
168Additionally, if you want to make sure that you can disable the function without messing with the file, you need to add this to your `/users/<name>/rules.mk`, so that it catches the flag:
169```c
170ifeq ($(strip $(NO_SECRETS)), yes)
171 OPT_DEFS += -DNO_SECRETS
172endif
173```
174
175Then, if you run `make keyboard:name NO_SECRETS=yes`, it will default to the test strings in your `<name>.c` file, rather than reading from your file.