Standard Caps Lock behaviour


(albx79) #1

Hi there,

is there a way to light up a key while CapsLock is on? Nothing fancy like making all letters red, I just need a simple vidual indication that Caps Lock is active.

Thanks!
Alberto


#2

what i’ve been thinking about doing personally is making fn+shift do caps lock and then using the breathe function on that key


(fedward) #3

I wrote a plugin for this, but it does, in fact, turn all the letter keys red (and lights up the shift key with the same “breathe” effect as the NumPad plugin does on the Num Lock key).

If you wanted to fork it and remove the red effect, the lines to edit would be lines 35-41 in Kaleidoscope-CapsLock.cpp:

        if ((k.raw >= Key_A.raw) && (k.raw <= Key_Z.raw)) {
          LEDControl.setCrgbAt(r, c, active_mode_color);
        } else if (k == Key_LeftShift || k == Key_RightShift) {
          LEDControl.setCrgbAt(r, c, breathColor);
        } else {
          LEDControl.refreshAt(r, c);
        }

Specifically it should do what you want if you change it to something like this:

        if (k == Key_LeftShift || k == Key_RightShift) {
          LEDControl.setCrgbAt(r, c, breathColor);
        } else {
          LEDControl.refreshAt(r, c);
        }

(fedward) #4

Also if you have comments about the plugin there’s already a thread for it: https://community.keyboard.io/t/kaleidoscope-capslock-turns-letter-keys-red-when-caps-lock-is-on/993/14


#5

thanks, i was actually just looking at that very thread for ideas on the best way to implement this


(albx79) #6

Both solution are fine, TBH, whatever is easier to implement.

@fedward, how do I install your plugin?
@homosaur, how do I use the breathe function?

Sorry if I’m asking trivial questions, but documentation is scarce and I’m not familiar with embedded C programming.


(fedward) #7

I’ve never tried to install it as a download (since I built it on my local machine), so this should be fun. Looks like you should download the zip file of the release: Kaleidoscope-CapsLock-v0.0.1.zip and then go to Sketch->Add File… and select the zip file you downloaded.

Then there are a few lines you have to add to your sketch, documented in the README.


#8

Hi fedward, I am a complete newb when it comes to flashing, programming,etc.
I installed the plugin and modified the sketch as instructed. The change passes validation, but when I flash, it takes a long time (over 5 min), and throws an error. Here is a copy of the verbose:
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
System wide configuration file is “C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf”
Using Port : usb
Using Programmer : stk500v2
avrdude: usbdev_open(): did not find any USB device “usb” (0x03eb:0x2104)
avrdude done. Thank you.
An error occurred while uploading the sketch

For info, my machine runs Win10 x64bits, and the keyboard is connected to a USB port identified as COM3.
Hope you can help me, since Caps lock is basic for my business…
Dracodl


(fedward) #9

Hey sorry, I’ve been traveling a lot and I never saw a notification on this reply. Did you get your firmware updated?


#10

Hi fedward, the problem with flashing was fixed after I updated the firmware. Thank you for checking up with me!

Debora L.