Author Topic: Double Action Keyboard  (Read 7439 times)

0 Members and 1 Guest are viewing this topic.

Offline jlv

  • Thread Starter
  • Posts: 6
Double Action Keyboard
« on: Sat, 21 January 2017, 12:45:46 »
Update: The source code for the keyboard can be found here: https://github.com/jlidauer/DAK

Hi,
I have build a bit unusual keyboard and I thought you might be interested in this project, so here is how I build it.


158197-0

Introduction
A double action keyboard is a keyboard that has switches with two physical positions (two steps), therefore it is possible that one key has two different functions. For example when a button is pressed only one step down the keyboard sends to the computer the key a and if the same button is pressed two steps down it sends a special character.

I got this idea when I was looking for a better keyboard (especially for programming). The Finnish keyboard layout that I use is rather sub-optimal for programming purposes, because many often needed special characters can be typed only using ALT + CTRL + number_key  combinations, which is quite slow. The double action switch has pretty much the same idea as a double action button found on almost any digital camera trigger, where the first step is autofocus and the second step the shutter.

Construction of the double action switch
When I started designing the keyboard my biggest challenge was to find switches with two states that are suitable for a keyboard, since I was not able to find any I had to build them myself. I came up with a design that uses normal Cherry MX  switches with some modifications. The idea is to solder a standard tactile push button upside down on the PCB below the modified Cherry MX switch as shown below.

158207-1

I used brow Cherry switches which have an actuating force of 0.5 N and tactile push buttons which have an actuating force of 1.6 N, so the difference between the first and second state is significant, so it is difficult to press by accident the wrong action. I modified the Cherry MX switch so that the 'plunger' could actuate the second button. This was achieved by removing partly the centering 'pin' of the switch as shown in the picture.

158209-2  158211-3

Layout
I reduced the amount of keys to 66 physical keys, some of which were double action. When counting double action keys and the normal keys the total is 66 + 34 = 100 plus a 5-direction joystick, this equals to a traditional keyboard. Because it has fewer physical keys than a normal keyboard it is smaller and more comfortable to use. The arrangement of the keys is also unusual. As shown in the picture enter, backspace, shift, delete and the arrow keys are all in the middle so they can be operated easily with both hands. In addition, the rows of the keyboard are not staggered, which makes typing easier.

Number keys are arranger in a similar fashion as on a number pad, but as second action keys.

Characters in black are primary keys, characters in gray are secondary keys and characters in red are FN keys that can be accessed by pressing the FN key.

158213-4

The building process
 I designed the PCB for the keyboard with Kicad and milled it with my cnc milling machine. I  am using a Teensy 3.2 as the controller.
The switches are connected to a 9 x 14 matrix where each row is pulled down with a pull down resistor and each column can be activated separately (set high) with the controller that allows reading the states of all switches  by using 14+9 IO pins. After the electronics were ready I designed a case and milled it out of wood.

158203-5  158205-6  158201-7

Programming
The double action keys have two different functions, so there are some challenges how the functions are triggered. I found that the best solution was to make the logic so that if a key is pressed two steps down the secondary function is triggered immediately as would on a normal keyboard, however the first action is a bit more tricky. If the key is pressed only one step the keyboard can't send the keypress immediately since it might be that the user is still going to press also the second step, that would lead to a situation where both actions are triggered instead of only one that was intended to be triggered. The solution is to make it so that the first action is triggered when the key is pressed one step and then released or when the first step is hold down for a longer period of time than defined in the program (300 ms works fine).

To recap if you want type the first action you have to press the key one step down and release it (this gives one character) or keep it pressed longer than the delay time (when you need many characters), if you want to type the second action you need to press the key two seps down faster than the delay time.
 
The modifier keys are programmed so that they lock down when a 'normal' (not a modifier key) key is pressed while a modifier is hold down and released after the normal key is released, this makes shortcuts easier to press. If the modifiers would not lock down the modifiers would have to be kept pressed longer than the normal keys, because the normal keys are sent after they have been released (or pressend long enough, but it would be slower).

158199-8

Conclusion
After having used this keyboard for a while it has proven to be quite useful, since typing special character is so much easier than before. All in all I would say that the keyboard is way better than the keyboard that I earlier used.

-jlv
« Last Edit: Sat, 04 March 2017, 14:03:21 by jlv »

Offline LunarisDream

  • Posts: 439
  • Location: Changchun, China
Re: Double Action Keyboard
« Reply #1 on: Sat, 21 January 2017, 12:54:14 »
Very neat concept! It's like having an Fn layer without needing to hit Fn. Genius really.

Offline joey

  • Posts: 2296
  • Location: UK
Re: Double Action Keyboard
« Reply #2 on: Sat, 21 January 2017, 13:09:52 »
This is mental, good work! :thumb:

How does the dual action affect the typing on the alphas?

Offline jlv

  • Thread Starter
  • Posts: 6
Re: Double Action Keyboard
« Reply #3 on: Sat, 21 January 2017, 13:22:40 »
This is mental, good work! :thumb:

How does the dual action affect the typing on the alphas?

Thanks!

Compared to a normal keyboard the main difference is that the characters appear on the screen when you release the keys, but if the typing speed is reasonably fast it is quite hard to notice the difference.

Offline nugglets

  • Posts: 199
  • Location: Southern California
Re: Double Action Keyboard
« Reply #4 on: Sat, 21 January 2017, 16:01:51 »
This is crazy. I love it.


Offline sinusoid

  • Posts: 160
  • fd > ESC
Re: Double Action Keyboard
« Reply #5 on: Sat, 21 January 2017, 22:55:46 »
Legendary thread :D

The idea and execution are brilliant, congratulations, this thing is truly radical. Please post more experiences/pics/videos!

It seems that double action switches were actually a thing in the typewriter days. Deskthority wiki has some nice info on these here , and that leads to some interesting threads.
I swear I've seen someone post a modern version of one of these, but for the life of me I can't find that thread now. I think it was on DT, stumbled on it accidentally looking for data on fujitsu leaf spring around december.

Aaanyway, great job and PLEASE MOAR!!!

Offline richfiles

  • Posts: 222
  • Location: MN, USA
Re: Double Action Keyboard
« Reply #6 on: Wed, 25 January 2017, 17:22:09 »
I saw this idea with a musical instrument once. It was a hexagonal array of MX switches with a linear switch and a low tactile force pushbutton switch similar to yours. They determined the speed the key was struck at by measuring the timing between the MX switch and the pushbutton switch closing. Love the keyboard idea!
"75% + 1" Keyboard with "Danger Zone" keycaps and magnetically detachable Number Pad. Dyed Gateron Blue switches with amber sub lighting. Blue anodized plate and wood trim. (Firmware in Progress)
Bluetooth Apple //c keyboard with Alps SKCM Amber Switches. (Build in Progress)

Offline ReadmeDotTxt

  • Posts: 59
  • Location: USA
Re: Double Action Keyboard
« Reply #7 on: Wed, 25 January 2017, 23:19:49 »
Ooohh, this is a fun concept. Not sure I'm ready to give up modifiers for a double action, but it's an interesting idea!

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4181
  • Location: Tennessee - USA
Re: Double Action Keyboard
« Reply #8 on: Wed, 25 January 2017, 23:39:13 »
I was seriously just thinking about this yesterday.  It came to mind because I was thinking about the functionality of smart phone keyboards to tap vs. press (force touch on iPhone) resulting in different options.  I had no idea how you would go about it, but it seems you've found a pretty simple way.  Nice work.

Offline jlv

  • Thread Starter
  • Posts: 6
Re: Double Action Keyboard
« Reply #9 on: Fri, 27 January 2017, 07:34:27 »
Thanks for your comments.

Now that I have used the keyboard a bit more it feels like the second action switches need a little too much force to actuate when typing for a longer period of time. 1.6N is actually quite much, so I will try switches with 1.3N or 1.0N.

I started designing a second version of the keyboard, with some improvements:
-Second action buttons need less force to actuate
-The case will be smaller and the palm rest will be removable
-The joystick will be more solid and nicer to use (the knob will be larger)
-All switches will be double action

If you have any further ideas how to improve  it, I would like to hear.


Offline jal

  • Posts: 254
  • Location: Bay Area, US
  • I can't believe it's not gravy!
Re: Double Action Keyboard
« Reply #10 on: Fri, 27 January 2017, 08:03:32 »
That's really cool. Nice idea and execution.

Offline UsualSuspectXXX

  • Posts: 3461
  • Location: Persephone
  • (⌐■_■)⊃━☆゚.*・。゚
