Comments (28)
Just so I don't leave you all hanging- the issue is I do not have a Apple Silicon-based Mac to test with and likely won't for the foreseeable future. The best I can try to do is a build universal binary and see if it's just a Rosetta problem but I've been swamped at work. Thank you all for being patient and sorry
from nudelta.
Interestingly, running Nudelta as sudo on my M2 work machine runs fine. I can't do any straight up development on for contractual reasons but I can remap my keyboard. So sudo /Applications/nudelta.app/Contents/MacOS/nudelta
may actually work if you're brave enough to run code written by me as sudo
.
from nudelta.
Sorry, i mistyped there. There is no error in the developer tools. I also tried removing and readding the permission but for me that also does not worked.
from nudelta.
Yeah, this is weird. I did try it in Ventura and sure enough, Nudelta worked.
Sadly, this is deep in the native component, which means, well... a lot of iteration necessary. I'll have to write a couple scripts then get back to you.
from nudelta.
So it seems to be Apple Silicon related.
@donn If you can change the build scripts to support an arm64 build I can test it if you want. Maybe that can already fix that.
I will try it myself, but I am not so experienced with C++ so maybe you can do it faster.
*** UPDATE ***
I compiled it for arm64 now (not sure what I done wrong before). The error still occurs after the first write.
But it seems to be right what @TRomoser and @jklp said. The write works, but the error is displayed.
❯ file $(which nudelta)
/usr/local/bin/nudelta: Mach-O 64-bit executable arm64
❯ nudelta -M -l keymap.yml
Found NuPhy Air75 at path DevSrvsID:4294972322 (Firmware 0124)
Wrote keymap 'keymap.yml' to the keyboard.
❯ nudelta -M -l keymap.yml
Found NuPhy Air75 at path DevSrvsID:4294972322 (Firmware 0124)
[ERROR] Failed to write to keyboard: hid_error is not implemented yet
from nudelta.
@TRomoser If Nudelta messes up your keyboard, please factory reset by holding Fn + Tab + R
. Sorry about that- NuPhy keeps making minor, undocumented hardware revisions and I keep having to chase them down: see #29 for another instance of this :(
from nudelta.
Same for me, thanks @jklp for opening the issue.
I have the same Firmware
from nudelta.
So this very helpful error message is straight out of one of the dependencies:
https://github.com/libusb/hidapi/blob/88a0f029b7f18fc7b3c3858d652494428b3ebc2e/libusb/hid.c#L1637
Sadly, it's generic enough that it could mean any failure has occurred when writing. So, at this point, I can only ask you to try the same workaround as @czottmann:
- Make sure nudelta has Input Monitoring permissions: https://support.apple.com/en-eg/guide/mac-help/mchl4cedafb6/mac. If it doesn't have it, add it, if it does have it, remove it and then re-add it.
@n3rdc4ptn you mentioned this in the other thread:
I will try to debug it a little more in the next days. As I checked the developer tools in electron there seems to be now error.
Posting the error would be very helpful if you could.
from nudelta.
@donn Thanks for the fast response - I gave the suggestion above a go (even removed and re-added) and unfortunately still the same error message.
I've got some experience in Electron / JS development - if there's anything I can help with let me know!
from nudelta.
@donn Hi Donn not sure if this is useful, but I noticed sometimes when I remap a key and the error appears, it actually does perform the remap.
So maybe the error message is throwing regardless if the remapping was successful or not?
from nudelta.
Out of curiosity, are you guys on Aarch64 or Intel?
from nudelta.
I am on an M1 Pro. So aarch64.
Apple calls it arm64 when I run arch
in my command line.
from nudelta.
I'm wondering if it's Apple Silicon-specific is what's going on here.
from nudelta.
Ok, I compiled nudelta cli on my apple silicon (than it is an arm version?) and with the cli I could write my desired config to the Air75. But only for one time and then I needed to restart my mac because otherwise I always got the hid_error.
So it seems like one time loading works and then I need to restart my mac.
> nudelta -M -l keymap.yml
Found NuPhy Air75 at path DevSrvsID:XXXXXXXXXXXXX (Firmware 0124)
Wrote keymap 'keymap.yml' to the keyboard.
> nudelta -M -l keymap.yml
Found NuPhy Air75 at path DevSrvsID:XXXXXXXXXXXXX (Firmware 0124)
[ERROR] Failed to write to keyboard: hid_error is not implemented yet
I censored the DevSrvID so there is a real id.
*** UPDATE ***
The self compiled nudelta CLI is still an Intel Version. So it still can be an Apple Silicon Bug.
❯ file $(which nudelta)
/usr/local/bin/nudelta: Mach-O 64-bit executable x86_64
from nudelta.
Out of curiosity, are you guys on Aarch64 or Intel?
Ah didn't think of that - I'm on a 2021 MacBook Pro 16" with an M1 Pro chip so I guess in this case Aarch64?
I'm same as n3rdc4ptn and running arch
I get arm64
from nudelta.
Hello all. I have a nuphy air75 that I just received and I kept hitting the page up/page dwn buttons when trying to hit backspace. I used nudelta and ran into the same issue as you all. I tried a couple of times without it working, but the last time the error still appeared but it succeeded. The pg up/dwn buttons are now set to none.
Thanks Donn for the quick response.
I am on a 13-in M2 2022 MacBook Pro
from nudelta.
Hello everyone, same here... getting the same "Failed to write to config" as the screenshot above on a MacBook Air M2...
from nudelta.
No worries and correct me if I'm wrong, but I think for now there is a workaround, where users can keep trying to write the config (maybe after a reboot as well) and eventually it'll remap the key (even though the error message is shown).
Could be a good stop gap until the full solution is implemented?
(and thanks again for working on the project - it isn't always easy to find time to maintain something in your spare time!)
from nudelta.
Hey- can you try https://github.com/donn/nudelta/releases/tag/0.7.0? It fixes a different issue but it may help somehow
from nudelta.
Hi Donn thanks for looking into this! Unfortunately I tested both 0.7.0 and the latest 0.7.2 but still throws an error (with a different error message this time - see attached)
Couldn't get it to replicate changing the key mappings like last time (i.e. keep trying to write until the config is changed) but if the code is still the same I think it should still work if the user keep persisting with the writes.
Let me know if there's anything else I can do!
from nudelta.
@donn Hi Donn not sure if this is useful, but I noticed sometimes when I remap a key and the error appears, it actually does perform the remap.
So maybe the error message is throwing regardless if the remapping was successful or not?
I confirm it, I also had the same error, but the keys are remapped
from nudelta.
So this is weird. With 0.7.4
I enabled universal builds after some agony. With or without Rosetta, I get the same error message @jklp does, and no remap.
My sister lent me her laptop so I could test, but installing Xcode and debugging is a whole other beast, sadly. So turns out Rosetta isn't the issue. :\
from nudelta.
The sudo
worked for me! I opened nudelta using sudo /Applications/nudelta.app/Contents/MacOS/nudelta
and it worked on my m1 max MBP.
Nudelta release: 0.7.4
MacOS: 13.6.3 (22G436)
Chip: Apple M1 Max
Keyboard: NuPhy Air75 V1 (Firmware 0121)
Thanks!
from nudelta.
Hi, i gave nudelta 0.7.4 input monitoring permissions on Sonoma, run it via sudo, but still have permission error on write.
Maybe i am missing something?
- Nuphy Air 75 V1 (0130)
- M1 Max MBP
- Macos 14.1.1
from nudelta.
Just in case - some warnings from console after sudo execution
2024-02-29 16:26:45.211 nudelta[5561:6888438] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
objc[5563]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x2328c5958) and /Applications/nudelta.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x10a9d2978). One of the two will be used. Which one is undefined.
from nudelta.
@funkindy No clue Alexey, sorry. :( Though these warnings are "normal"- Electron just acts a bit wonky when you run as superuser.
from nudelta.
@donn thank you for quick answer! Looks like the main difference in my case is major macos version. @aimsecond may i ask, did you try to remap keys on Sonoma (Macos v14+)?
from nudelta.
Hi, I'm on Sonoma 14.2.1 with an M1 MacBook Pro 16" (2021) and managed to get it working.
Need to run it using sudo as recommended by @donn (#37 (comment)) though I still get the error (I just hit "ok" and it goes through).
One thing I noticed is it no longer reads the keyboard config - though is fine as I only remap a few keys which takes a few seconds.
Currently using a Nuphy Air75 (0124) too
from nudelta.
Related Issues (20)
- Halo 65 HOT 1
- Some keys can't be redefined
- HID error writing to keyboard "Invalid function" HOT 1
- Special character HOT 1
- [Support] Field75 HOT 7
- Unsupported Keyboard Error for air96 HOT 1
- How to add support for Air60 HOT 1
- Resetting config via GUI HOT 1
- [Apple Silicon] Keyboard unusable after failed remap HOT 24
- F5 & F6 Keys Default Mapping on Mac layout HOT 2
- Logging USB Feature Reports HOT 1
- Semicolon and Quote are backwards HOT 1
- FN-layer remapping is (somewhat) possible using "02 00 00 ??" mappings HOT 5
- Error: could not find CMAKE_PROJECT_NAME in Cache HOT 2
- Failed to write configuration after grant Input Monitoring permissions in System Preferences HOT 1
- add print screen as an option
- can not remap screenshot key as shift + command + any other key HOT 2
- Halo65 not supported HOT 1
- Verifiable signing for MacOS HOT 2
- Additional check to prevent breaking keyboards HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nudelta.