Author Topic: Alternative Controller for HHKB  (Read 199239 times)

0 Members and 2 Guests are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #250 on: Thu, 30 October 2014, 16:36:33 »
I don't know about that kind of things. You can ask experts at AVRFREAKS unless Google can help you.
http://www.avrfreaks.net/
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline rdev5

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #251 on: Thu, 30 October 2014, 17:28:03 »
How about just seeding rand() to get a random number between 0 and 128?

Also my updated code (entropy was generated using crypto#randomBytes in node.js):

Code: [Select]
uint8_t asc2key(uint8_t l)
{
    switch (l) {
        case 'A': return KC_A;
        case 'B': return KC_B;
        case 'C': return KC_C;
        case 'D': return KC_D;
        case 'E': return KC_E;
        case 'F': return KC_F;
        case 'G': return KC_G;
        case 'H': return KC_H;
        case 'I': return KC_I;
        case 'J': return KC_J;
        case 'K': return KC_K;
        case 'L': return KC_L;
        case 'M': return KC_M;
        case 'N': return KC_N;
        case 'O': return KC_O;
        case 'P': return KC_P;
        case 'Q': return KC_Q;
        case 'R': return KC_R;
        case 'S': return KC_S;
        case 'T': return KC_T;
        case 'U': return KC_U;
        case 'V': return KC_V;
        case 'W': return KC_W;
        case 'X': return KC_X;
        case 'Y': return KC_Y;
        case 'Z': return KC_Z;
        case '1': return KC_1;
        case '2': return KC_2;
        case '3': return KC_3;
        case '4': return KC_4;
        case '5': return KC_5;
        case '6': return KC_6;
        case '7': return KC_7;
        case '8': return KC_8;
        case '9': return KC_9;
        case '0': return KC_0;
        case '\n': return KC_ENTER;
        case 0x1B: return KC_ESCAPE;
        case '\b': return KC_BSPACE;
        case '\t': return KC_TAB;
        case ' ': return KC_SPACE;
        case '-': return KC_MINUS;
        case '=': return KC_EQUAL;
        case '[': return KC_LBRACKET;
        case ']': return KC_RBRACKET;
        case '\\': return KC_BSLASH;
        case ';': return KC_SCOLON;
        case '\'': return KC_QUOTE;
        case '`': return KC_GRAVE;
        case ',': return KC_COMMA;
        case '.': return KC_DOT;
        case '/': return KC_SLASH;
        default: return KC_NO;
    }
}

void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
{
  switch (id) {
    case ENTROPY:
      if (!record->event.pressed && record->tap.count > 0 && !(record->tap.interrupted)) {

        // Select chars in entropy[] seed starting at pos(i)
        char MAP_HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
        uint8_t MAP_CODE[] = { 0x27, 0x18, 0x19, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09 };
        char entropy[] = {
          '6','5','D','A','1','9','9','8','6','B','E','7','1','0','7','A','6','1','D','4','B','D','4','3','6','B','D','1','5','9','5','C','A','3','4','C','0','7','9','3','7','F','9','F','D','D','A','4','1','0','1','3','1','F','9','C','9','0','4','6','F','1','D','0','2','5','7','C','4','2','1','C','A','B','3','1','F','F','1','8','5','0','D','1','5','B','E','8','7','5','2','3','E','7','A','2','B','2','9','3','6','5','A','E','B','E','A','3','6','B','9','7','B','C','9','4','A','A','8','0','5','8','3','D','2','E','E','F',
          '7','F','9','7','3','2','0','D','9','5','B','F','5','D','0','1','7','D','6','D','B','A','1','4','5','E','2','F','C','0','9','7','A','6','E','1','F','9','1','4','A','2','3','C','8','6','5','0','4','D','2','8','1','5','1','F','F','9','8','C','1','5','2','B','7','6','B','C','B','3','C','B','B','C','A','C','B','9','A','1','D','5','0','F','5','F','E','0','A','9','1','5','5','0','2','8','9','4','F','6','7','C','8','4','2','8','C','4','E','8','6','7','3','1','3','5','2','4','0','6','C','7','5','9','1','B','8','9',
          '2','1','0','6','3','7','F','6','F','2','1','C','4','3','3','6','E','6','1','0','A','E','6','7','5','A','E','E','C','D','2','3','1','D','1','6','5','D','B','7','1','6','3','3','3','9','7','A','B','5','6','C','2','1','E','1','C','F','6','B','5','C','2','D','B','8','2','0','2','E','F','E','B','1','8','5','0','7','C','D','E','0','9','D','E','4','4','C','0','A','0','D','6','1','8','1','2','4','1','2','6','7','B','F','F','5','C','D','F','E','1','6','8','F','A','6','0','6','2','7','E','2','4','C','B','2','6','7',
        };
        int max = sizeof(entropy) / sizeof(entropy[0]);

        for (int i = 0; i < 64 * 2; i += 2) {

          /** Begin loop code on i**/

              // Sanitize range
              i = (i <= 0) ? 0 : i;
              i = (i >= max) ? max - 1 : i;

              // Get char at pos(i)
              int pos = (i % 2) ? i - 1 : i;
              char c1 = entropy[pos];
              char c2 = entropy[pos + 1];

              // printf("%d: char(%c, %c) -> send(0x%x, 0x%x)\n", i, c1, c2, k1, k2);
              register_code(asc2key(c1)); unregister_code(asc2key(c1));
              register_code(asc2key(c2)); unregister_code(asc2key(c2));

          /** End loop code on i**/

        }

        send_keyboard_report();
        record->tap.count = 0;  // ad hoc: cancel tap
      }
      break;
  }
}

Offline aliceinwire

  • Posts: 10
  • Location: Tokyo, Japan
Re: Alternative Controller for HHKB
« Reply #252 on: Sun, 23 November 2014, 09:40:27 »
Following the video of opening the hhkb, I'm showing how much is simple to change the hhkb pcb (how i did).
I'm completely not a professional and in anyway means that what I did is the right way.
Actually I think there is many better way to remove the connector.
what i did was making force on the little opening under the connector using the pcb surface under it (of course taking care of not making any scratch or similar, and actually from my point of view was simple and fast).
But I made a mistake in re connecting the connector I didn't apply too much force :/ so after testing it, was not getting power. but I didn't close yet so I just put more force in the connector and the second time was working as supposed.
I changed my 2 hhkb  :D both working amazing  :D with perfect response and fidelity :eek:
I didn't program yet anyway because i'm under school exam... but i will do as soon as i can.


Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #253 on: Sun, 23 November 2014, 19:14:47 »
Pro2 JST connector is fairly tight and needs some force to mate/unmate it while JP Hirose connector is easy compared to JST.

I'd say this again, I recommend you follow method proposed by manufacturers and this works certainly for me.
You don't need any tool to remove/unmate the connector use just your fingers. Plier and screwdriver likely slip off and make scratch and give cables damage.

To remove/unmate hold many cables as possible with thumb and index finger and wiggle the connector laterally each side within 15deg range.

To insert/mate just push both side edge of the connector parallel with fingers or nails.

JST instruction:


Hirose instruction:


Quote
Read these instruction. And you better unscrew PCB before remove the connector.
http://www.hirose.co.jp/cataloge_hp/en_DF14_20130411.pdf
http://www.jst-mfg.com/product/pdf/eng/handling_e.pdf
https://geekhack.org/index.php?topic=12047.msg1499922#msg1499922
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline aliceinwire

  • Posts: 10
  • Location: Tokyo, Japan
Re: Alternative Controller for HHKB
« Reply #254 on: Sun, 23 November 2014, 20:54:44 »
Yes i tried at first to do like that but it was completely not moving... :(

Offline aliceinwire

  • Posts: 10
  • Location: Tokyo, Japan
Re: Alternative Controller for HHKB
« Reply #255 on: Thu, 27 November 2014, 04:54:35 »
hasu which keyboard layout is preinstalled on the tmk alternative controller for HHBK ?

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline aliceinwire

  • Posts: 10
  • Location: Tokyo, Japan
Re: Alternative Controller for HHKB
« Reply #257 on: Thu, 27 November 2014, 20:51:39 »
ooh that's why my alt and SUPER_L was inverted :)

i will also change the backspace working with FN and remove the FN + ESC combination

Offline aliceinwire

  • Posts: 10
  • Location: Tokyo, Japan
Re: Alternative Controller for HHKB
« Reply #258 on: Fri, 28 November 2014, 04:08:20 »
just finished to write the new version with some personal change :)
it work so well :D!

Offline x1a0

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #259 on: Mon, 08 December 2014, 16:15:58 »
You will need to install crosspack. Then download the code from github, go to the correct keyboard/protocol folder and run make to compile everything, then use dfu-programmer to flash the generated hex to the microcontroller. It might be confusing so someone can help, or maybe they could just compile it for you.

See here: https://github.com/tmk/tmk_keyboard/blob/master/doc/build.md

Thanks! Got it figured out.

For people having trouble installing dfu-programmer (I was on a new mac and missing some needed library files), use this link http://www.uriahbaalke.com/?p=106

One important thing that took me a few minutes to figure out was: when you are ready to build to the TMK alt controller with dfu. do this:

make KEYMAP=[keymap_name] dfu

DO NOT do this:
make KEYMAP=[keymap_name]
make dfu

this second make dfu overwrites the previous keymap you made with the default hhkb one. I was just dumb : P, I think I misunderstood the readme on git hub.

Thanks! This helped me!

Offline manisteinn

  • Posts: 3
  • Location: Sweden
Re: Alternative Controller for HHKB
« Reply #260 on: Wed, 10 December 2014, 15:11:10 »
I thought I'd share some HHKB stuff I've made since august:

I made and ordered a switch cap 3d-model and attached to plastic covers:
https://imgur.com/a/kdox9
http://www.shapeways.com/model/2602069/hhkb-bt-switch-cap-v2.html

The covers aren't hard to make, but a little time consuming to get right:
- Find a piece of plastic with a color and finish that matches the case (I used a d-link dir-100 router cover)
- Cut roughly to the right size (slightly larger).
- Drill 3mm holes for the light-pipes in one of them and cut a groove for the switch cap in the other.
- Sand on a flat surface to the right size/thickness, make them the same height as the outer case edge so the topre PCB supports them from the inside with the case closed.
The cap has a tiny lip on the bottom, insert with the PCB unscrewed

Completed covers: https://i.imgur.com/MS4pfR2.jpg

For USB only you could just glue a single piece of plastic to the PCB, or solder something to holes close to the edge for support.



I also added wireless qi charging with automatic power source switching: https://imgur.com/a/9yds3
I haven't used it much yet, I'm waiting for the release of the longer range qi v1.2 resontant transmitters to place one under my tabletop: http://www.wirelesspowerconsortium.com/blog/86/major-milestones-for-v12-resonant-specification
I still haven't fixed the reset issue and won't be able to until february, otherwise it works fine and a completely wireless keyboard is nice :)



The battery I used is AFAIK the largest one that'll fit without case modifications: 3.7v 2000mah 804550 (you'd need to add longer cables and connectors)
http://www.aliexpress.com/item/804550-854550-084550-3-7vmp5-battery-flat-gps-mobile-power-remote-control/978812465.html

They shipped me a pair of slightly smaller lower capacity (1800mah) batteries the second time, so you might want to confirm the exact dimensions and capacity in case you want to order a pair.

Offline Matt3o

  • -[_]-
  • ** Robot Emeritus
  • Posts: 3500
  • Location: Italy
Re: Alternative Controller for HHKB
« Reply #261 on: Thu, 11 December 2014, 05:27:19 »
how long does the battery last?

Offline manisteinn

  • Posts: 3
  • Location: Sweden
Re: Alternative Controller for HHKB
« Reply #262 on: Thu, 11 December 2014, 05:51:29 »
how long does the battery last?

It lasted 24h27min with BT connected, idle, no power saving.




Recharge time (Rprog=2.2K) was 7h28min


Sorry about the messed up units

Offline Matt3o

  • -[_]-
  • ** Robot Emeritus
  • Posts: 3500
  • Location: Italy
Re: Alternative Controller for HHKB
« Reply #263 on: Thu, 11 December 2014, 09:00:12 »
thanks for the report. I honestly hoped way more than that

