geekhack

geekhack Projects => Making Stuff Together! => Topic started by: hasu on Mon, 04 October 2010, 10:03:50

Title: HHKB style Mod
Post by: hasu on Mon, 04 October 2010, 10:03:50
This is a HHKB style compact keyboard with keymap layers and mouse keys.

The original keyboard is an old Macway TP-999KB-E which has
Mac ADB interface and black simplified ALPS(Fukka or Forward).

I cut function keys and tenkey part out from this keyboard.
I applied RO-59(Smooth Aid) to switch stems and removed leaf springs from some switches for lighter feel.


This use PJRC Teensy as keyboard controler and firmware based on PJRC
example codes. The firmware is available from:
http://github.com/tmk/tmk_keyboard


Mouse keys is not comfortable, but able to do the job without mouse. It is better
than nothing. I prefer a TrackPoint, but it is deficult to install it in an end product keyboard.
UPDATE(2010/01/03): Mouse keys work nice for me now and I'm no longer as eager for TrackPoint as I was.

(http://img535.imageshack.us/img535/4688/201011301784.jpg)

Keymap Layers:
Code: [Select]

Layer 0: Default Layer
    ,-----------------------------------------------------------.
    |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp |
    |-----------------------------------------------------------|
    |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|     |
    |-----------------------------------------------------'     |
    |Contro|  A|  S|  D|  F|  G|  H|  J|  K|  L|Fn3|Fn2|Return  |
    |-----------------------------------------------------------|
    |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift |Fn1|
    |-----------------------------------------------------------|
    |Fn7|Gui |Alt  |Space                 |Fn6  |\  |`  |   |   |
    `-----------------------------------------------------------'

Layer 1: HHKB mode (HHKB Fn)
    ,-----------------------------------------------------------.
    |Pow| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
    |-----------------------------------------------------------|
    |Caps |   |   |   |   |   |   |   |Psc|Slk|Pus|Up |   |     |
    |-----------------------------------------------------'     |
    |Contro|   |   |   |   |   |  *|  /|Hom|PgU|Lef|Rig|Enter   |
    |-----------------------------------------------------------|
    |Shift   |   |   |   |   |   |  +|  -|End|PgD|Dow|Shift |xxx|
    |-----------------------------------------------------------|
    |   |Gui |Alt  |                      |Alt  |   |   |   |   |
    `-----------------------------------------------------------'

Layer 2: Vi mode (Quote/Rmeta)
    ,-----------------------------------------------------------.
    |  `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|   `   |
    |-----------------------------------------------------------|
    |  \  |Hom|PgD|Up |PgU|End|Hom|PgD|PgU|End|   |   |   |     |
    |-----------------------------------------------------'     |
    |Contro|   |Lef|Dow|Rig|   |Lef|Dow|Up |Rig|   |xxx|   \    |
    |-----------------------------------------------------------|
    |Shift   |   |   |   |   |   |Hom|PgD|PgU|End|   |Shift |   |
    |-----------------------------------------------------------|
    |   |Gui |Alt  |Space                 |xxxxx|   |   |   |   |
    `-----------------------------------------------------------'

Layer 3: Mouse mode (Semicolon)
    ,-------------------------------------------------------- --.
    |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
    |-----------------------------------------------------------|
    |Tab  |MwL|MwU|McU|MwD|MwR|MwL|MwD|MwU|MwR|   |   |   |     |
    |-----------------------------------------------------'     |
    |Contro|Mb1|Mb2|Mb3|   |   |McL|McD|McU|McR|xxx|   |Return  |
    |-----------------------------------------------------------|
    |Shift   |   |   |   |   |   |MwL|MwD|MwU|MwR|   |Shift |   |
    |-----------------------------------------------------------|
    |xxx|Gui |Alt  |Mb1                   |Alt  |   |   |   |   |
    `-----------------------------------------------------------'
    Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel;

Layer 4: Matias half keyboard style (Space)
    ,-----------------------------------------------------------.
    |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
    |-----------------------------------------------------------|
    |Backs|  P|  O|  I|  U|  Y|  T|  R|  E|  W|  Q|Tab|Tab|     |
    |-----------------------------------------------------'     |
    |Contro|  ;|  L|  K|  J|  H|  G|  F|  D|  S|  A|Con|Control |
    |-----------------------------------------------------------|
    |Shift   |  /|  .|  ,|  M|  N|  B|  V|  C|  X|  Z|Shift |   |
    |-----------------------------------------------------------|
    |   |Gui |Alt  |xxxxxxxxxxxxxxxxxxxxxx|Alt  |   |   |   |   |
    `-----------------------------------------------------------'



(http://img713.imageshack.us/img713/6162/withhhkb.jpg)
(http://img251.imageshack.us/img251/4724/switchw.jpg)
(http://img502.imageshack.us/img502/3245/casee.jpg)
(http://img51.imageshack.us/img51/1547/teensy.jpg)
Title: HHKB style Mod
Post by: ironman31 on Mon, 04 October 2010, 10:52:43
Nice looking keyboard. Was this just a one time deal, or were you hoping to try and sell these?

I figure the community is craving something like this after the mini Guru failed to follow through
Title: HHKB style Mod
Post by: itlnstln on Mon, 04 October 2010, 11:01:52
Do that with a brown Cherry keyboard, and you will have one sold to me for sure.
Title: HHKB style Mod
Post by: kriminal on Mon, 04 October 2010, 11:17:27
is it possible to post a pic of the innards?
Title: HHKB style Mod
Post by: didjamatic on Mon, 04 October 2010, 11:48:10
Love this mod!  Well done!
Title: HHKB style Mod
Post by: Rajagra on Mon, 04 October 2010, 15:25:02
I think PFU need to up their game, they're starting to look like a bunch of amateurs!

(I'll assume you swapped the JK keys as a kind of watermark for the photo. :smile:)
Title: HHKB style Mod
Post by: Findecanor on Mon, 04 October 2010, 15:45:47
Nice mod! The layout is not my cup of tea, but I applaud people who are daring enough to start a mod like this and follow it through all the way.

Ripster: Nice pic! Notice that all of the keyboards in the picture have Cherry switches of one type or another ...
Title: HHKB style Mod
Post by: elbowglue on Mon, 04 October 2010, 16:38:46
(http://www.wesholloway.com/images/artwork/thats-hot.jpg)

That's hot.
Title: HHKB style Mod
Post by: hasu on Mon, 04 October 2010, 19:35:51
Thanks for responses, all.

ironman31: I would buy a mini Guru.if it was available. I hope that a compact KB with TrackPoint and Topre/CHERRY switch will be availble from some corp.

kriminal: Some photos of inside is attached at bottom of the article. It is a dirty work of cut and paste.
Title: Added TrackPoint(PS/2) support to firmware
Post by: hasu on Mon, 03 January 2011, 05:24:17
I added PS/2 mouse support to my firmware.
And TrackPoint unit used in Thinkad keyboard is just a 3buttonsPS/2 mouse.

This means it is ready to install the unit into my keyboard,
but I found my keyboard doesn't have enough room for the unit. :(
(The TrackPoint is working well outside the keyboard.)

If you are interested in PS/2 mouse or TrackPoint support, see ps2.c and ps2_mouse.c.  
(Trackpoint specific enhanced PS/2 commands are not supported so far.)
https://github.com/tmk/tmk_keyboard

(http://img220.imageshack.us/img220/5452/201101031879.jpg)
Title: HHKB style Mod
Post by: arieswu on Mon, 03 January 2011, 07:21:13
the Mac keyboard looks so beautiful and stylish

i am keen to see it with trackpoint  :D
Title: HHKB style Mod
Post by: sixty on Mon, 03 January 2011, 12:47:50
Great job hasu. You truly are an inspiring member to geekhack!
Title: HHKB style Mod
Post by: lowpoly on Mon, 03 January 2011, 16:12:07
Quote from: hasu;272281
I added PS/2 mouse support to my firmware.

So awesome.

Quote from: hasu;272281
And TrackPoint unit used in Thinkad keyboard is just a 3buttonsPS/2 mouse.

I think most pointing stick units are.

Quote from: hasu;272281
This means it is ready to install the unit into my keyboard,
but I found my keyboard doesn't have enough room for the unit. :(
(The TrackPoint is working well outside the keyboard.)

Sticks from scissor keyboards are too short, you need an adapter. If you can't make it yourself, PM me.
Title: HHKB style Mod
Post by: hasu on Mon, 03 January 2011, 18:59:57
Quote from: lowpoly;272559

Sticks from scissor keyboards are too short, you need an adapter. If you can't make it yourself, PM me.


I made an adapter from a drink straw and hot glue. like this:
(http://img842.imageshack.us/img842/2141/201101041881.jpg)

But it was too thick to install between three ALPS switches :(
I need a bit thinner post.
I have to read zmurf's TrackPoint mod (http://geekhack.org/showwiki.php?title=Island:11420) again to know how he did.

I am very curious about your adapter option. I'll PM you later.
Title: HHKB style Mod
Post by: j_r on Mon, 03 January 2011, 22:44:43
Superb work!  I also appreciate your driver documentation on github; I have been scouring the internet for how one goes about developing such a thing (I have limited experience with programming... entry-level C++ and program specific languages, i.e. Maxscript and Rhinoscript).  Thank you, I now have some homework.
Title: HHKB style Mod
Post by: arieswu on Sat, 02 April 2011, 09:38:22
Quote from: hasu;272281
I added PS/2 mouse support to my firmware.

If you are interested in PS/2 mouse or TrackPoint support, see ps2.c and ps2_mouse.c.  
(Trackpoint specific enhanced PS/2 commands are not supported so far.)
https://github.com/tmk/tmk_keyboard

Show Image
(http://img220.imageshack.us/img220/5452/201101031879.jpg)


Hi, hasu
You really did a super mod!!!

Can you tell me board pinout of this trackpoint unit??
I have one looks like yours....
Title: HHKB style Mod
Post by: hasu on Sat, 02 April 2011, 10:26:25
arieswu,
I don't have this board in hand now, so I'm not sure but it was Type A.
I have seen only two type of Trackpoint board: Type A board is common and B is rare.

And see this thread for pinouts and some pic of TP board.
 http://geekhack.org/showthread.php?t=8971


Type A:
Code: [Select]
Board pinout    TPM754            
---------------------------------  
1   BUTTON2     P3.2(27)          
2   BUTTON1     P3.1(26)          
3   BUTTON0     P3.0(25)          
4   TP_CLK      INT0(24)          
5   VCC                            
6   GND                            
7   EX.CKL      INT1(4)            
8   TP_DATA     TXD(2)            
9   EX.DATA     RXD(1)            
10  RST         RST(5)
Type B:
Code: [Select]
Board pinout    TPM754            
---------------------------------  
1   RST         RST(5)            
2   EX.DATA     RXD(1)            
3   TP_DATA     TXD(2)            
4   VCC                            
5   TP_CLK      INT0(24)          
6   EX.CKL      INT1(4)            
7   GND                            
8   BUTTON0     P3.0(25)            
9   BUTTON1     P3.1(26)          
10  BUTTON2     P3.2(27)
Title: HHKB style Mod
Post by: arieswu on Sat, 02 April 2011, 12:22:24
Quote from: hasu;323297
arieswu,
I don't have this board in hand now, so I'm not sure but it was Type A.
I have seen only two type of Trackpoint board: Type A board is common and B is rare.

[/CODE]

Thank you so much

I read the thread and have one another question..

the 4.7k Ω resistor has 1/4w, 1/2w, 1w...which one should I use?
Title: HHKB style Mod
Post by: hasu on Sat, 02 April 2011, 19:39:57
arieswu,
You can use any resistor wattage, even 1/8w is enough.
And the resistor value is not important in most case too, you can choose from 1k-10k ohm.

I saw your 40% keyboard with Trackpoint. Nice mod!
You should post its article on GH :)
Title: HHKB style Mod
Post by: arieswu on Sun, 03 April 2011, 10:54:11
hasu,

It really works,
thank you very much
I have done the part of trackpoint unit of my new 60% keyboard
It will use the frame of KBC poker


and happy to know that you like my last 60% with trackpoint mod
but my English is not good enough to post it on there XD
(http://armake.com/photo/albums/album118/IMG_2919.jpg)
Title: HHKB style Mod
Post by: sordna on Sat, 17 September 2011, 20:11:54
Quote from: arieswu;323751
I have done the part of trackpoint unit of my new 60% keyboard
It will use the frame of KBC poker
and happy to know that you like my last 60% with trackpoint mod
but my English is not good enough to post it on there XD

Nice work with the trackpoint, where are the mouse buttons though?
Title: HHKB style Mod
Post by: hasu on Sat, 17 September 2011, 23:59:00
Quote from: sordna;417894
Nice work with the trackpoint, where are the mouse buttons though?


He assigned the buttons on thumb row keys.
http://geekhack.org/showwiki.php?title=Island:9542&viewfull=1&page=15&do=comments#post268612

He is a great modder of compact keyboard with trackpoint as lowpoly be.
http://aries.armake.com/1229.html
Title: HHKB style Mod
Post by: Dox on Mon, 26 September 2011, 20:45:45
Hey hasu, I've just finished adapting your firmware for my doxkb! It was quite a challenge to  figure everything out but it all seem to be running smooth now. The mouse keys and the windows volume control is very nice!
I discovered a couple of bouncing switches with your firmware that were not a issue with my last one. any ideas what could cause this?
An other little question, there seem to be quite a bit of delay between when you press a function key and when you can use the function layer. Any way of reducing this delay?
Thanks for sharing this!
Title: HHKB style Mod
Post by: hasu on Mon, 26 September 2011, 21:45:32
Hi Dox, I'm happy hearing this!

Basically mechanical switches need debouncing to cancel chattering, but my firmware has no debouncing code yet. Fortunately I've not experienced bouncing on my keyboard so far :)
You can add debouncing code into matrix.c to solve your bouncing.I will add the code some time soon but I have no testing keyboard for now. I will post it in this thread when finished.


Yes, layer switching has some delay intentionally for some situations, if you don't need it you can reduce it with defining LAYER_ENTER_DELAY to smaller number in layer.c
Title: HHKB style Mod
Post by: Dox on Mon, 26 September 2011, 22:12:05
Thanks, now that I think about it, I can see why you would sometimes need the delay to engage the function layer. I'll play with it and see how it goes.
Title: HHKB style Mod
Post by: hasu on Thu, 29 September 2011, 03:27:14
Dox,

I added debouncing code to my firmware.
http://github.com/tmk/tmk_keyboard/commit/6284b147c23aa32a9e65138b1eb8ee908ece4941

The code locates in macway/matrix.c and you can found setting in macway/config.h like:
#define DEBOUNCE 5
You can use 0 if you don't need.

Plz try it and let met know this cures your problem.

Thanks.
Title: HHKB style Mod
Post by: Dox on Thu, 29 September 2011, 09:35:48
Thanks hasu! This seem to have fix the problem. I'm currently at work on my ergo clear version and the bounce was rare on this one. I'll try it on my cherry blue one tonight as it was bouncing all over the place.