Author Topic: [TMK] Alternative Controller for HHKB  (Read 515858 times)

0 Members and 1 Guest are viewing this topic.

Offline Atredl

  • Posts: 805
  • Location: SoCal
Re: Alternative Controller for HHKB
« Reply #500 on: Sat, 14 January 2017, 23:44:06 »
I think so, but it depends on what you want with the function.
Firmware supports 'dual role key' that allows you to assign two different actions on a key in general.

Sent from my Nexus 5X

My idea was to have it act as a left hand accessible function button since the hhkb doesn't have an extra bottom below the left shift key. My goal would be for it to simply mirror what the right function key does. Is that doable?

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #501 on: Sun, 15 January 2017, 21:58:11 »
I think so, but it depends on what you want with the function.
Firmware supports 'dual role key' that allows you to assign two different actions on a key in general.

Sent from my Nexus 5X

My idea was to have it act as a left hand accessible function button since the hhkb doesn't have an extra bottom below the left shift key. My goal would be for it to simply mirror what the right function key does. Is that doable?

Yes, it is possible. You can use this 'spacefn' mapping as starting point.
https://goo.gl/zHcyu0

Offline kentt

  • Posts: 5
Re: Alternative Controller for HHKB
« Reply #502 on: Mon, 30 January 2017, 14:43:16 »
I was thinking of trading up from my hhkb pro 2 to the khkb pro BT jp.  Is there a custom controller for that. I have one for my pro 2.
« Last Edit: Tue, 31 January 2017, 18:16:28 by kentt »

Offline dr-slump

  • Posts: 56
Re: Alternative Controller for HHKB
« Reply #503 on: Wed, 01 February 2017, 14:38:16 »
I was thinking of trading up from my hhkb pro 2 to the khkb pro BT jp.  Is there a custom controller for that. I have one for my pro 2.

I'm on the fence for a Pro JP model too & would like to add a Hasu controller if that's even possible
Waiting for GMK Miami Dolch ISO . . .

Looking for: Titainium Spacebar 6.25

      

Offline osxoep

  • Posts: 212
Re: Alternative Controller for HHKB
« Reply #504 on: Wed, 01 February 2017, 17:32:52 »
I was thinking of trading up from my hhkb pro 2 to the khkb pro BT jp.  Is there a custom controller for that. I have one for my pro 2.

I'm on the fence for a Pro JP model too & would like to add a Hasu controller if that's even possible

hasu controller + pro jp works

not sure if there's a bluetooth version yet
HHKB Pro JP with hasu's controller (waiting for MX sliders)

Offline dr-slump

  • Posts: 56
Re: Alternative Controller for HHKB
« Reply #505 on: Thu, 02 February 2017, 06:14:33 »
I was thinking of trading up from my hhkb pro 2 to the khkb pro BT jp.  Is there a custom controller for that. I have one for my pro 2.

I'm on the fence for a Pro JP model too & would like to add a Hasu controller if that's even possible

hasu controller + pro jp works

not sure if there's a bluetooth version yet



Thanks for the info !  Now I only have to source some Novatouch stems  :eek:
Waiting for GMK Miami Dolch ISO . . .

Looking for: Titainium Spacebar 6.25

      

Offline mmdango

  • Posts: 49
  • Location: California, US
Re: Alternative Controller for HHKB
« Reply #506 on: Thu, 09 February 2017, 13:42:50 »
Hi guys!

Quote
System control is not supported
        It can't send Power, Wake and Sleep keys.
Not sure if this above quote is relevant, but...

I currently have the DIP switch 6 on for my HHKB which allows me to wake up my mac using the HHKB. Will the BT controller affect that functionality? If it's relevant, I am on Sierra OSx 10.12.2.

Offline Tactile

  • Posts: 1432
  • Location: Portland, OR
Re: Alternative Controller for HHKB
« Reply #507 on: Fri, 10 February 2017, 21:49:20 »
I've had someone ask where I got the USB plugs for the empty holes left in the rear of my HHKB after installing Hasu's controller (which doth rock, BTW. Thanks, Hasu!).

I just did a search on Ebay for "USB port (cover,plug)" and found these:
160126-0

They are a little undersize because they are designed for hardware inside the holes, not just an empty hole. I just wrapped some Kapton tape around the body to add a little dimension and they're now a nice press fit. I used Kapton tape because it's very thin, allowing very fine "adjustment" by layering, and also because it has an adhesive which won't weep out over time.