Offline aliceinwire

  • Posts: 10
  • Location: Tokyo, Japan
Re: Alternative Controller for HHKB
« Reply #264 on: Thu, 18 December 2014, 05:15:46 »
thanks for the report. I honestly hoped way more than that

just see is using the 2000mah ? yes one day is not so much, but hasu is still fixing some leakage from what i know.
Is also not using idle mode.
« Last Edit: Thu, 18 December 2014, 05:22:13 by aliceinwire »

Offline Sturmfrau

  • Posts: 80
  • Location: Manila, Philippines
Re: Alternative Controller for HHKB
« Reply #265 on: Mon, 22 December 2014, 20:41:16 »
thanks for the report. I honestly hoped way more than that

just see is using the 2000mah ? yes one day is not so much, but hasu is still fixing some leakage from what i know.
Is also not using idle mode.

Well I think you could slap in atleast 4 pieces of 18650 size battery in there with 3200mah capacity. I think panasonic is the one that makes those batteries. Would last way longer.
|
HHKB Pro 2 Black (Blank) | HHKB Pro 2 White (Blank)

Offline x1a0

  • Posts: 6
How to change oneshot modifier to right shift?
« Reply #266 on: Sat, 27 December 2014, 07:40:16 »
Hi,

I've tried changing the corresponding line in my keymap.c file:
Code: [Select]
[7] = ACTION_MODS_ONESHOT(MOD_RSFT)
But it does not change anything after flashing...

