-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change keyboard layout #10
Comments
Hi, there's quite a lot regarding keyboard layouts happening in the HID module used by this project. In pull request #61 of the Adafruit CircuitPython HID module, @AngainorDev is trying to make it easier to add more keyboard layouts without increasing too much the bundle size for it to remain compatible with boards that have a smaller flash memory. I encourage you take a look at his PR and keyboard layout code and maybe, while you're at it, start messing around to figure out how to create one for your language 😉 |
I started a repository of keyboard layouts, which is now the preferred way of adding layouts. I am experimenting with an online automated generator (for windows layouts), if you want to try: [removed, it's broken] Or feel free to open an issue on the layout repo, or ask me on the Adafruit discord #help-with-circuitpython (no PM) - I've already seen a few people using pico-ducky ask the same question over there. |
Anyone got a solution for a Danish keyboard? |
i tryed the online generator but it did not work |
Oh yeah the page is easily defeated by browser security rules that stop it from downloading the layout file from kbdlayout.info. I completely forgot that. I could make a server-side version of the script on the page, but I have concerns with security. I should remove the link, sorry. The idea is rather to make them myself with a python script I'm working on and add them to the layout repo as people request them. But first I want to have a good enough version of the generator, so I don't have to give a pass to all of the files later, especially if they have hand-made fixes. At least not too soon. Right now, it doesn't handle dead/composite keys very well (having It would be better to ask about layouts over there: Here is the danish version. @lucas2kdk You put the files into the board's CIRCUITPY or its lib directory. from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
from adafruit_hid.keycode import Keycode to this (note the language part of the module names) from keyboard_layout_win_da import KeyboardLayout
from keycode_win_da import Keycode And this: layout = KeyboardLayoutUS(kbd) to this: layout = KeyboardLayout(kbd) |
It will be great if you could provide an italian keyboard layout for the pico ducky |
Does anyone have a Portuguese layout? |
I have pushed a branch, Kronos, as a test for German keyboard layout. |
Yeah it is possible, and I fixed the page for the javascript error: https://www.neradoc.me/layouts/ You can try it locally from that branch, though you'll need to know your way around python and shell scripts a little. Look at tests/make_validated.sh for usage. I should merge all that in the layout repository as well as a bunch of keyboard layouts that I made with it as they were requested and tested at least a bit by users. (Mostly from people using pico-ducky). Pico ducky could use a trick like this to avoid having to change the code when changing keyboard, by only renaming the layout and keycode files to keyboard_layout_ducky and keycode_ducky (not changing the extension). try:
from keyboard_layout_ducky import KeyboardLayout
except ImportError:
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS as KeyboardLayout
# Keycodes
from keycode_ducky import Keycode
except ImportError:
from adafruit_hid.keycode import Keycode And change layout = KeyboardLayout(kbd) |
Ok great!! Thanks a lot it was painful trying to map all the US character over an italian keyboard(and sometimes certain characters like { } wasn't available or rather they could not be injected). I used http://kbdlayout.info/ and https://www.neradoc.me/layouts/, it works just fine for me. |
I've updated the code in the kronos branch to offer more generic import of new keyboard layouts from Neradoc/Circuitpython_Keyboard_Layouts |
Is there an azerty layout? And how do I implement this in the code.py file? |
@Timovl > Is there an azerty layout? And how do I implement this in the code.py file? Take A Look At These 2 Pages. |
and is there any way to implement üöä for me |
@NiklasRichter2222 This Is The Correct Code.py for German Keyboard.
|
You installed the language modules inside another module (adafruit_hid), they go in the |
Thanks it worked |
Any way to do Czech keyboard..? |
|
You go to this Website and do what thay say there |
You download the .py files(the Big Button not one of the two small ones) and put all the files exept the example Code in to the lib Folder |
You replace the code in the code.py file with this one and it should work
|
@Neradoc Perhaps a PR to enhance the README to point to your layouts library would be good? |
Hey, thanks for the help! |
I've created a branch, keyboard-layouts, to help make including the Neradoc keyboard layouts easier. |
Any possibility to switch between 2 layouts using only a hardware switch, without having to rewrite the code each time? |
@MrBrambor What would the use case be? It seems like it would only bloat the code slowing down the payload execution. |
Well it would be useful for me cause for example I would want to prank my friends with rickroll but a lot (let's say 40%) of my friends use different layout so I wouldn't have to use 2 picos or have to switch code files. |
Submit a feature request issue and I'll see about adding that in the future. I've got some other features I'm working on in the short term, so might be a bit before it would get implemented. |
I think you can check the pins with if statements and import the layout depending on that. |
any way to do spanish keyboard? :( |
ES is the locale code for Spanish. |
thank u so much this helped me a lot |
I'm having a problem with italian layout setting on my raspberry pi pico. when i execute some scrit with the simbol '{' or '}' it get stucked. any suggestion to fix it? |
hi there,
i try to use it and until now i liked it a lot.
but i have an issue. i have to setup a different keyboard layout.
hope someone can help i this case.
thanks a lot
kind regards
matze
The text was updated successfully, but these errors were encountered: