Code Monkey home page Code Monkey logo

i2c_puppet's People

Contributors

arturo182 avatar billylindeman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

i2c_puppet's Issues

Support for sending consumer control codes

@arturo182 Thanks for this amazing project! Ever since I received my BBQ20KBD I've been fascinated by the project and the firmware. I've been tinkering with it and I think that I do now have some understanding of the overall structure of the code in this project.

The goal I'm trying to accomplish is the following: I'd like to bind KEY_BTN_LEFT2 to sending a keycode that triggers HOME on Android (so: navigating to the launcher). I'd like to try using some keycodes on the 0x0C page (Consumer Control) to achieve that.

Looking at the tinyusb library I can see that buttons in the 0x0C page (Consumer Control) can't be sent using tud_hid_n_keyboard_report. Instead the more generic tud_hid_report has to be used. Any attempts I have made so far have resulted in various compilation errors.

Is adding 0x0C page support something that's on your roadmap as well? Otherwise I'll continue my attempts at bruteforcing this at a later point in time :).

No ESC key.

I tried the keyboard on a raspberry pi, and quickly found no ESC key.
I couldn't even hit CNTL-[

This made exiting vi difficult..

sym key functionality (Improvement)

I'm not sure if it already has functionality that just isn't used in English (us) but I feel like sym+1-9,0.#,* should map to f1-f12 and/or act as a menu or AltGr

Look into offering the Mic as a USB Audio source.

The Mic has to be enabled by soldering the jumper on the back. After that, it should be available via the ADC on GPIO27. It should be possible to connect it to a USB audio class to have a USB microphone.

Send top keys over USB

The buttons left and right of the trackpad, right now they don't do anything over USB.

Request: Arrows, Fn, Del, Esc, and Ctrl

I love this little KB. Would like to see the following changes/additions over USB:

Change: Right Shift + wasd = Arrow keys
Change: Left Shift + Right Shift = Caps Lock
Add: SYM + wersdfzxc~ (1-0) = F1-F10
Add: Alt + Backspace = Del
Add: Left Shift + mic/~ = Esc
Add: One of the four top row buttons as Ctrl

Fix left shift (bug/enhancement)

Left shift currently functions as both shift and escape causing issues with some text entry on desktops and almost constantly on Android.

If you can figure out why and separate them or alter the code to only pass escape when quickly pressed alone that'd be fantastic

Problems Building

I've been trying to flash the firmware to my keyboard but I am struggling to figure out how to build the firmware in the first place.

When I follow the build steps, I am greeted with the error:

CMake Error at cmake/preload/toolchains/find_compiler.cmake:28 (message):
  Compiler 'arm-none-eabi-gcc' not found, you can specify search path with
  "PICO_TOOLCHAIN_PATH".
Call Stack (most recent call first):
  cmake/preload/toolchains/pico_arm_gcc.cmake:20 (pico_find_compiler)
  /opt/homebrew/Cellar/cmake/3.26.2/share/cmake/Modules/CMakeDetermineSystem.cmake:148 (include)
  CMakeLists.txt:10 (project)


CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

Any guidance would be very much appreciated!

Example code

The Circuit Python and Arduino code is not in the repository.

The Arduino code on the web page is wrong, BTW.

  • There is no Serial.printf() function.
  • The board type is not provided in the documentation
  • Uploading the code does not work. I suspect a different bootloader is needed for Arduino code.

How to flash firmware?

How does one flashes the firmware after a build or the release files to the actual keyboard over usb?

Allow multiple keys to be held simultaneously.

In my own experimenting I had trouble getting the keyboard to allow multiple keys to be held simultaneously for use with shortcuts. As soon as the next key is pressed, any other held key is no longer being reported as held or pressed.

Cursor keys etc - you can do it yourself

Hi,

A lot of these requests are for additional keys to be available. Well, the source code is available here, and since everyone is going to have slightly different preferences, why not do it yourself. It's a challenge, but it's not that hard, as I've just found out.

It turns out grymoire has already done most of the work for us. I had trouble when I used his branch though, so I would suggest cloning the original firmware, then applying this commit: grymoire@cb845dd - it only takes and min, and you can just apply it without understanding it, as I did.

The one thing he didn't get chance to do, was to add cursor keys. This turns out to be easier than expected. In keyboard.c, you can use KEY_JOY_LEFT, KEY_JOY_RIGHT, KEY_JOY_UP and KEY_JOY_DOWN to send the cursor keys, so this is what I've got for my first top row soft key:
case KEY_BTN_LEFT1:
if (alt) {
key = '>';
} else if (shift) {
key = '<';
} else if (control) {
key =0x1B; // ESC
} else {
key = KEY_JOY_LEFT;
}

When you're happy, change to the i2c_puppet/build directory and do...
cmake -DPICO_BOARD=bbq20kbd_breakout -DCMAKE_BUILD_TYPE=Debug ..
...then...
make

This will have generated a file called i2c_puppet.uf2 in the app subdirectory of the build directory. Then, you just need to hold down the fourth top row soft key on keyboard, plug it in, and you will see that a RPI-RP2 filesystem appears, and you just copy i2c_puppet.uf2 to the top level. The keyboard will 'reboot' itself, and you'll then have you changes available.

You don't even need a Linux machine to do this. I did it all by installing WSL on Windows 10, which again, is pretty simple.

Good luck

Missing arrow keys

I did not find the proper way to navigate the cursor.
Maybe hjkl with a meta such as Fn could be used.
Vi user don't need arrows, but for nano or line editing, this is important.

Support for key repetition

When keeping a key pressed for a long time, the character was only entered once.
Not sure if this is an OS feature or something wrong in the firmware. Maybe the key up event is send independently of effective key up???

(only tested on Android phone, I need to check another OS)

Error during compilation

Following the README, I tried to compile the firmware, and got this error:

PICO target board is bbq20kbd_breakout.
CMake Error at src/boards/generic_board.cmake:22 (message):
  Unable to find definition of board 'bbq20kbd_breakout' (specified by
  PICO_BOARD):

     Looked for bbq20kbd_breakout.h in /Users/dda/Downloads/i2c_puppet/3rdparty/pico-sdk/src/boards/include/boards (additional paths specified by PICO_BOARD_HEADER_DIRS)
     Looked for bbq20kbd_breakout.cmake in /Users/dda/Downloads/i2c_puppet/3rdparty/pico-sdk/src/boards (additional paths specified by PICO_BOARD_CMAKE_DIRS)
Call Stack (most recent call first):
  src/board_setup.cmake:28 (include)
  src/CMakeLists.txt:15 (include)

Any idea what's happening...? Mac OS X 11.6.1.

Missing original firmware UF2

In order to hack with the keyboard with a safe way to return to factory settings, you should provide the factory firmware as an artefact.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.