Making a shortcut keyboard

Bi1cool

New member
Hello, I just finish building a 30 keys keyboard using Teensy 4.0. Each key should open something like opening Youtube on Chrome and Steam on my pc. But how do I code that? I asked both Chatgpt and Gemini and they didnt know how to do it. If you know how I could make it, pls help. Im new with Teensy board. And I'm on Window 11.
 
Do you mean that you would like to start a program in Windows 10 using the Teensy as keyboard device?
You need to somehow use shortcuts which you will be sending from the Teensy to Windows.

One workaround is to pin the desired apps to your taskbar. Windows-Key + number 1 to 0 gives you 10 options.

Another way to run a software on your Windows system which interprets shortcuts. You can also define shortcuts like "Caps lock + key of your choice" to not disturb anything else. I have read about https://autohotkey.com/ that this should work - but cannot share any experience from my side.

With other software like AutoIt or so there is always the problem that a software doesn't get the incoming keyboard data when it is not in focus. I am curious now to try autohotkey because it would be nice to have something which solves that problem.

Edit: Searching for "run program from keyboard shortcut" or something similar could give you more options.
 
I built up a control system for our amateur radio clubhouse which allows members to make reservations on a schedule for the use of a radio & an antenna from a web-based scheduling system. I have an RPi that reads that database & uses the reservation information to selectively control the power on any one of three radios, & to connect any one of three antennas to the selected radio. A couple of the radios have PCs associated with them whose power must also be controlled. All of the power control is done by RPi I/O pins controlling digital relays.

Now, here's where my description of this system actually has something to do with the OPs post: after the reservation period ends, we needed a way to cleanly power-off the associated PCs. I programmed a Teensy for each PC which runs as a keyboard & accepts a trigger from the RPi via an I/O pin, then generates the keystrokes to run a command shell (WINDOWS-R, followed by "cmd.exe"), then generates the keystrokes to cause the command shell to shutdown the PC (" /c shutdown /s /t0" & RETURN). There are conditions where the PC needs to be restarted instead of shutdown, so a similar method is used from the same Teensy, triggered by a different I/O pin, which again generates the keystrokes to run a command shell (WINDOWS-R, followed by "cmd.exe"), then generates the keystrokes to cause the command shell to reboot the PC after a 30-second delay (" /c shutdown /r /t30" & RETURN).

Using this method is very effective at insulating the keyboard commands originating from the Teensy from anything else that may be going on with the PCs desktop applications (which might potentially interfere with initiating activities by way of a shortcut). In our radio clubhouse implementation, these PCs are not used by any operators, so we don't have to worry about any other windows stealing focus while the keyboard commands are being executed.

Hope that helps . . .

Mark J Culross
KD5RXT
 
i found a way to do my shortcut. but now i want to be able to do symbol that i could use in video game and other software to be assign inside of it for at specific action, like "b" is will do something in a video game. but i need more symbol that are not already used by a standard keyboard. I heard about unicode, but i dont know if it can be send over usb and be detected as the symbol the unicode represent
 
Back
Top