Thanks!

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #267 on: Sat, 27 December 2014, 08:48:52 »
Oneshot modifier keeps its effect for ONESHOT_TIMEOUT ms after press the key.
https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#43-oneshot-modifier
What is your timeout?

If it is 300 You have to press following 'a' key within 300ms to get 'A'. Press and release 'Shift', then press 'a' quickly, you will get 'A'.
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline x1a0

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #268 on: Mon, 29 December 2014, 17:48:52 »
Oneshot modifier keeps its effect for ONESHOT_TIMEOUT ms after press the key.
https://github.com/tmk/tmk_keyboard/blob/master/doc/keymap.md#43-oneshot-modifier
What is your timeout?

If it is 300 You have to press following 'a' key within 300ms to get 'A'. Press and release 'Shift', then press 'a' quickly, you will get 'A'.
Oh, that reply title was eaten...

I want to change the one shot modifier to right shift, so I edited the keymap as above. But it's still on left shift

Offline admiralvorian

  • Posts: 321
  • Location: United States
  • DIY
Re: Alternative Controller for HHKB
« Reply #269 on: Tue, 30 December 2014, 18:20:45 »
how would one go about disabling one_shot all together? I type way too fast for the stock timeout on my left shift.
Darude Status:
☐ Not Sandstorm
☑ Sandstorm                                               wts wtt wtb

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #270 on: Tue, 30 December 2014, 18:54:33 »
x1a0,
I confirmed that it works as what I expected. I used MOD_RSFT in this line instead of MOD_LSFT.
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hhkb/keymap_hasu.c#L206

what do you use to know which shift the key registers? I use xev or showkey on linux, aquakeytest on windows.
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline x1a0

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #271 on: Wed, 31 December 2014, 04:37:18 »
@hasu

Thanks for the reply :)

EDIT: It's working now! Sorry that I didn't read doc very carefully and misunderstood how the keymap works (basically those FNn definition, i thought it was for F1~F12 on normal keyboards...). Thanks again for this awesome project - now I can play with my ideas... :p

I am using a Mac and use an app called key-codes to check key pressing.

I just tried again, it's still on left shift...

Here is the change in my file: https://github.com/x1a0/tmk_keyboard/blob/master/keyboard/hhkb/keymap_x1a0.c#L206
« Last Edit: Wed, 31 December 2014, 05:29:24 by x1a0 »

Offline x1a0

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #272 on: Wed, 31 December 2014, 05:40:02 »
how would one go about disabling one_shot all together? I type way too fast for the stock timeout on my left shift.

AFAIK, you can remove the corresponding function key registration in the default layer (Layer 0). Check this line in my keymap file: https://github.com/x1a0/tmk_keyboard/blob/master/keyboard/hhkb/keymap_x1a0.c#L29

Notice the very left "LSFT" in that line, it was "FN7" there before - means that key was registered as a function key (the one-shot modifier). Now I have changed it to a normal key (LSFT), and moved the one-shot modifier to my right shift key (the "FN5" on the right side of this line).

Hope this can help you!

Offline PieterGen

  • Posts: 135
Re: Alternative Controller for HHKB
« Reply #273 on: Thu, 01 January 2015, 14:18:36 »
Just to be 100% sure: does the controller work with the HHKB Professional JP Type-S. I mean the keyboard with the Japanse layout and silenced.

I'm asking this because the GitHub page states "This controller can work with HHKB Professional, Professional 2, JP and Type-S."   But, the difference between silenced (=Type-S) and non-silenced is only in the switches, right?  Meaning, it should work for the (Professional) JP Type-S.

