#macropad stuff
1 messages · Page 1 of 1 (latest)
get all the files from the zip
it should look like that:
remove the files in macros that you don't want
get the full lib directory
when I click the python 7x I only have lib, macros, code
yes, put that in
okay got those 3 drragged over
unless it's running 6.3.0 instead of 7, it should restart and show you something of the screen, and all that
just to check what version does boot_out.txt say, is it 6.3.0 or 7.0.0 ?
each page is one of the files in macros
so if I delete one it will take it out of the list of macros on my pad?
yep
you can remove those you don't want, add your own (it might take a bit of work to get how that works)
you can change the order by changing the names of the files
so I have windows so I can delete all the linux and mac stuff
yup
if you want the numpad to be the default, you can put a "1" at the start of the file's name for example
juste any valid file name, they will appear in alphabetical order
with numbers first of course
I tend to to like: 1-numpad.py
not that with notepad you have to be careful with the file extension, it must be ".py", you might have to show file extensions in the file explorer options
I was using mu but I didnt get that
we advise using Mu in general
Mu would put the correct file extension, Notepad could add ".txt"
which makes things not work
so how would I go about adding a new function? just finding code and putting it into mu then saving it into the macro folder?
yeah, the best is probably to start by copying an existing one, and then modify it
yaaa idk how to modify lol. I've been trying to get this thing do do anything for 2 days now
MACROPAD Hotkeys example: Universal Numpad
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
app = { # REQUIRED dict, must be named 'app'
'name' : 'Numpad', # Application name
'macros' : [ # List of button macros...
# COLOR LABEL KEY SEQUENCE
# 1st row ----------
(0x202000, '7', ['7']),
(0x202000, '8', ['8']),
(0x202000, '9', ['9']),
# 2nd row ----------
(0x202000, '4', ['4']),
(0x202000, '5', ['5']),
(0x202000, '6', ['6']),
# 3rd row ----------
(0x202000, '1', ['1']),
(0x202000, '2', ['2']),
(0x202000, '3', ['3']),
# 4th row ----------
(0x101010, '', ['']),
(0x800000, '0', ['0']),
(0x101010, '#', ['#']),
# Encoder button ---
(0x000000, '', [Keycode.BACKSPACE])
so this is the numpad code. how would I change the color of each key
would it be the (0x202000
yes it's hexadecimal, for example 0x202000 is split into 20, 20, 00, or in decimal 32, 32, 0 which are the RGB values
so how do you figure out what values say pink would be
there's plenty of online colorpickers that will give you the color codes, like this one https://htmlcolorcodes.com/color-picker/
for example here you would type "0xED96F9"
I think you can also give the color as a tuple like this instead of a number: (255, 0, 255)
(0x202000, '7', ['7'] so this is row one
would I jsut change it to (255x0255
or it needs to be 6 long?
no, you have to make it a single hexadecimal number, in this case 0xFF00FF because 255 is FF, but it's easier to copy the hexadecimal number given in a color picker
so I need to keep the 0x then the hex
or try ((255,0,255), "7", ["7"]), I believe it should work
it's the color in hexadecimal, you replace the # with 0x
(html/css uses # for colors)
so it would look like (0xFFOOFF, '7'
yep
then I just click save on the note pad?
are those letter O's ? you want 0
okay just letter and numbers
it's an hexadecimal number, the digits are 0123456789ABCDEF
MACROPAD Hotkeys example: Universal Numpad
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
app = { # REQUIRED dict, must be named 'app'
'name' : 'Numpad', # Application name
'macros' : [ # List of button macros...
# COLOR LABEL KEY SEQUENCE
# 1st row ----------
(0xFF00FF, '7', ['7']),
(0xFF00FF, '8', ['8']),
(0xFF00FF, '9', ['9']),
# 2nd row ----------
(0xFF00FF, '4', ['4']),
(0xFF00FF, '5', ['5']),
(0xFF00FF, '6', ['6']),
# 3rd row ----------
(0xFF00FF, '1', ['1']),
(0xFF00FF, '2', ['2']),
(0xFF00FF, '3', ['3']),
# 4th row ----------
(0xFF00FF, '', ['']),
(0xFF00FF, '0', ['0']),
(0xFF00FF, '#', ['#']),
# Encoder button ---
(0x000000, '', [Keycode.BACKSPACE])
]
}
holy crrap I did it
👍
anyway, I gotta go, don't hesitate to try stuff, look at the examples, if you want to know what keys you can use for shortcuts (where the examples use Keycode.SOMETHING), there's a list here https://circuitpython.readthedocs.io/projects/hid/en/latest/api.html#adafruit-hid-keycode-keycode