Re: Double Action Keyboard
« Reply #11 on: Fri, 27 January 2017, 20:01:35 »
Wow, this is really impressive! Looks like it took quite a bit of effort to get to this point. How long did it take to go from conception to reality?

Offline ReadmeDotTxt

  • Posts: 59
  • Location: USA
Re: Double Action Keyboard
« Reply #12 on: Sat, 28 January 2017, 01:17:48 »
I see you have two means of using the arrow keys; they joystick and the fn wasd. Do you use both methods enough to justify having them? That little nubbin/joystick reminds me of the one on thinkpads. If you could control the mouse cursor with it and either add buttons for mouseclicks or keybind them, you almost wouldn't need a mouse. Then again, maybe you can add that to the fn layer?

Offline jlv

  • Thread Starter
  • Posts: 6
Re: Double Action Keyboard
« Reply #13 on: Sat, 28 January 2017, 13:29:57 »
Wow, this is really impressive! Looks like it took quite a bit of effort to get to this point. How long did it take to go from conception to reality?

It took me about three months to design and build it.

I see you have two means of using the arrow keys; they joystick and the fn wasd. Do you use both methods enough to justify having them? That little nubbin/joystick reminds me of the one on thinkpads. If you could control the mouse cursor with it and either add buttons for mouseclicks or keybind them, you almost wouldn't need a mouse. Then again, maybe you can add that to the fn layer?

I haven't needed the wasd arrow keys so far at all, because the joystick has worked without any problems. Actually I added the fn keys there for testing purposes. It would be interesting to see if arrow keys combined with a mouse would work, but I'm not sure how it should be build since the arrow keys need a tactile click whereas a mouse doesn't.

I have now set to the fn layer for the joystick page up, page down, home and end keys which has been quite useful (not marked in the layout picture).

Offline ReadmeDotTxt

  • Posts: 59
  • Location: USA
Re: Double Action Keyboard
« Reply #14 on: Sat, 28 January 2017, 23:37:10 »
That combo is what I would've done, too. Having it bound to home, end, etc. sounds very intuitive.

Offline UsualSuspectXXX

  • Posts: 3461
  • Location: Persephone
  • (⌐■_■)⊃━☆゚.*・。゚
Re: Double Action Keyboard
« Reply #15 on: Sat, 28 January 2017, 23:38:47 »
Wow, this is really impressive! Looks like it took quite a bit of effort to get to this point. How long did it take to go from conception to reality?

It took me about three months to design and build it.

Oh wow. That's really not bad at all!

Offline jlv

  • Thread Starter
  • Posts: 6
Re: Double Action Keyboard
« Reply #16 on: Sat, 04 March 2017, 14:08:40 »
I published the source code for the keyboard on GitHub.
It can be found here:https://github.com/jlidauer/DAK

Offline jlv

  • Thread Starter
  • Posts: 6
Re: Double Action Keyboard
« Reply #17 on: Sun, 06 August 2017, 11:50:12 »
I finished my second double action keyboard.
https://hackaday.io/project/20665-double-action-keyboard
175184-0

Offline pixelpusher

  • * Elevated Elder
  • Posts: 4181
  • Location: Tennessee - USA
Re: Double Action Keyboard
« Reply #18 on: Sun, 06 August 2017, 12:16:36 »
 Very nice work.  Really cool to see unique ideas.  I was thinking about a similar functionality on a regular switch using TMK that would just type normal characters on tap and on hold it would type alternate characters.  Similar to how to type special characters on a Mac. 

Offline 0100010

  • Posts: 1127
  • Location: DFW, TX, US
  • Not Sure
Re: Double Action Keyboard
« Reply #19 on: Sun, 06 August 2017, 12:39:32 »
Very nice on the design, and your execution looks great!
  Quoting me causes a posting error that you need to ignore.

Offline _haru

  • Formerly linuxfanatic
  • Posts: 390
  • Location: Perth, Western Australia
  • Back from the dead
Re: Double Action Keyboard
« Reply #20 on: Tue, 08 August 2017, 22:42:11 »
This is amazing! Very clever idea!
AMJ60 - 45g MX White | GH60 Rev. C - Ghost Gateron Blacks | DFK101 - Alps SKCM Cream | Filco Majestouch 2 TKL - 62g Vintage MX Ergo Clear