You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fauxpark e04e55c872
Remove redundant KC_TRNS and KC_NO fillers in userspace (#5140)
4 years ago
config.h Make `PREVENT_STUCK_MODIFIERS` the default (#3107) 4 years ago
ishtob.c Keymap: adding my personal userspace to QMK master (#3605) 4 years ago
ishtob.h Remove redundant KC_TRNS and KC_NO fillers in userspace (#5140) 4 years ago Keymap: adding my personal userspace to QMK master (#3605) 4 years ago Fixes STM32F303XC timer issue for Planck Rev 6 (#3777) 4 years ago

Ishtob's userspace

under developement

Secret Macros

This section is a modified version of what @drashna did in his userspace:

macros_private.c will be used if it exsists in the userspace folder during compiling.

To get started, put the following in this will have the compiler include the macros_private.c file if it exsists.

SRC += ishtob.c
ifneq ($(wildcard $(USER_PATH)/macros_private.c),"")
  SRC += macros_private.c
ifeq ($(strip $(NO_SECRETS)), yes)

Remember that all macro keycode has to be present in the header file (ishtob.h) to prevent error during compile.

Next, you setup macros_private.c, ensure the keycodes are defined in ishtob.h (or your keymap.h). Here is an example of my macros with the sensitive login information removed:

#include "ishtob.h" //replace this with your userspace or keymap
#include "quantum.h"

#pragma message "secret macros included" //debug line to let me know this file is included in the compile

//this str is for the monthly password rotation per my workplace's security policy
char my_str[5] = "stuff";

bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
  if (record->event.pressed) {
    switch(keycode) {
      //my login macros
      case P_CITRIX:
          return false;
      case P_MPASS:
          return false;
      case P_META:
          return false;
      //my work macros for the meta application
      case O_RTQ6H:
          return false;
      case O_AUTODC:
          return false;
      case O_DAYRN:
          return false;
      //Ops macros
      case M_EMAIL:
          return false;       
      case M_EMAIL2:
          return false;
  return true;

Finally, add the following to .git/info/exclude to prevent private macros from being committed to git.

# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~

Special mentions

special thanks to @drashna for helping me through quite a bit of these codes.