Author Topic: Noppoo Choc Mini on MacOS  (Read 13133 times)

0 Members and 1 Guest are viewing this topic.

Offline thefloweringash

  • Thread Starter
  • Posts: 2
Noppoo Choc Mini on MacOS
« on: Tue, 06 December 2011, 02:08:39 »
Hello,

Apologies if this has been posted before, I did find anything by searching. I purchased a Noppoo Choc Mini and couldn't resist looking at the usb interaction to see why it didn't work on MacOS. This was long enough ago that I've forgotten some of the details, hopefully the general idea remains.

The keyboard presents two keyboards, one has modifiers and letters, the other has punctuation. Like most keyboards it has an 8-byte HID report, but instead of using an array of 6 keycode entries it sends a bit vector of which keys are being pressed. This seems to be well within the HID spec. The unusual thing about it seems to be the way in which it specifies which bits correspond to which keys. HID descriptors have a method to describe a list of values or a range of values. The Noppoo does both in a single item, specifying usages of 4-40,0x4f,0x50,0x2b,0x2c,0x51,0x52. It's not clear to me if this is allowed or not, but Windows and Linux seem to handle it. On MacOS, it seems to cause an overlap. Pressing the key for usage 4 also causes 0x4f, 5 causes 0x50 and so on.

Since it looked like the HID reports are ok, but the HID descriptor is a bit wacky I wanted to replace the descriptor with one with two items, one for 4-40 and one for 0x4f,0x50, etc. With a bit of luck I discovered I was not the first person to encounter a device with an undesirable descriptor, there's a simple kext at (url removed to fit in forum limit, see the github link below) that overrides the descriptor from a plist. Adding a couple of entries for the Noppoo cleared up all the extraneous keypresses.

However, having the keyboard that contains the punctuation separate to the one that contains the modifiers is problematic on MacOS; modifier state is local to each keyboard. This has some partial solutions like (url removed to fit in forum limit). But that method of manipulating the keyboard events is bypassed during "Secure Keyboard Entry" (see, for example, the Terminal menu option). This might not matter for gaming, I haven't tested.

My changes to the kext to override the HID descriptor for the Noppoo are available from https://github.com/thefloweringash/iousbhiddriver-descriptor-override

Hope this helps

Offline fireball87

  • Posts: 43
Noppoo Choc Mini on MacOS
« Reply #1 on: Tue, 06 December 2011, 11:43:57 »
I think the fact that apple is barely a noted brand beyond cheap clones and iphones outside of the states might also be a factor.  No need to maintain/test compatibility with a computer that absolutely no one has.

Offline Gerk

  • Posts: 448
Noppoo Choc Mini on MacOS
« Reply #2 on: Tue, 06 December 2011, 11:57:21 »
Quote from: fireball87;465235
I think the fact that apple is barely a noted brand beyond cheap clones and iphones outside of the states might also be a factor.  No need to maintain/test compatibility with a computer that absolutely no one has.

Huh?  Cheap Apple clones?  Barely noted brand?  A computer no one has?

Troll much?

@thefloweringash:  Great work on the modded HID descriptor.
Rosewill RK-9000RE (reds) | Das Keyboard Model S Professional Silent (browns) | Leopold TKL (browns) | F21-7D "Mechanical Keyboard" (Blue Alps) | Filco Majestouch TKL (blues) | Goldtouch V2 x 2 | Matias Ergo Pro x 2 | Kinesis Freestyle Pro (browns) | Kinesis Freestyle Edge (reds)

Offline fireball87

  • Posts: 43
Noppoo Choc Mini on MacOS
« Reply #3 on: Tue, 06 December 2011, 12:35:37 »
I use a mac currently *shrug*.  You can't deny that it's market share is nearly completely isolated in a few locations (mostly the States, Europe, and Canada), Asia has absolutely no market share in the computer market.  In China, there are tons of apple clones, and not much for apple products.

Offline iindigo

  • Posts: 103
Noppoo Choc Mini on MacOS
« Reply #4 on: Tue, 06 December 2011, 14:25:23 »
Worldwide, about 8% of computer users use Macs. It doesn't seem like many, but in raw numbers that's 93.96 million people. Seems like a large enough market to test for and sell to, though I can understand if products are intended for a regional market rather than a global one.

Source: http://www.numberof.net/number%C2%A0of%C2%A0mac%C2%A0users/

There's certainly more of us than there are desktop Linux users. They clock in at under 1%.

Offline Gerk

  • Posts: 448
Noppoo Choc Mini on MacOS
« Reply #5 on: Tue, 06 December 2011, 14:31:41 »
Yes but I now understand what fireball 87 is saying ... it's all about the market they are produced for I guess, and if there's no Apple users to cater to no one will bother to build them for that ... also with most of the mechanicals I have used almost none of them are specifically tested and supported for OSX, but most of them "just work" because they use a standard approach for the controllers ... but the Noppoo Choc Mini does not.  I think there's another that has similar issues (PLU?) ... they both present as multiple board controllers to OSX so maybe this updated HID descriptor will work for that one as well (assuming they use similar keycodes).

I don't necessarily agree with the "isolated" pockets of users for Apple machines though, I know a lot of people outside the areas listed that are Mac users as well, but I don't know anything first hand about the asian markets.
Rosewill RK-9000RE (reds) | Das Keyboard Model S Professional Silent (browns) | Leopold TKL (browns) | F21-7D "Mechanical Keyboard" (Blue Alps) | Filco Majestouch TKL (blues) | Goldtouch V2 x 2 | Matias Ergo Pro x 2 | Kinesis Freestyle Pro (browns) | Kinesis Freestyle Edge (reds)

Offline fireball87

  • Posts: 43
Noppoo Choc Mini on MacOS
« Reply #6 on: Tue, 06 December 2011, 21:20:40 »
OSX market share (of PCs), based on web hits.  In percentages of hits.  A decent descriptor of market share, about as good as you'll get.
http://www.webdeveloper.net.au/web-usage/operating-system/apple-mac-osx/
And iphone market share (of web enabled phones, which would mostly be smartphones), based on web hits
http://www.webdeveloper.net.au/web-usage/mobile-os/apple-mobile-share/
And just for fun...
http://www.webdeveloper.net.au/images/world-map.php?type=desktoplinux

Point being that products designed for an asian market, will have far less incentive to design and test for OSX then products that are designed for other more, OSX friendly markets.

As for people testing for Linux, a very few companies consider Linux compatibility, mostly companies who market server related products, or companies that are highly vested in the "hardcore nerd" market.  Most Linux compatibility is user generated, new toy doesn't work, someone who wants it makes it work.

Though I really do hope you're successful with the compatibility of the choc-mini.  It has my favorite of the small frame layouts just from looking at it, and nkey over usb is desirable.  If you got it working It'd be one of the keyboards I'd consider if it became available at the right time.  Plus as there will likely be more boards utilizing the same technique in the future, it will be good to have a fix for boards that share the same flaw.

Offline pitashen

  • Posts: 1200
Noppoo Choc Mini on MacOS
« Reply #7 on: Tue, 06 December 2011, 22:52:46 »
Quote from: fireball87;465274
I use a mac currently *shrug*.  You can't deny that it's market share is nearly completely isolated in a few locations (mostly the States, Europe, and Canada), Asia has absolutely no market share in the computer market.  In China, there are tons of apple clones, and not much for apple products.


whatever point you may come up with to explain the situation is not going stop ripster from poking fun at this whole "chinese clones" thingy.

How do I know? I have tried.  

U'll get used to it lol.
\\\\ DSI Mac Modular Keyboard (Brown) w/ Leo  Blank Keycaps //
\\\\ Leopold 87keys Keyboard (Brown) w/ Black CherryCorp + SP DoubleShots //
\\\\ Filco Majestouch 2 NINJA (Black) w/ White CherryCorp + SP DoublsShots //

Offline cjay

  • Posts: 2
Noppoo Choc Mini on MacOS
« Reply #8 on: Tue, 06 December 2011, 23:13:48 »
Modifier state seems to be global for me. Probably this is caused by KeyRemap4MacBook.

Offline fireball87

  • Posts: 43
Noppoo Choc Mini on MacOS
« Reply #9 on: Tue, 06 December 2011, 23:32:16 »
*Sigh* Fine, I'll ignore the fact that you're fairly blatantly trolling, just because you're trolling semi-effectively enough that you're apt to convince other people.  I generally just have been trying to ignore you, but why not bite.

A few points about that makes this article fairly irrelevant.
  • 1 This article includes IPhones, which are the most popular smart phones in China, as with a very large chunk of the world.  China buys up a whole heck of a lot of IPhones.  And guess what, desktop/laptop computers aren't a majority of Apples business either.  
  • 2 China has a bit larger of a computer market then the US currently, so you have a larger market taking a smaller share.  
  • 3 This article refers to very recent events, which wouldn't likely effect already designed products.  
  • 4 Even if there was a computer growth boom in sales, which your article says absolutely nothing about, it would still take quite some time for the market to change.  It's not like every computer is a new computer.


--edit-- I can confirm that modifier state is global for me as well, also with KeyRemap4MacBook --/edit--

Offline hasu

  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Noppoo Choc Mini on MacOS