...and it looks like this:
160128-1
REΛLFORCE

Offline robotmaxtron

  • Posts: 107
  • Location: Austin,TX
Re: Alternative Controller for HHKB
« Reply #508 on: Mon, 13 February 2017, 10:08:45 »
I've had someone ask where I got the USB plugs for the empty holes left in the rear of my HHKB after installing Hasu's controller (which doth rock, BTW. Thanks, Hasu!).

I just did a search on Ebay for "USB port (cover,plug)" and found these:
(Attachment Link)

They are a little undersize because they are designed for hardware inside the holes, not just an empty hole. I just wrapped some Kapton tape around the body to add a little dimension and they're now a nice press fit. I used Kapton tape because it's very thin, allowing very fine "adjustment" by layering, and also because it has an adhesive which won't weep out over time.

...and it looks like this:
(Attachment Link)

Just as another point of reference, I opt'd for a slightly more custom approach. Using a design previously uploaded in this thread, saved in github https://github.com/robotmaxtron/HHKB-usb-dust-covers I got some printed for about $10 I think at Shapeways.


Offline DRAZAH

  • Posts: 46
  • Hype-S
Re: Alternative Controller for HHKB
« Reply #509 on: Thu, 23 February 2017, 10:26:15 »
Anyway to get a USB port on the Hasu controller like the stock HHKB? I know they aren't much power but I use mine for my G900 wireless receiver dongle, I was about to get a HASU controller but was unaware that I would lose the 2 USB ports, I don't need both but would need 1 because its somewhat of a game change for me.

Offline alh84001

  • Posts: 276
  • Location: EU-HR-ZG
Re: Alternative Controller for HHKB
« Reply #510 on: Fri, 03 March 2017, 17:41:41 »
Time for a couple of stupid questions:
1) if sticking to USB, I could also use tmk usb->usb converter, with a difference of being limited to 6KRO. Any other notable differences?
2) is Pro BT keyboard fully unsupported in a sense that there are electrical/connection differences, or is it unsupported in a sense that built-in BT won't work, and current controller board can't be physically installed into the case? In other words, if you take out the PCB, connect it to the controller, would it work? (lack of (proper) programmability is such a bummer with that board)

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #511 on: Fri, 03 March 2017, 18:42:51 »
Time for a couple of stupid questions:
1) if sticking to USB, I could also use tmk usb->usb converter, with a difference of being limited to 6KRO. Any other notable differences?
2) is Pro BT keyboard fully unsupported in a sense that there are electrical/connection differences, or is it unsupported in a sense that built-in BT won't work, and current controller board can't be physically installed into the case? In other words, if you take out the PCB, connect it to the controller, would it work? (lack of (proper) programmability is such a bummer with that board)

1) And you cannot remap 'Fn' key with USB-USB converter.
2) ProBT is completely diffferent keyboard physically and electrically.

Offline alh84001

  • Posts: 276
  • Location: EU-HR-ZG
Re: Alternative Controller for HHKB
« Reply #512 on: Fri, 03 March 2017, 19:04:52 »
1) You mean you can't move Fn to another key, or you can't map anything else to Fn key? You can still use it, right?
2) Even the PCB? Interesting.

Thanks!

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #513 on: Fri, 03 March 2017, 19:15:06 »
1) You mean you can't move Fn to another key, or you can't map anything else to Fn key? You can still use it, right?
2) Even the PCB? Interesting.

Thanks!

1) the latter. You can define layer change action on any key except for key with legend 'Fn'.
2) Some pics of Pro BT.
https://imgur.com/a/YfcYt

Offline devoi

  • Posts: 39
  • Location: MA
Re: Alternative Controller for HHKB
« Reply #514 on: Tue, 07 March 2017, 19:31:17 »
Would increasing the matrix refresh rate be a possibility? I'd assume it depends on how the capacitor charges over time and whether or not the controller itself is the thing that dictates it, so I'm not entirely sure.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #515 on: Tue, 07 March 2017, 21:18:28 »
Would increasing the matrix refresh rate be a possibility? I'd assume it depends on how the capacitor charges over time and whether or not the controller itself is the thing that dictates it, so I'm not entirely sure.

Interesting subject.
First, my Alt controller emulates scan method/timing of original Topre controller so both takes almost same time to scan matrix. And Pro2(and Pro1) scans 8x8 matrix for 15ms while JP scans 16x8 for 15ms, you will know that JP scans twice faster actually there. Pro2 and JP uses same sensing chip TP1684, Pro2 will be able to scan at same rate as JP, namely for 7.5ms.

You can see all of scanning code in this one file. Difference is just following lines, you can use 30us instead of 75us for Pro2 and push it on more.
The delay time is needed to wait until settling signal of switch capacitance before sensing next switch.
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hhkb/matrix.c
Code: [Select]
#ifdef HHKB_JP
            // Looks like JP needs faster scan due to its twice larger matrix
            // or it can drop keys in fast key typing
            _delay_us(30);
#else
            _delay_us(75);
#endif

This is logic analyzer chart when scanning of FC660C which has 16x8 matrix and essentially same as JP. From this pic it takes around 110us to check a switch.


And this is actual waveform from switch sensor, it seems to take 10us to settle signal after sensing. Cyan line is identical to LVC138A_~EN(A0) in pic above and yellow indicates voltage of signal sensed by TP1684.


And some pics can be found here.
https://imgur.com/a/jat2a

Offline devoi

  • Posts: 39
  • Location: MA
Re: Alternative Controller for HHKB
« Reply #516 on: Fri, 10 March 2017, 18:34:02 »
After looking at a few reviews of the official BT model, are there any limitations (in the keyboard itself, less the controller) keeping away the possibility of a new revision that has a better handling of battery power? I believe LeandreN's review claimed about 3 months off of two AA batteries.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #517 on: Fri, 10 March 2017, 18:38:57 »
Yeah its great. Long battery life. Get it. No woe.

Btw did you try tweaking scan code? I'm curious what you find.

Sent from my Nexus 5X


Offline devoi

  • Posts: 39
  • Location: MA
Re: Alternative Controller for HHKB
« Reply #518 on: Fri, 10 March 2017, 21:23:27 »
As far as I can tell, changing the scan rate was a decent success. I haven't had any issues since I changed the 75us delay down to the 30us that the JP uses.

Is there currently an idea of an updated controller using a more modern version of bluetooth, and would that come with higher power efficiency? I get about 2-3 days of use off of one charge (using a 2000mah battery), which isn't too bad, but doesn't compare too well to the months of charge that the PFU BT model gets with just two AA batteries.

Offline Daphen

  • Posts: 12
Re: Alternative Controller for HHKB
« Reply #519 on: Sat, 11 March 2017, 17:32:39 »
Hey, I just got a USB alt controller and have installed it, the keyboard doesn't close 100%, is that normal? (It's basically fine and I can live with it, it's just cracking when pushing on the back plate.)

The real question I came here to ask is how do I set up a program that actually flashes the hex files onto the keyboard?
Am I stupid? I can't seem to find anything other than some posts about "FLIP" which only seems to be available on Windows.
The only programmable keyboard I've had was the White Fox and the instructions for that was so straight forward that I managed without a hassle.
I'm a web developer and am comfortable with the command line but all the directions I've found are vague and I don't understand them, so if there's a clear guide for the USB version of the controller for Mac, it would be great if someone could give me a link or something.

Sorry if this is super noobish, I just didn't know where to turn.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #520 on: Sat, 11 March 2017, 18:17:40 »
Hey, I just got a USB alt controller and have installed it, the keyboard doesn't close 100%, is that normal? (It's basically fine and I can live with it, it's just cracking when pushing on the back plate.)

The real question I came here to ask is how do I set up a program that actually flashes the hex files onto the keyboard?
Am I stupid? I can't seem to find anything other than some posts about "FLIP" which only seems to be available on Windows.
The only programmable keyboard I've had was the White Fox and the instructions for that was so straight forward that I managed without a hassle.
I'm a web developer and am comfortable with the command line but all the directions I've found are vague and I don't understand them, so if there's a clear guide for the USB version of the controller for Mac, it would be great if someone could give me a link or something.

Sorry if this is super noobish, I just didn't know where to turn.

Which model is your hhkb? In case of Pro2 or JP you have to put ferrite core on cables right place to close tidily. In any case it should close.

Check MANUAL section in first post of this thread and wiki for flashing TMK HHKB Alt controller.
https://geekhack.org/index.php?topic=71517.0
https://github.com/tmk/tmk_keyboard/wiki#flash-firmware

Offline Daphen

  • Posts: 12
Re: Alternative Controller for HHKB
« Reply #521 on: Sat, 11 March 2017, 18:34:27 »
Hey, I just got a USB alt controller and have installed it, the keyboard doesn't close 100%, is that normal? (It's basically fine and I can live with it, it's just cracking when pushing on the back plate.)

The real question I came here to ask is how do I set up a program that actually flashes the hex files onto the keyboard?
Am I stupid? I can't seem to find anything other than some posts about "FLIP" which only seems to be available on Windows.
The only programmable keyboard I've had was the White Fox and the instructions for that was so straight forward that I managed without a hassle.
I'm a web developer and am comfortable with the command line but all the directions I've found are vague and I don't understand them, so if there's a clear guide for the USB version of the controller for Mac, it would be great if someone could give me a link or something.

Sorry if this is super noobish, I just didn't know where to turn.

Which model is your hhkb? In case of Pro2 or JP you have to put ferrite core on cables right place to close tidily. In any case it should close.

Check MANUAL section in first post of this thread and wiki for flashing TMK HHKB Alt controller.
https://geekhack.org/index.php?topic=71517.0
https://github.com/tmk/tmk_keyboard/wiki#flash-firmware

I have the Pro 2 Type-S. I'll have to dive deeper tomorrow.. Thanks.

Offline Daphen

  • Posts: 12
Re: Alternative Controller for HHKB
« Reply #522 on: Sun, 12 March 2017, 06:13:03 »
Hey, I just got a USB alt controller and have installed it, the keyboard doesn't close 100%, is that normal? (It's basically fine and I can live with it, it's just cracking when pushing on the back plate.)

The real question I came here to ask is how do I set up a program that actually flashes the hex files onto the keyboard?
Am I stupid? I can't seem to find anything other than some posts about "FLIP" which only seems to be available on Windows.
The only programmable keyboard I've had was the White Fox and the instructions for that was so straight forward that I managed without a hassle.
I'm a web developer and am comfortable with the command line but all the directions I've found are vague and I don't understand them, so if there's a clear guide for the USB version of the controller for Mac, it would be great if someone could give me a link or something.

Sorry if this is super noobish, I just didn't know where to turn.

Which model is your hhkb? In case of Pro2 or JP you have to put ferrite core on cables right place to close tidily. In any case it should close.

Check MANUAL section in first post of this thread and wiki for flashing TMK HHKB Alt controller.
https://geekhack.org/index.php?topic=71517.0
https://github.com/tmk/tmk_keyboard/wiki#flash-firmware

So I actually just have to install dfu with homebrew (done already) and then run these commands:
dfu-programmer atmega32u4 erase --force
dfu-programmer atmega32u4 flash <layout I made with the TMK layout editor.hex>
dfu-programmer atmega32u4 reset

In my terminal with the keyboard connected, followed by pressing the red button, am I missing something?
Do I have to place the hexfile in a specific folder? Do I have to stand in the same folder that my hexfile is placed in?
I don't even have to stand in some specific folder or download some HHKB specific files from TMK's Github?

Also, is it normal that my alt controller board is green? All the pictures I've seen of it show the card being blue.
« Last Edit: Sun, 12 March 2017, 16:48:50 by Daphen »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #523 on: Mon, 13 March 2017, 19:14:29 »
Hey, I just got a USB alt controller and have installed it, the keyboard doesn't close 100%, is that normal? (It's basically fine and I can live with it, it's just cracking when pushing on the back plate.)

The real question I came here to ask is how do I set up a program that actually flashes the hex files onto the keyboard?
Am I stupid? I can't seem to find anything other than some posts about "FLIP" which only seems to be available on Windows.
The only programmable keyboard I've had was the White Fox and the instructions for that was so straight forward that I managed without a hassle.
I'm a web developer and am comfortable with the command line but all the directions I've found are vague and I don't understand them, so if there's a clear guide for the USB version of the controller for Mac, it would be great if someone could give me a link or something.

Sorry if this is super noobish, I just didn't know where to turn.

Which model is your hhkb? In case of Pro2 or JP you have to put ferrite core on cables right place to close tidily. In any case it should close.

Check MANUAL section in first post of this thread and wiki for flashing TMK HHKB Alt controller.
https://geekhack.org/index.php?topic=71517.0
https://github.com/tmk/tmk_keyboard/wiki#flash-firmware

So I actually just have to install dfu with homebrew (done already) and then run these commands:
dfu-programmer atmega32u4 erase --force
dfu-programmer atmega32u4 flash <layout I made with the TMK layout editor.hex>
dfu-programmer atmega32u4 reset

In my terminal with the keyboard connected, followed by pressing the red button, am I missing something?
Do I have to place the hexfile in a specific folder? Do I have to stand in the same folder that my hexfile is placed in?
I don't even have to stand in some specific folder or download some HHKB specific files from TMK's Github?

Also, is it normal that my alt controller board is green? All the pictures I've seen of it show the card being blue.

Note that you have to press red button on your controller to enter flash(DFU bootloader) mode before running dfu-programmer commands. Of course, you have to give proper path of hex file on the command as other command line tools require. And you may need to add 'sudo' to the commands as the document says.

Yes, new revision of TMK Alt controller pcb is green, but it may be changed in future.

Offline Daphen

  • Posts: 12
Re: Alternative Controller for HHKB
« Reply #524 on: Mon, 13 March 2017, 19:19:43 »
Hey, I just got a USB alt controller and have installed it, the keyboard doesn't close 100%, is that normal? (It's basically fine and I can live with it, it's just cracking when pushing on the back plate.)

The real question I came here to ask is how do I set up a program that actually flashes the hex files onto the keyboard?
Am I stupid? I can't seem to find anything other than some posts about "FLIP" which only seems to be available on Windows.
The only programmable keyboard I've had was the White Fox and the instructions for that was so straight forward that I managed without a hassle.
I'm a web developer and am comfortable with the command line but all the directions I've found are vague and I don't understand them, so if there's a clear guide for the USB version of the controller for Mac, it would be great if someone could give me a link or something.

Sorry if this is super noobish, I just didn't know where to turn.

Which model is your hhkb? In case of Pro2 or JP you have to put ferrite core on cables right place to close tidily. In any case it should close.

Check MANUAL section in first post of this thread and wiki for flashing TMK HHKB Alt controller.
https://geekhack.org/index.php?topic=71517.0
https://github.com/tmk/tmk_keyboard/wiki#flash-firmware

So I actually just have to install dfu with homebrew (done already) and then run these commands:
dfu-programmer atmega32u4 erase --force
dfu-programmer atmega32u4 flash <layout I made with the TMK layout editor.hex>
dfu-programmer atmega32u4 reset

In my terminal with the keyboard connected, followed by pressing the red button, am I missing something?
Do I have to place the hexfile in a specific folder? Do I have to stand in the same folder that my hexfile is placed in?
I don't even have to stand in some specific folder or download some HHKB specific files from TMK's Github?

Also, is it normal that my alt controller board is green? All the pictures I've seen of it show the card being blue.

Note that you have to press red button on your controller to enter flash(DFU bootloader) mode before running dfu-programmer commands. Of course, you have to give proper path of hex file on the command as other command line tools require. And you may need to add 'sudo' to the commands as the document says.

Yes, new revision of TMK Alt controller pcb is green, but it may be changed in future.

Awesome. So press button, run commands, point at correct hex file path, done?

Offline krutmob

  • Posts: 13
  • Location: ATX
Re: Alternative Controller for HHKB
« Reply #525 on: Mon, 27 March 2017, 15:45:25 »
Can the Hasu be flashed over bluetooth, or do I need it to be connected via USB to program it?

Also, when using Git Bash I can't get "sudo" or "make" commands to run. What am I doing wrong?
« Last Edit: Mon, 27 March 2017, 16:10:18 by krutmob »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #526 on: Mon, 27 March 2017, 16:31:59 »
You need USB to flash firmware.
I don't know what git bash is actually but sudo should be available on Mac and Linux.

Sent from my Nexus 5X


Offline krutmob

  • Posts: 13
  • Location: ATX
Re: Alternative Controller for HHKB
« Reply #527 on: Mon, 27 March 2017, 16:46:45 »
I abandoned using Git Bash. The instructions on the GitHub repo are ridiculous if you're not a programmer. I saw this post on Reddit (https://www.reddit.com/r/MechanicalKeyboards/comments/4d03zp/review_setting_up_a_hasu_controller_on_my_hhkb/), and loaded up a .hex with FLIP.

The board still does not communicate with the computer via bluetooth correctly. The computer recognizes the bluetooth and it is connected, but it doesn't work as a keyboard. No keystrokes are recognized. What do I need to do?
« Last Edit: Mon, 27 March 2017, 16:55:37 by krutmob »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #528 on: Mon, 27 March 2017, 16:56:24 »
What did you do to get firmware in fact?
Are you trying to compile from source? I  need to know what command and options did you use exactly.

I'm guessing you are using wrong firmware.

Are you on which os? Mac or Linux?

Sent from my Nexus 5X


Offline krutmob

  • Posts: 13
  • Location: ATX
Re: Alternative Controller for HHKB
« Reply #529 on: Mon, 27 March 2017, 17:08:38 »
I made the firmware here: http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?hhkb_rn42

I am on Windows 10.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #530 on: Mon, 27 March 2017, 17:19:27 »
Ok.
Assuming you are using TMK Bluetooth controller it should work.

this instruction on Wiki on GitHub doesn't work for you?
https://github.com/tmk/tmk_keyboard/wiki#atmel-flip-for-windows

I can't come up with what wrong with you.

Sent from my Nexus 5X


Offline m3ll3n

  • Posts: 25
Re: Alternative Controller for HHKB
« Reply #531 on: Mon, 27 March 2017, 17:37:42 »
thinking about getting one of these, nice work hasu  :thumb:

Offline krutmob

  • Posts: 13
  • Location: ATX
Re: Alternative Controller for HHKB
« Reply #532 on: Mon, 27 March 2017, 17:44:01 »
EDIT: I don't know what happened, but it's working now. Thank you Hasu! I'm sorry for the trouble.
« Last Edit: Mon, 27 March 2017, 18:00:40 by krutmob »

Offline bayfury

  • Posts: 10
  • Location: San Francisco
Re: Alternative Controller for HHKB
« Reply #533 on: Sat, 15 April 2017, 16:40:21 »
Howdy folks. Anyone know if the mod is compatible with the HHKB Bluetooth keyboard: PD-KB600BN ?

Offline SpAmRaY

  • NOT a Moderator
  • * Certified Spammer
  • Posts: 14667
  • Location: ¯\(°_o)/¯
  • because reasons.......
Re: Alternative Controller for HHKB
« Reply #534 on: Sat, 15 April 2017, 16:56:34 »
Howdy folks. Anyone know if the mod is compatible with the HHKB Bluetooth keyboard: PD-KB600BN ?
No it's a totally different setup.

Offline Stabilized

  • Posts: 93
  • Location: Edinburgh, UK
Re: Alternative Controller for HHKB
« Reply #535 on: Wed, 10 May 2017, 11:45:34 »
Has anyone else experienced coil whine with their bluetooth controller when in USB mode? I thought it was because I didn't have a battery in, but even with one in I get this very slight coil whine which is driving me a bit crazy!

Offline devoi

  • Posts: 39
  • Location: MA
Re: Alternative Controller for HHKB
« Reply #536 on: Mon, 22 May 2017, 10:42:52 »
Has anyone else experienced coil whine with their bluetooth controller when in USB mode? I thought it was because I didn't have a battery in, but even with one in I get this very slight coil whine which is driving me a bit crazy!

I think it depends on the computer and how "clean" the USB power is. On my main home computer, it works perfectly fine with no noise. On my work computer, there's a bit of a high pitched noise that comes from the controller.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #537 on: Mon, 22 May 2017, 21:08:53 »
Has anyone else experienced coil whine with their bluetooth controller when in USB mode? I thought it was because I didn't have a battery in, but even with one in I get this very slight coil whine which is driving me a bit crazy!

I think it depends on the computer and how "clean" the USB power is. On my main home computer, it works perfectly fine with no noise. On my work computer, there's a bit of a high pitched noise that comes from the controller.

And it depends on your ears, I can hear only 100Hz-14000kHz(14kHz) with this video. I guess you are hearing around 15kHz-20kHz noise I cannot hear. https://youtu.be/qNf9nzvnd1k

I can hardly hear when it is installed and in use. I can hear the noise only when controller is given power without it installed, btw.

DC-DC boost converter used there has relatively old design and lower switch frequency, with my oscilloscope it shows 10kHz to 75kHz depending on power source voltage and output load. It seems the frequency is low when light load on output and high voltage of power soruce. Newer design converter with high freq, different coil or capacitors may help, though, it is not a solution to you aparently.

And this discussion may be helpful. I tried hotglue on coil and capacitor but it doesn't work for noise, btw.
http://www.edaboard.com/thread254663.html
« Last Edit: Mon, 22 May 2017, 22:30:46 by hasu »

Offline devoi

  • Posts: 39
  • Location: MA
Re: Alternative Controller for HHKB
« Reply #538 on: Mon, 22 May 2017, 22:25:43 »
At this point, is there really anything available that could extend the life of the battery? I enjoy being able to use it wirelessly and especially having a remappable layout is very nice but the time it takes to drain a battery just seems too short. I'm not sure if anyone here has a PFU BT HHKB and has looked at the internals, because whatever magic circuitry (or maybe hopefully software tricks) they use to get months off of two double-A batteries could be really useful with something like this (maybe a new revision?)

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #539 on: Mon, 22 May 2017, 22:47:18 »
At this point, is there really anything available that could extend the life of the battery? I enjoy being able to use it wirelessly and especially having a remappable layout is very nice but the time it takes to drain a battery just seems too short. I'm not sure if anyone here has a PFU BT HHKB and has looked at the internals, because whatever magic circuitry (or maybe hopefully software tricks) they use to get months off of two double-A batteries could be really useful with something like this (maybe a new revision?)

I thinik you can reduce AVR power consumption with less frequent matrix scan and aggressive sleep especially when it is not typed long time. It may causes unresponsiveness greatly on user experience, though. We will need new bluetooth module and to replace switch PCB completely in addition to controller PCB to improve battery life fundamentally.

PFU HHKB BT uses new 3V controller instead of classic 5V and BT3.0 module bcm20730 equipped with Broadcom proprietary technique for low power consumption.

Offline SICAR187

  • Posts: 75
Re: Alternative Controller for HHKB
« Reply #540 on: Sat, 03 June 2017, 15:01:17 »
Anyone w/ a JP have any ideas on a Mod to route the power to the dip switch opening/window? My thinking is to remove the ON/OFF switch and run some jumper wires to the opening, still haven't come up w/ a clever way to actuate/toggle (don't know the proper word) them once they're there. Any ideas are welcome. thanks in advance!


ETA: Turns out if you remove the ON/OFF switch, you must bridge the connection or the BT will not get power. It's simple, just use the metal piece that is part of the switch itself, it wedges in and stays in place. This mod should only be done if you feel comfortable with it, AKA at your own risk, as I do NOT know any of the long/short term effects.

Also the 2500mah Adafruit battery works as stated by another member, by folding the circuitry. It's just a PITA, took me a good 20 minutes.

« Last Edit: Tue, 06 June 2017, 15:06:25 by SICAR187 »

Offline futurecrime

  • Posts: 1001
  • Location: London, England
  • Get Zooted
Re: Alternative Controller for HHKB
« Reply #541 on: Tue, 06 June 2017, 17:08:54 »
I'm having trouble figuring out how to implement my layer switching.  I'm trying to have Layer 0 as QWERTY, Layer 1 as standard HHKB function layer with arrows, etc, and Layer 2 as my Colemak layer.  I want to use Fn+Q to turn on QWERTY (Layer0) and Fn+C to turn on Colemak (Layer2).  After installing it works ok until I switch to Colemak, then the function key stops working and I can't use layer 1 or switch back to layer 0.  Can anybody help me out?  My keymap is here: https://goo.gl/HnMO42

Thanks in advance!



Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #542 on: Tue, 06 June 2017, 17:16:13 »
check this. higher layer hides lower ones except for having TRNS.
https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#02-layer-precedence-and-transparency

Offline futurecrime

  • Posts: 1001
  • Location: London, England
  • Get Zooted
Re: Alternative Controller for HHKB
« Reply #543 on: Wed, 07 June 2017, 14:53:15 »
Well I figured it out, just needed to put my function layer on the highest layer (2) and have QWERTY and Colemak on 0 & 1. Also only need one toggle key, not two.  Posting this in case some other idiot gets stuck on the same simple thing...

Here's the updated keymap:
https://goo.gl/zsBln5

Offline sodiumjoe

  • Posts: 85
  • Location: Portland, OR
Re: Alternative Controller for HHKB
« Reply #544 on: Tue, 13 June 2017, 23:14:21 »
Hey Hasu, thanks for the awesome controller! I just received my fc660c controller and it's great!

I'm trying to map C-[ to ESC. So far I have tried mapping ACTION_LAYER_MODS(3, MOD_LCTL) to left control, and Layer 3 [ to ESC, but I think when I press C-[, it triggers C-ESC, which is not exactly what I want. Is there a way to do this?

Thanks again!

edit: One thing I've thought of us to map left control to L3, and map every key on Layer 3 to ACTION_MODS_KEY(MOD_LCTL, KC_1) etc, but that seems very tedious and it seems like there's a better way to do this.
« Last Edit: Tue, 13 June 2017, 23:17:47 by sodiumjoe »

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #545 on: Wed, 14 June 2017, 01:57:14 »
at this point unfortunately you have to write code and compile it.  the code should remove LCTL  before send ESC and restore the modifier state at the end. not easy but still possible.

I have a plan to add action just like ACTION_MODS_KEY except for   removing modifier instead of adding.



Offline sodiumjoe

  • Posts: 85
  • Location: Portland, OR
Re: Alternative Controller for HHKB
« Reply #546 on: Wed, 14 June 2017, 02:44:48 »
at this point unfortunately you have to write code and compile it.  the code should remove LCTL  before send ESC and restore the modifier state at the end. not easy but still possible.

I have a plan to add action just like ACTION_MODS_KEY except for   removing modifier instead of adding.


I got it to work with:

Code: [Select]
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
    switch (id) {
        case ESCX:
            if (record->event.pressed) {
                unregister_mods(MOD_BIT(KC_LCTL));
                register_code(KC_ESC);
                unregister_code(KC_ESC);
                register_mods(MOD_BIT(KC_LCTL));
                send_keyboard_report();
            }
            break;
    }
}

copying stuff from hhkb/unimap_hasu.c

It appears to be working pretty well, though I don't understand the event lifecycle, so I don't really get why the if (record->event.pressed) is necessary, i just added it because it was registering twice without it.

Please let me know if there's anything I'm missing!

I have a plan to add action just like ACTION_MODS_KEY except for   removing modifier instead of adding.

This would be great!

Offline sodiumjoe

  • Posts: 85
  • Location: Portland, OR
Re: Alternative Controller for HHKB
« Reply #547 on: Wed, 14 June 2017, 02:45:59 »
I also couldn't figure out how to get dprint to work, I think proper debugging output would've saved me some trial and error. Is that documented anywhere? I couldn't find it. I'm also not really a c programmer.

Offline hasu

  • Thread Starter
  • Posts: 3471
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #548 on: Wed, 14 June 2017, 19:25:09 »
That code looks like nice. It is good idea to send both press and release of ESC in the press event of ESCX, it makes situation simple. You don't have to have send_keyboard_report(), each register/unregister functions themselves call it.

With 'record->event.pressed' you can discriminate between 'key press' and 'key release' event. action_function() is called twice when the both events occur, so in general you have to know which event you are handling at the time.

'dprintf()' spits message out to 'hid_listen' command line tool when debug is on, while 'xprintf()' always prints regardless of debug state. You can turn debug on with LShift+RShift+D combo.

Offline sodiumjoe

  • Posts: 85
  • Location: Portland, OR
Re: Alternative Controller for HHKB
« Reply #549 on: Wed, 14 June 2017, 21:39:37 »


That code looks like nice. It is good idea to send both press and release of ESC in the press event of ESCX, it makes situation simple. You don't have to have send_keyboard_report(), each register/unregister functions themselves call it.

With 'record->event.pressed' you can discriminate between 'key press' and 'key release' event. action_function() is called twice when the both events occur, so in general you have to know which event you are handling at the time.

'dprintf()' spits message out to 'hid_listen' command line tool when debug is on, while 'xprintf()' always prints regardless of debug state. You can turn debug on with LShift+RShift+D combo.

awesome, thanks for the pointers! I tried dprintf with hidlisten, and I see output of character codes, but not log messages I added with dprintf, so I'm not sure what I'm doing wrong.