Can anybody confirm this please?  Thanks!  :cool:

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #274 on: Fri, 02 January 2015, 02:39:20 »
It should just be the switches. Hasu has it working with all the different HHKB variations :thumb:

Offline admiralvorian

  • Posts: 321
  • Location: United States
  • DIY
Re: Alternative Controller for HHKB
« Reply #275 on: Fri, 02 January 2015, 17:27:50 »
how would one go about disabling one_shot all together? I type way too fast for the stock timeout on my left shift.

AFAIK, you can remove the corresponding function key registration in the default layer (Layer 0). Check this line in my keymap file: https://github.com/x1a0/tmk_keyboard/blob/master/keyboard/hhkb/keymap_x1a0.c#L29

Notice the very left "LSFT" in that line, it was "FN7" there before - means that key was registered as a function key (the one-shot modifier). Now I have changed it to a normal key (LSFT), and moved the one-shot modifier to my right shift key (the "FN5" on the right side of this line).

Hope this can help you!

I can't believe I didn't notice that! Thank you very much!
Darude Status:
☐ Not Sandstorm
☑ Sandstorm                                               wts wtt wtb

Offline Joey Quinn

  • Posts: 4293
  • Location: Houghton
  • "..."
Re: Alternative Controller for HHKB
« Reply #276 on: Fri, 02 January 2015, 19:59:44 »
Edit: Found one  :thumb:
« Last Edit: Fri, 02 January 2015, 20:09:41 by Joey Quinn »
People in the 1980s, in general, were clearly just better than we are now in every measurable way.

The dumber the reason the more it must be done

Offline tpc2084

  • Posts: 5
Re: Alternative Controller for HHKB
« Reply #277 on: Thu, 15 January 2015, 10:53:59 »
I see the buying thread for Hasu's Alt HHKB controller board is now closed. Does anyone have one of these boards available for sale?  Does anyone know if Hasu is still planning on selling these boards?  I don't need the bluetooth portion, so an older revision controller would work fine for me. I do need the board for a HHKB Professional JP keyboard, so that specific connector type is necessary. Thanks in advance!

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #278 on: Thu, 15 January 2015, 11:34:23 »
It is close but slighty open :) You can still order here.
https://geekhack.org/index.php?topic=56494.0
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline coolbho3k

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #279 on: Thu, 15 January 2015, 14:29:09 »
It is close but slighty open :) You can still order here.
https://geekhack.org/index.php?topic=56494.0
PM'd you hasu. :D

edit: if I get the latest revision of your controller board, can I solder my own Bluetooth module to it? THanks!
« Last Edit: Thu, 15 January 2015, 14:39:45 by coolbho3k »

Offline Smasher816

  • HHKB Master
  • Posts: 538
  • Location: return STATE_MISSOURI;
Re: Alternative Controller for HHKB
« Reply #280 on: Thu, 15 January 2015, 15:04:13 »
It is close but slighty open :) You can still order here.
https://geekhack.org/index.php?topic=56494.0
PM'd you hasu. :D

edit: if I get the latest revision of your controller board, can I solder my own Bluetooth module to it? THanks!

It would be best to use the same chip as he is using. Theoretically you could use another one that had the same size and pin count, but you would have to also change the code to work with it.

Offline coolbho3k

  • Posts: 11
Re: Alternative Controller for HHKB
« Reply #281 on: Thu, 15 January 2015, 15:37:58 »
It is close but slighty open :) You can still order here.
https://geekhack.org/index.php?topic=56494.0
PM'd you hasu. :D

edit: if I get the latest revision of your controller board, can I solder my own Bluetooth module to it? THanks!

It would be best to use the same chip as he is using. Theoretically you could use another one that had the same size and pin count, but you would have to also change the code to work with it.

Yeah that is what I meant. The board will not support bluetooth as it comes in the mail, but I am planning to get the same chip and a LiPo battery.

Offline TheOtherAdam

  • Posts: 4
Re: Alternative Controller for HHKB
« Reply #282 on: Thu, 15 January 2015, 18:07:23 »
Hi Hasu

For you everyday HHKB do you run a Teensy++ 2.0 or a "Hasu's Alt HHKB controller board", i couldn't find the specs on your board vs the Teensy!

I would like to support yours efforts with the firmware and developing something this cool, but i also want the best controller!

Thanks for the effort you have put in!

Cheers
Adam

Offline jdcarpe

  • Literally geekhack
  • * Curator
  • Posts: 8572
  • Location: Odessa, TX
  • God mode active
Re: Alternative Controller for HHKB
« Reply #283 on: Thu, 15 January 2015, 18:53:31 »
hasu's controller board and the Teensy++ 2.0 (and even Teensy 2.0) share a common controller, the ATmega32U4. As long as the matrix gets to the pins on the controller IC, the firmware doesn't care which you are using!

Offline TheOtherAdam

  • Posts: 4
Re: Alternative Controller for HHKB
« Reply #284 on: Thu, 15 January 2015, 19:12:48 »
hasu's controller board and the Teensy++ 2.0 (and even Teensy 2.0) share a common controller, the ATmega32U4. As long as the matrix gets to the pins on the controller IC, the firmware doesn't care which you are using!

Hi JD

There are some differences between the Teensy++ 2.0 and event Teensy 2.0 see Teensy USB Development Board

Specification      Teensy 2.0     Teensy++ 2.0
Flash Memory     32256           130048
RAM Memory      2560              8192

I would have thought having more ram and more flash would help with many layers and complex re-mappings, but then again, it might not!

Cheers
Adam


Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #285 on: Thu, 15 January 2015, 19:51:28 »
I'm using only TMK Alt controller board(with ATmega32U4) these days and my firmware is not tested on Teensy's any more. But both Teensy and Teensy++ are still supported.

It is no problem with RAM size but 32KB flash is a little tight for full featured firmware build. You're right but HHKB keymap consumes only 64 bytes per layer on flash you won't need so much flash area for keymap. If you want to implement features you'll need more flash.
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #286 on: Fri, 16 January 2015, 21:23:32 »
Bluetooth module RN-42 support was integrated into Alt Controller firmware now.


RN-42 specific codes are here:
https://github.com/tmk/tmk_keyboard/tree/master/keyboard/hhkb/rn42
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline Sygaldry

  • Edema Ruh
  • * Esteemed Elder
  • Posts: 1246
  • Location: Chicago
  • All the truth in the world is held in stories.
Re: Alternative Controller for HHKB
« Reply #287 on: Mon, 19 January 2015, 19:32:30 »
I thought I'd share some HHKB stuff I've made since august:

I made and ordered a switch cap 3d-model and attached to plastic covers:
https://imgur.com/a/kdox9
http://www.shapeways.com/model/2602069/hhkb-bt-switch-cap-v2.html

The covers aren't hard to make, but a little time consuming to get right:
- Find a piece of plastic with a color and finish that matches the case (I used a d-link dir-100 router cover)
- Cut roughly to the right size (slightly larger).
- Drill 3mm holes for the light-pipes in one of them and cut a groove for the switch cap in the other.
- Sand on a flat surface to the right size/thickness, make them the same height as the outer case edge so the topre PCB supports them from the inside with the case closed.
The cap has a tiny lip on the bottom, insert with the PCB unscrewed

Completed covers: https://i.imgur.com/MS4pfR2.jpg

For USB only you could just glue a single piece of plastic to the PCB, or solder something to holes close to the edge for support.



I also added wireless qi charging with automatic power source switching: https://imgur.com/a/9yds3
I haven't used it much yet, I'm waiting for the release of the longer range qi v1.2 resontant transmitters to place one under my tabletop: http://www.wirelesspowerconsortium.com/blog/86/major-milestones-for-v12-resonant-specification
I still haven't fixed the reset issue and won't be able to until february, otherwise it works fine and a completely wireless keyboard is nice :)



The battery I used is AFAIK the largest one that'll fit without case modifications: 3.7v 2000mah 804550 (you'd need to add longer cables and connectors)
http://www.aliexpress.com/item/804550-854550-084550-3-7vmp5-battery-flat-gps-mobile-power-remote-control/978812465.html

They shipped me a pair of slightly smaller lower capacity (1800mah) batteries the second time, so you might want to confirm the exact dimensions and capacity in case you want to order a pair.
This looks great!

Would it be possible for you to take some exact measurements for the covers so we could get a 3D model made up and put up on Shapeways?

Offline wolfv

  • Posts: 227
Re: Alternative Controller for HHKB
« Reply #288 on: Sun, 22 February 2015, 17:18:19 »
Would this work?
Teensy-LC (low cost Teensy) 62K flash, 8K RAM $11.65, Release is scheduled for March 10th
pin-compatible with Teensy 3.0 and 3.1 http://www.pjrc.com/teensy/teensyLC.html

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #289 on: Sun, 22 February 2015, 19:02:47 »
I don't find reason not to work on that board it has more power, flash and ram than AVR.
My controller doesn't use any specific functions to AVR I believe you can port to any platform.
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #290 on: Sun, 22 February 2015, 19:12:08 »
Oh, Teensy-LC is not 5V tolerant, you will need some voltage shifters to communicate with HHKB which works in 5V.
http://www.pjrc.com/teensy/teensyLC.html#specs
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline yankez001

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #291 on: Wed, 18 March 2015, 22:36:48 »
Hey Hasu,
I'm trying out your hhkb controller on my HHKB Professional JP (Type-S).
I see the device under USB:
  Bus 020 Device 003: ID feed:cafe feed HHKB mod
Writing a sample keymap via dfu-programmer succeeded.
Wow, looks like it's working, awesome!
I'm gonna try my custom keymap, next.

Offline yankez001

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #292 on: Thu, 19 March 2015, 09:57:35 »
Hi Hasu,
Pls help me out, I'm trying keymap_jp.c on HHKB Professional JP(Type-S) + your controller but ja specific key mapping doesn't respond. What am I missing?

details:
commands)
cd tmk_keyboard/keyboard/hhkb
make clean; make -f Makefile.jp KEYMAP=jp dfu

keymaps that doesn't respond)   HENK, KANA, MHEN, RO, JYEN

thanks.

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #293 on: Thu, 19 March 2015, 19:38:49 »
With default firmware shipped did those keys  work?

What is your OS and keyboard layout? With other than Japanese layout some of the keys may not be recognized.

Unfortunately I don't use JP layout usually and tested it only on US layout in Linux/Xorg. My OS recognized some of the keys at least.

And you can post your keymap so that I can examine it in my OS.
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline yankez001

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #294 on: Thu, 19 March 2015, 22:11:50 »
|With default firmware shipped did those keys  work?

I'm not certain but I think it didn't.

|What is your OS and keyboard layout?

I'm on Mac os x 10.10.2, JP kbd layout(img attached).

|And you can post your keymap so that I can examine it in my OS.

keymap_jp.c attached, this is the original src checked out from GitHub(tmk_keyboard/keyboard/hhkb/ ).

thanks!

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #295 on: Thu, 19 March 2015, 22:53:54 »
I confirmed all those Japanese keys are registered in Xorg/xev as original HHKB controller does.

Ah, I just remember this fact ...
Are you using NKRO function? Turn it off tmk's NKRO doesn't support those JIS keys. You can switch between normal and NKRO mode with 'LShift + RShift + N'.


Could HHKB JP with original controller send those problematic keys on Mac before?

If you have a Japanese Windows OS with JIS keyboard layout can you try HHKB on that OS?
Or if you have Japanese Windows keyboard can you try it on your Mac? And
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #296 on: Thu, 19 March 2015, 23:06:46 »
Hmm,
This tool may resolve your problem. It seems those JIS keys don't work proplerly in OSX by default. You'll need keyboard driver or tool like this.

https://pqrs.org/osx/karabiner/seil.html
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt

Offline yankez001

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #297 on: Mon, 23 March 2015, 01:24:30 »
Watching the key input on Mac os x, any signal doesn't appear, so the problem is in the controller. To be clear, if I map well known keymaps (such as SPC, TAB, etc.) to the key it works, so your controller acknowleges the physical keys.

I'll try it on other OSs.
Cheers.

Offline yankez001

  • Posts: 6
Re: Alternative Controller for HHKB
« Reply #298 on: Mon, 23 March 2015, 09:30:14 »
It turns out that it works fine on Linux. Yeah, you're right, I need a driver for mac so I'm stuck. Pls let me know if you find out something.
Cheers.

Offline hasu

  • Thread Starter
  • Posts: 2416
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: Alternative Controller for HHKB
« Reply #299 on: Mon, 23 March 2015, 09:45:23 »
Try Seil and Karabiner. I think these are exactly what you need.

https://pqrs.org/osx/karabiner/seil.html.ja
⚠ My Engrish is broken.  !!!FC980C Alt GB!!! HHKB Alt  ⌨ConvertersAlps64FC660C Alt