hanks / HHKBAssistant_for_mac

A funny helper tool for HHKB professional keyboard on mac. Its main job is that it can auto detect the HHKB professional keyboard plugged in and out, and do some actions you want.
MIT License
197 stars 17 forks source link

I want to use this for POKER #3

Closed hging closed 9 years ago

hging commented 9 years ago

I add this

 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<string>Poker Pro S</string>
</plist>

and I build a new version for this app but i can't use it

hanks commented 9 years ago
  1. use command system_profiler SPUSBDataType to check the formal name for your POKER keyboard when it is plugged in.
  2. use command kextstat | grep Keyboard to check your keyboard driver loaded in the mac. Now there is a bug caused by the driver, you can check issue 2

Hope this can help you.

hging commented 9 years ago
       Poker Pro S:

          Product ID: 0x0611
          Vendor ID: 0x0f39
          Version: 1.00
          Speed: Up to 12 Mb/sec
          Manufacturer: Heng Yu Technology
          Location ID: 0x14100000 / 8
          Current Available (mA): 500
          Current Required (mA): 500

when i plugged in my keyboard i can get a notify from your app, but the build-in keyboard was still enable

when i plugged in my keyboard the logs is

Mar  2 14:38:08 HgingdeMBP HHKBAssistant[985]: Sending request: disable build-in keyboard
Mar  2 14:38:08 HgingdeMBP HHKBAssistant[985]: Received response: (null).
Mar  2 14:38:08 HgingdeMBP HHKBAssistant[985]: XPC connection invalid, releasing.
Mar  2 14:38:08 HgingdeMBP HHKBAssistant[985]: device is plugged in
Mar  2 14:38:08 HgingdeMBP HHKBAssistant[985]: privateDataRef->deviceName: Poker Pro S
Mar  2 14:38:08 HgingdeMBP HHKBAssistant[985]: privateDataRef->locationID: 336592896.
hanks commented 9 years ago

what is the result from command kextstat | grep Keyboard?

hging commented 9 years ago
$ kextstat | grep Keyboard
   67    0 0xffffff7f8256f000 0x4000     0x4000     com.apple.driver.AppleUSBTCKeyboard (240.2) <66 37 32 7 6 5 4 3 1>
hanks commented 9 years ago

oh, that is impossible.
you can try command below directly, and does it work to disable your build-in keyboard?
sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext
if it works, you can enter sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext to restore keyboard.

hging commented 9 years ago

the code is useful I'm using can u update a new dmg for Poker? I'm not a developer for mac. thank u very much

hanks commented 9 years ago

Yeah, the installer is a little out-dated. I will update it later in this week.

I am also not a mac developer and I use self-signed certificate to build this app. You can try it by yourself after you create your own self-signed certificate and set it to Code Sign as follows:

  1. Build the sample in the normal way (Product > Build).
  2. Run SMJobBlessUtil.py's "setreq" command to make the necessary Info.plist changes: $ ./SMJobBlessUtil.py setreq path/to/the/build/app path/to/the/app/info.plist path/to/the/helper/tool/info.plist $ xxxxsApp-Info.plist: updated $ xxxxxHelper-Info.plist: updated
  3. Clean the sample (Product > Clean).
  4. Build the sample again.
  5. Run SMJobBlessUtil.py's "check" command to check that everything is OK. If there's a problem it prints an informative diagnostic message otherwise; if everything is OK then, as is traditional on UNIX, it prints nothing. $ ./SMJobBlessUtil.py check path/to/the/build/app
  6. Run the sample.
hging commented 9 years ago

it works! thank u very much