« Reply #10 on: Wed, 07 December 2011, 01:02:32 »
thefloweringash, nice fix.

I took some time to understood what your fix does. I needed to decode your info.plist with base64/od command, and finally do parsing by hand :)
Your fix is reasonable and it must help owners of the noppoo keyboard on Mac.(Though I have no noppo and Mac.)

But I still cannot understand why noppoo used this complicated report descriptor. I used very simple and stupid descriptor for NKRO on my keyboard and it seems to have no problem even on Mac.
https://github.com/tmk/tmk_keyboard/blob/master/pjrc/usb.c#L172


BTW, URL snip by the system is very annoying! :(

Offline fireball87

  • Posts: 43
Noppoo Choc Mini on MacOS
« Reply #11 on: Wed, 07 December 2011, 01:13:34 »
I was amused.

Offline hasu

  • Posts: 3472
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Noppoo Choc Mini on MacOS
« Reply #12 on: Wed, 07 December 2011, 01:31:58 »
I don't know yotsuba at all. But I love osaka much...
[ Attachment Invalid Or Does Not Exist ] 34178[/ATTACH]
Ok. Let's talk about keyboard, huh?
« Last Edit: Wed, 07 December 2011, 01:39:03 by hasu »

Offline fireball87

  • Posts: 43
Noppoo Choc Mini on MacOS
« Reply #13 on: Wed, 07 December 2011, 01:38:40 »
Do companies often claim their incompatibilities?  I'm afraid I missed those Toshiba laptop stickers that said "we purposefully changed our device codes to make it so you have to hack currently available drivers, making linux installations and windows xp installs a pain".

Offline dorkvader

  • Posts: 6288
  • Location: Boston area
  • all about the "hack" in "geekhack"
Noppoo Choc Mini on MacOS
« Reply #14 on: Wed, 07 December 2011, 01:38:48 »
Quote from: ripster;465600
Am I the only one that wonders why they don't mention not being compatible with OSX on their product page???

Probably because most of us don't have to wonder: we know.

Firstly: there's the testing/market perspective: There is a good chance they simply are not targeting mac users, or (for other reasons) didn't test it on the hardware. This is understandable.

Secondly: Even if they did test on mac hardware, perhaps they didn't want to fix any issues by redesigning the firmware, or thought their solution was a good trade-off, and (again) don't really worry about apple hardware.

Thirdly: If they didn't research into apple hardware, they wouldn't have listed it. If they did, and there are issues, they won't list it anyway because listing lots of features and benefits is much better from a business or marketing perspective than putting up all the limitations.

I think iTunes should support .FLAC. I'm not alone in this. I don't see "Will not support .Flac" anywhere on Apple's marketing pages. I can only assume this is for a similar reason (actually, I suspect they don't include it, bust so they can try their "vendor lock-in" practises by attempting to corner the codec market)

Oftentimes, I feel that Ripster should think things through before posting, but, sadly, that seems unlikely :(

Offline thefloweringash

  • Thread Starter
  • Posts: 2
Modifier state
« Reply #15 on: Wed, 07 December 2011, 03:27:11 »
I installed KeyRemap4MacBook and now my modifier state is also global. This fully resolves all the issues I've had with this keyboard on MacOS. Thanks :)

hasu, oops, I didn't mean to make it difficult to see the changes. Here are my un-encoded versions: https://gist.github.com/1442127 (I borrowed LUFA's HIDReportData.h).

Offline fireball87

  • Posts: 43
Noppoo Choc Mini on MacOS
« Reply #16 on: Wed, 07 December 2011, 21:32:26 »
Quote from: ripster
Dorkvader and Fireball think the Chinese shouldn't worry about Nopoo/Ducky G2 OSX incompatibilities. Let them eat Linux. And Window clone copies.
Changed my mind, no need to respond to this.  You should keep your trolling contained to a single topic though.  

I will say this though, I am highly vested in products working on OSX, therefore I won't likely buy said product.  I am not their target audience though.
« Last Edit: Wed, 07 December 2011, 21:34:58 by fireball87 »

Offline Findecanor

  • Posts: 5036
  • Location: Koriko
Re: Noppoo Choc Mini on MacOS
« Reply #17 on: Tue, 10 March 2015, 03:51:23 »
Hello. Necroposting, but I have a purpose.
In another thread it was revealed that Noppoo Choc Mini uses only low-speed USB. Over low-speed USB, a keyboard report can not be longer than 8 bytes.

So to be able to express more than 64 keys (8 bits × 8 bytes, one bit per key) that is why the keyboard has to split the space into two 8-byte reports. It should not have to split it into two interfaces (virtual keyboards), however.. but it does.
« Last Edit: Tue, 06 December 2016, 16:05:30 by Findecanor »