Skip to content

Instantly share code, notes, and snippets.

@victortrac
Created November 2, 2022 03:25
Show Gist options
  • Save victortrac/4628ffebaabf55510c0c9656525e2972 to your computer and use it in GitHub Desktop.
Save victortrac/4628ffebaabf55510c0c9656525e2972 to your computer and use it in GitHub Desktop.
model 100 tweaks
--- a/examples/Devices/Keyboardio/Model100/Model100.ino
+++ b/examples/Devices/Keyboardio/Model100/Model100.ino
@@ -100,6 +100,9 @@
// Support for the GeminiPR Stenography protocol
#include "Kaleidoscope-Steno.h"
+// Support for Autoshifting
+#include <Kaleidoscope-AutoShift.h>
+
/** This 'enum' is a list of all the macros used by the Model 100's firmware
* The names aren't particularly important. What is important is that each
* is unique.
@@ -187,10 +190,10 @@ enum {
*
*/
-#define PRIMARY_KEYMAP_QWERTY
+// #define PRIMARY_KEYMAP_QWERTY
// #define PRIMARY_KEYMAP_DVORAK
// #define PRIMARY_KEYMAP_COLEMAK
-// #define PRIMARY_KEYMAP_CUSTOM
+#define PRIMARY_KEYMAP_CUSTOM
/* This comment temporarily turns off astyle's indent enforcement
@@ -263,7 +266,7 @@ KEYMAPS(
M(MACRO_ANY), Key_6, Key_7, Key_8, Key_9, Key_0, LockLayer(NUMPAD),
Key_Enter, Key_Y, Key_U, Key_I, Key_O, Key_P, Key_Equals,
Key_H, Key_J, Key_K, Key_L, Key_Semicolon, Key_Quote,
- Key_RightAlt, Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus,
+ LockLayer(FUNCTION), Key_N, Key_M, Key_Comma, Key_Period, Key_Slash, Key_Minus,
Key_RightShift, Key_LeftAlt, Key_Spacebar, Key_RightControl,
ShiftToLayer(FUNCTION)),
@@ -301,7 +304,7 @@ KEYMAPS(
Consumer_ScanPreviousTrack, Key_F6, Key_F7, Key_F8, Key_F9, Key_F10, Key_F11,
Consumer_PlaySlashPause, Consumer_ScanNextTrack, Key_LeftCurlyBracket, Key_RightCurlyBracket, Key_LeftBracket, Key_RightBracket, Key_F12,
Key_LeftArrow, Key_DownArrow, Key_UpArrow, Key_RightArrow, ___, ___,
- Key_PcApplication, Consumer_Mute, Consumer_VolumeDecrement, Consumer_VolumeIncrement, ___, Key_Backslash, Key_Pipe,
+ ___, Consumer_Mute, Consumer_VolumeDecrement, Consumer_VolumeIncrement, ___, Key_Backslash, Key_Pipe,
___, ___, Key_Enter, ___,
___)
) // KEYMAPS(
@@ -601,16 +604,33 @@ KALEIDOSCOPE_INIT_PLUGINS(
// Enables the GeminiPR Stenography protocol. Unused by default, but with the
// plugin enabled, it becomes configurable - and then usable - via Chrysalis.
- GeminiPR);
+ GeminiPR,
+
+ // https://github.com/keyboardio/Kaleidoscope/tree/master/plugins/Kaleidoscope-AutoShift
+ AutoShift
+);
/** The 'setup' function is one of the two standard Arduino sketch functions.
* It's called when your keyboard first powers up. This is where you set up
* Kaleidoscope and any plugins.
*/
void setup() {
+ // QuKey likes to go first
+ QUKEYS(
+ kaleidoscope::plugin::Qukey(0, KeyAddr(3, 0), Key_LeftShift), // F/shift
+ )
+ Qukeys.setHoldTimeout(500);
+ Qukeys.setOverlapThreshold(50);
+ Qukeys.setMinimumHoldTime(100);
+ Qukeys.setMinimumPriorInterval(80);
+ Qukeys.setMaxIntervalForTapRepeat(150);
+
// First, call Kaleidoscope's internal setup function
Kaleidoscope.setup();
+ AutoShift.setEnabled(AutoShift.numberKeys() | AutoShift.symbolKeys());
+ AutoShift.setTimeout(175);
+
// Set the hue of the boot greeting effect to something that will result in a
// nice green color.
BootGreetingEffect.hue = 85;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment