GithubHelp home page GithubHelp logo

Comments (28)

donn avatar donn commented on September 21, 2024 3

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.

donn avatar donn commented on September 21, 2024 3

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.

n3rdc4ptn avatar n3rdc4ptn commented on September 21, 2024 1

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.

donn avatar donn commented on September 21, 2024 1

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.

n3rdc4ptn avatar n3rdc4ptn commented on September 21, 2024 1

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.

donn avatar donn commented on September 21, 2024 1

@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.

n3rdc4ptn avatar n3rdc4ptn commented on September 21, 2024

Same for me, thanks @jklp for opening the issue.
I have the same Firmware

from nudelta.

donn avatar donn commented on September 21, 2024

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:


@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.

jklp avatar jklp commented on September 21, 2024

@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.

jklp avatar jklp commented on September 21, 2024

@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.

donn avatar donn commented on September 21, 2024

Out of curiosity, are you guys on Aarch64 or Intel?

from nudelta.

n3rdc4ptn avatar n3rdc4ptn commented on September 21, 2024

I am on an M1 Pro. So aarch64.
Apple calls it arm64 when I run arch in my command line.

from nudelta.

donn avatar donn commented on September 21, 2024

I'm wondering if it's Apple Silicon-specific is what's going on here.

from nudelta.

n3rdc4ptn avatar n3rdc4ptn commented on September 21, 2024

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.

jklp avatar jklp commented on September 21, 2024

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.

TRomoser avatar TRomoser commented on September 21, 2024

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.

edessure avatar edessure commented on September 21, 2024

Hello everyone, same here... getting the same "Failed to write to config" as the screenshot above on a MacBook Air M2...

from nudelta.

jklp avatar jklp commented on September 21, 2024

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.

donn avatar donn commented on September 21, 2024

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.

jklp avatar jklp commented on September 21, 2024

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!

Screenshot 2023-04-24 at 7 53 47 am 2

from nudelta.

Wockeez avatar Wockeez commented on September 21, 2024

@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.

donn avatar donn commented on September 21, 2024

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.

aimsecond avatar aimsecond commented on September 21, 2024

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.

funkindy avatar funkindy commented on September 21, 2024

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.

funkindy avatar funkindy commented on September 21, 2024

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.

donn avatar donn commented on September 21, 2024

@funkindy No clue Alexey, sorry. :( Though these warnings are "normal"- Electron just acts a bit wonky when you run as superuser.

from nudelta.

funkindy avatar funkindy commented on September 21, 2024

@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.

jklp avatar jklp commented on September 21, 2024

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)

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.