The keyboard for DeviceScript is a fully programmable and expandable keyboard based on RP2040. It allows you to enhance your desktop-level interaction experience and create a creative atmosphere by connecting various electronic modules (Jacdac). With this keyboard, you can customize its functions, create a gesture-controlled gaming device, a mailbox that automatically raises to remind you of incoming mail, or even integrate your keyboard and connected external modules into MQTT. We aim to bring DeviceScript, a technology full of potential, into your creative life, allowing TypeScript developers to experience the exciting transformation from software to controlling hardware devices. We will keep you updated with a series of articles on applications and fun creations related to the keyboard project. Stay tuned for more exciting updates!
The project supports programming and defining the keyboard itself, as well as extending external electronic modules and defining them based on DeviceScript standards. It also supports the use of the Agent tool on your computer (we will demonstrate its capabilities and usage in upcoming articles), allowing you to invoke various JavaScript scripts for highly flexible functionality definitions.
JourneyThinking
We became excited about DeviceScript starting in June 2023, which led us to embark on the path of developing desktop-level devices. Our first thought was the keyboard. Whether working on a computer, gaming, or enjoying drawing or video processing, it is the most intuitive device we can interact with. Our envisioned future is a brand-new lightweight desktop control system, which means that in the future, it may not simply be in the form of a keyboard, but perhaps something more agile, refined, and incredible. Full of curiosity and a spirit of exploration, we named it AgileWhisker.
Prototyping
Exposure
We have taken it to some exhibitions and received some curiosity and praise. We have already started crowdfunding on the Crowd Supply platform and hope to make it more widely known.
Development
1. First, we will need to install the necessary DeviceScript extension in VSCode.
2. Create a new project and open it (or you can also start with our project).
3. After connecting the keyboard using USB, connect the device in the project.
4. I have prepared two simple interaction cases to showcase the customization charm of the programmable keyboard.
Case 1 - The Leaping Colorful 'Sprite'The flowing colorful lights of a mechanical keyboard are vibrant, but their display modes are limited. With TypeScript editing, we can completely customize a set of flashing combinations that we like. In the following example, we will create a simple RGB that lights up randomly following a key press.
1. In our project, write the program in the.ts file (you can give the this file a more intuitive name). First, import the core libraries we need to use
2. get the keys position through the HidKeyboard class in the core library.
3. Complete the 'code'.
4. Run the program to test the effect~
We often use copy and paste during code debugging. I'd like to add some fun to the mundane task of copying and pasting.
1. We need to prepare two Jacdac button modules and connect them together.
2. Create a new.ts program file and start by importing the core library that we need to use (View source case)
2. Write the code for the button module. The buttons are from the Jacdac series by KittenBot, and their API can be found in the API documentation. Here, we are using the button modules to simulate the keyboard shortcuts Ctrl+C and Ctrl+V for one-click copy and paste.
3. Completing the code, click on 'Run' to initiate the firmware flashing process. Once the flashing is successful, you will observe the simulator appearing, and the real-time status of our buttons can be seen on the simulator. This makes debugging very convenient.
We believe that DeviceScript is an excellent platform, offering a more convenient interactive experience and expandable space compared to MicroPython, especially in terms of hardware support. It has considerable potential for development in the future of PC interaction.
We have now joined the Crowd Supply crowdfunding campaign, which includes keyboards and functional electronic module expansion packs. We hope to receive your support! Subscribe and join this project to progress together with us, creating a future of unlimited potential for PC interaction devices.
Open Source&Community- Project Website&Learn: https://w.kittenbot.cc
The latest news will be displayed on the website, please stay tuned.
- Project demo repo: https://github.com/KittenBot/devs-keyboard
- Agent App: https://github.com/KittenBot/agilewhisker-desktop
Provide script services based on JavaScript or Python, or customize functions
Comments