diff --git a/TODO b/TODO index dda5180..73c4d54 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,6 @@ * Improve error/warning messaging when parsing configuration file - * Refactor and consolidate arbitrary set speed function into one file for all platforms - * Consider reworking line toggle and line pulse featueres in case requests are made to apply them to more lines: ctrl-t g Toggle serial line diff --git a/src/misc.c b/src/misc.c index 7e8ffbd..8ab8970 100644 --- a/src/misc.c +++ b/src/misc.c @@ -120,3 +120,13 @@ long string_to_long(char *string) return result; } + +int ctrl_key_code(unsigned char key) +{ + if ((key >= 'a') && (key <= 'z')) + { + return key & ~0x60; + } + + return -1; +}