geekhack

geekhack Projects => Making Stuff Together! => Topic started by: JustCallMeCrash on Fri, 20 July 2012, 10:27:10

Title: USB Dvorak Dongle?
Post by: JustCallMeCrash on Fri, 20 July 2012, 10:27:10
I'm wondering if it would be possible to program a teensy or similar to do this:
http://keyghost.com/QIDO/
Surely it can be done for less than $90+$30 shipping from NZ.
I wouldn't need it to be switchable, but just use the Dvorak Simplified... it would allow me to take any mech board around to the various user workstations and not fumble around with QWERTY.  My other idea was to re-program a Poker or maybe a PLU-M87 to be hardware Dvorak for the same purpose.  Sure, I'll look like a snob bringing my own KB around, but I just can't type efficiently on QWERTY anymore. 

Any other suggestions?  Tips, tricks or places to look?
Title: Re: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: aarobc on Fri, 20 July 2012, 19:24:33
I'm actually building a device to do exactly that right now, I've run into a few issues trying to use some stupid higher level libraries so I'm having to resort to doing a lot of this manually, but I'm hoping to have it finished tomorrow.

If it turns out that this is something that there's a significant interest for, I'll look into making a few, I can't imagine them costing more than 20 a piece.

In any case, I'll post the code and instructions when it's done.
Title: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: cactux on Fri, 20 July 2012, 19:32:50
^ Did you design everything from scratch? could you share some details about your design?
Title: Re: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: aarobc on Fri, 20 July 2012, 19:52:22
^ Did you design everything from scratch? could you share some details about your design?

The final product I'm wanting to base on an at8u2 due to low cost and size, right now I'm just using a teensy to read a ps2 keyboard and handle the translation. PS2 is nice to work with btw, but the keyboard usb protocol is infuriating.

As you can see, it's still very much in the breadboard stage.
Title: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: cactux on Fri, 20 July 2012, 19:58:34
So you need a usb to ps2 adaptor right?
Title: Re: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: aarobc on Fri, 20 July 2012, 20:05:32
So you need a usb to ps2 adaptor right?

No, I'm just using this as a proof of concept. Final version will be usb as my preferred keyboard is a das ultimate. I just need this to be working pretty quickly hence ps2.

Usb to usb is a bit more involved. I do have a USB host dev board, ps2 is just easier to work with.
Title: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: cactux on Fri, 20 July 2012, 20:11:24
so you will have usb on both ends?
Title: Re: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: aarobc on Fri, 20 July 2012, 20:18:53
so you will have usb on both ends?

Yes indeed, I bought the usb host dev board to mess with android adk stuff, but it should work perfectly for this project.

There's actually no reason I couldn't build on both, it just might be a bit bulky.
Title: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: cactux on Fri, 20 July 2012, 20:26:30
what dev board are you using?
Title: Re: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: JustCallMeCrash on Fri, 20 July 2012, 20:39:51
Well, I'm pretty excited that someone else out there has got a head start!  I'm definitely in for $20... I can solder, but I'm crap for programming, so I may just rely on you for that one.  I'll let you take over the thread and just tell us what you're doing.  You have at least 2 other people interested.
Title: Re: USB Dvorak Dongle?
Post by: dorkvader on Fri, 20 July 2012, 21:31:03
I don't like the QIDO, so maybe I'm biased. Here's my opinion though.

Usually places will let you change the keyboard layout in the OS. If they've locked down the OS so far that you can't, then they probably won't let you stick scary looking USB dongles into the computers either. I'm not allowed to do either at work, and so my QWERTY skills have improved slightly.

Now, if you are allowed such things, I think the QIDO is too expensive. You should be able to make one with a teensy for under $20. Perhaps there are cheaper microcontrollers that you can use also.

If you do want to program a 'board, maybe a better idea is to get a Tipro or access-IS and use that. They can be had relatively cheaply. They're also small (Depends on which you get ofcourse) and easily programmable (if you have PS2 ports, which I don't).
Title: USB Dvorak Dongle?
Post by: cactux on Fri, 20 July 2012, 21:34:13
^ Why you do not like it? is it the price the only reason?
Title: Re: USB Dvorak Dongle?
Post by: dorkvader on Sat, 21 July 2012, 01:07:37
^ Why you do not like it? is it the price the only reason?
Yeah, that's pretty much it. They could also have done so much more!

I will refer people to the topic below for information on one that a Geekhacker is making! If this comes to be made, it'll be really excellent.

http://geekhack.org/index.php?topic=33066
---
I'm going to close this for now.
Title: Re: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: dorkvader on Sat, 21 July 2012, 01:23:47
Wow, I'm pretty happy someone is already working on the hard work (programming). I'd definitely be interested in making one or several.

A couple of questions/concerns.
1. is it possible to combine this with soarer's code, and get an NKRO USB Dvorak keyboard?
2. Can we make it so there's a table it referrs to, on which scancodes totranslate? I imagine this way we could pretty easily get Colemak, and other layouts as well.

This could very well be one versatile and excellent little device!
Title: Re: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: JustCallMeCrash on Sat, 21 July 2012, 04:30:19
I had started this same thread in Alt Layouts (now closed and locked), and dorkvader mentioned changing the layout in the OS instead of building a hardware solution.  That's fine for the computer I'll use all the time, but I run into trouble when I just need to do a quick bit of work on someone else's computer.  Far too many times I've filled in for someone on vacation only to have them return and not be able to type at all because I forgot to change their layout back.  Once in a while, I HAVE remembered to change it back and it STILL wants to revert to Dvorak.  A hardware solution that I could take around with me and just jam into a USB port would allow me to A) get at it more quickly (no fiddling with settings) and B) prevent my forgetting to set it back. 
I'm also, hopefully, starting a new job in the fall where I'll be doing a WHOLE lot more of this kind of thing, so I can just pair the dongle with my Poker for ultimate mechanical portability.
At any rate, I'm really excited about this project.  Let us know how it goes.

Dorkvader:  If you want to move this to the newly opened DIY section, feel free.
Title: Re: Dvorak Dongle? (Since we don't have a mods forum yet...)
Post by: aarobc on Sun, 22 July 2012, 00:43:17
Alrighty guys, basic functionally is there for ps2 to dvorak, it's nice and fast. I'll iron out the kinks tomorrow and if I have time start working on the USB to USB converter code. I already have the components needed for the actual device, so I'm hoping to have a prototype device up and working sometime next week.

Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Wed, 25 July 2012, 05:43:04
Thread is back up!
Title: Re: USB Dvorak Dongle?
Post by: aarobc on Thu, 26 July 2012, 16:21:22
Thread is back up!

Cool, much thanks.

I'm working on designing housings for the modules. I have access to a 3d printer so at least initially the housings are going to be printed. (after I finish figuring out 123D anyway).


Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Thu, 26 July 2012, 16:23:56
Awesome!  I'm figuring I'll build mine (or buy it from you, if you end up producing a few) directly into the case, under the PCB.  I can't imagine it'll be too big, right?
Title: Re: USB Dvorak Dongle?
Post by: aarobc on Thu, 26 July 2012, 16:32:03
Awesome!  I'm figuring I'll build mine (or buy it from you, if you end up producing a few) directly into the case, under the PCB.  I can't imagine it'll be too big, right?
That's a good point, I suppose a lot of people would rather have just the board without any housing. the design is pretty tiny, about the size of a thumb drive.
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Thu, 26 July 2012, 17:16:00
I would do both. I have big plans! I'll put one inside my Poker (if I can wedge it in) and another one to have externally. This is gonna be GREAT!
Title: Re: USB Dvorak Dongle?
Post by: aarobc on Tue, 31 July 2012, 23:20:05
Ps2 code is done. Tomorrow I'm working on usb host. I'm tired, night!
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Wed, 01 August 2012, 04:37:02
Progress!
Title: Re: USB Dvorak Dongle?
Post by: Soarer on Wed, 01 August 2012, 14:37:05
1. is it possible to combine this with soarer's code, and get an NKRO USB Dvorak keyboard?

The problem there is that you'd have to handle whatever reports any random >6KRO keyboard spits out. That's a pretty big bit of work! Also, the coder(s) would need a good selection of such keyboards to test with.

I got as far as buying a mini USB host shield and wiring it up to a Teensy. Haven't found time to do any more than run the test prog that comes with the Arduino USB Host library on it. (thread on DT (http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841.html)).
Title: Re: USB Dvorak Dongle?
Post by: aarobc on Wed, 01 August 2012, 19:49:45
I'm in the midst of playing with the usb host board as well. It's a bit more involved than I'd anticipated, but shouldn't be too much of a hassle to deal with. Finding the time to work on it has been the biggest hurtle so far, I'm only getting a couple hours a day in. 

However, progress is being made!
Title: Re: USB Dvorak Dongle?
Post by: aarobc on Sun, 05 August 2012, 14:39:25
Waiting for ordered parts. I haven't abandoned you!
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Sun, 05 August 2012, 15:16:54
Awesome. I was wondering, but sure don't want to seem pushy. You wanting this as much as I do gives me some measure of confidence.
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Mon, 13 August 2012, 15:32:19
Any chance you've made some progress?  Looking forward to it!
Title: Re: USB Dvorak Dongle?
Post by: aarobc on Mon, 13 August 2012, 15:40:47
Good news everyone! Got some parts in. I'm in the midst of a dilemma and I'd like some opinions;

An adapter that's only usb in is going to look much more elegant than something that has both a usb+ps2  input. it could be very slim and cool looking.
PS2+USB in is going to be more functional, but also kinda ugly and bulky, unless I can come up with something clever.

Anyway, thoughts?
Title: Re: USB Dvorak Dongle?
Post by: i3oilermaker on Mon, 13 August 2012, 15:48:53
I would be interested in what part you are using to plug in a usb cable and the code to read keystrokes!
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Mon, 13 August 2012, 15:50:40
Personally, I'm not likely to use this on my PS/2 boards.  I'm actually probably going to do an extremely short cord and mount the naked card inside the case and just run the cable out like normal.  Alternatively, I could just mount this in the case such that I could use a removable cable.  For my use, USB is the way to go.  If it's going to be a kit type thing, you could offer either/or. 
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Mon, 13 August 2012, 15:51:22
I would be interested in what part you are using to plug in a usb cable and the code to read keystrokes!
Where's that pesky +1 button?
Title: Re: USB Dvorak Dongle?
Post by: dorkvader on Tue, 14 August 2012, 21:27:38
I would be interested in what part you are using to plug in a usb cable and the code to read keystrokes!
Where's that pesky +1 button?
It'd be cool to keep track of how many keys you've pressed. That way you could see what sort of mileage you get on your keyboards.

You could make it output that (into a text field, like a normal keyboard) by pressing some uncommon combination of keys.
Title: Re: USB Dvorak Dongle?
Post by: aarobc on Tue, 14 August 2012, 21:43:40
I would be interested in what part you are using to plug in a usb cable and the code to read keystrokes!
Where's that pesky +1 button?
It'd be cool to keep track of how many keys you've pressed. That way you could see what sort of mileage you get on your keyboards.

You could make it output that (into a text field, like a normal keyboard) by pressing some uncommon combination of keys.

That'd be pretty cool actually. I'm also toying with the idea of having an SD card slot where you could store a JSON file containing the layout of choice, making customizing layouts and macros a breeze. I have USB host working now, so let the feature creep begin!

I kinda want to use an ARM based chip now, at least most of the code would translate over...

Anyway, I'm putting this project at the highest priority.
Title: Re: USB Dvorak Dongle?
Post by: hasu on Wed, 15 August 2012, 00:08:52
I've been working on hosting USB keyboard this several weeks too.
My current dev setup is comprised of Arduino Leonardo, Sparkfan Host Shield and Circuit@Home USB Host library for Arduino.
Sparkfan Host Shield is obsolete now and not pin-compatible with Leonardo unfortunately, while Circuit@Home USB Host Shield is compatible with Leonardo and safely stackable of course.

(http://i.imgur.com/9Btdd.jpg)
Leonardo+Host Shield is not compact footprint like Teensy but you can easily start to develop without even soldering.
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Wed, 15 August 2012, 03:51:27
Anyway, I'm putting this project at the highest priority.
Quote of the day. 
Man, you two are some clever mofos.  I'm sure if you started comparing notes, there's no end to the features you could integrate on this project.
I have next to zero programming knowledge and very little time, but if there's anything else I can do to help, please let me know!
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Sun, 26 August 2012, 20:53:29
Any weekly update?
Title: Re: USB Dvorak Dongle?
Post by: hasu on Mon, 27 August 2012, 02:38:54
Finally got worked as converter today!!
But buggy, unstable and still in development.
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Mon, 27 August 2012, 10:06:19
Finally got worked as converter today!!
But buggy, unstable and still in development.
Awesome!  I can't wait to be able to plug my upcoming ErgoDox into this.  This needs a catchy name, by the way... anybody?
Title: Re: USB Dvorak Dongle?
Post by: alaricljs on Mon, 27 August 2012, 10:16:00
Why would you plug an ErgoDox into this?  My understanding is that people are working hard at making it easy to remap.
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Mon, 27 August 2012, 10:19:02
Doh.  I'm an idiot. :confused:  My ErgoDox will replace my Poker on my desk.  The Poker will then travel with me plugged into this as I do my support rounds.


 ;D
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Mon, 27 August 2012, 10:19:20
We still need a catchy name.
Title: Re: USB Dvorak Dongle?
Post by: adrock on Mon, 27 August 2012, 17:28:50
We still need a catchy name.

because Dvongle is taken by something else, or too obvious?
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Mon, 27 August 2012, 19:59:30
Is Dvongle taken?  I dunno.
Also, didn't I hear tell of being able to do Colemak, etc with this dongle, too?  Dvongle may be misleading if it's not solely for Dvorak.
Title: Re: USB Dvorak Dongle?
Post by: dorkvader on Fri, 31 August 2012, 21:10:39
Is Dvongle taken?  I dunno.
Also, didn't I hear tell of being able to do Colemak, etc with this dongle, too?  Dvongle may be misleading if it's not solely for Dvorak.
I don't see why we can't use Cvongle for the colemak version. It'd be the same hardware, but, you'd know the layout based on the name.

Dvongle is pretty good. This thing will be like hardware AHK.
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Fri, 31 August 2012, 21:36:24
Your reasoning is unimpeachable.  All in favor of Dvongle/Colmongle(or Cvongle, or Colemangle)?
Title: Re: USB Dvorak Dongle?
Post by: hasu on Sun, 02 September 2012, 10:39:08
I just pushed source code of my USB to USB converter to Github. See a branch 'usb_hid' if you want to look into.  https://github.com/tmk/tmk_keyboard

You need Arduino Leonardo and Circuit@Home USB Host Shield 2.0 to play with this. Yeah, this is sizeable, not small dongle at this time.
https://www.circuitsathome.com/products-page/arduino-shields

To build firmware:
$ git clone git://github.com/tmk/tmk_keyboard.git
$ cd tmk_keyboard
$ git checkout usb_hid
$ git submodule init
$ git submodule update
and download LUFA and unzip under protocol/lufa and edit LUFA_PATH in protocol/lufa.mk. Then,
$ cd converter/usb_usb
$ make
You will get usb_usb.hex if you are lucky.

Program your Leonardo with avrdude(or easy-going Arduino IDE):
$ avrdude -patmega32u4 -cavr109 -PCOM17 -b57600 -Uflash:w:usb_usb.hex

The converter has Qwerty, Colemak, Dvorak and Workman layout. To change layout press Left and Right Shift then 1, 2, 3 and 4 respectively.

Disclosure: I'm a born-to-be Qwertypist :)

Have a fun!
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Thu, 13 September 2012, 14:08:28
Any new developments on this, aarobc?
Title: Re: USB Dvorak Dongle?
Post by: JustCallMeCrash on Wed, 24 October 2012, 12:44:05
Wow... did this really start in July?  Crazy.
Title: Re: USB Dvorak Dongle?
Post by: clickclack123 on Wed, 18 December 2013, 03:39:47
I've also thought about doing one of these.

Have you seen the circuits@home USB Host Shield for Arduino Pro Mini? It's certainly small enough, but adds to the cost at $20 plus post each, just for the host shield...

link - http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini (http://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini)

[attachimg=1]

I just bought a knockoff ATMega32u4 Arduino Micro clone on ebay for $6 that I'm hoping can work with this, should be good because the ATMega32u4 emulates a HID USB keyboard/mouse, and there are already easy libraries to use it. I'm not sure how the pins match up though, doubt they'd match up exactly. It'd certainly be a lot smaller than anything using that giant USB Host board that you're using though...  :p

edit: Just checked, and wow!! The pins are almost identical. This would be a really nice neat way of doing it.

link - http://www.ebay.com.au/itm/200991689025 (http://www.ebay.com.au/itm/200991689025)
"Leonardo Pro Micro ATmega32U4 Arduino IDE 1.0.3 Bootloader replace Mini"

The one on the left is the one I bought on ebay. On the right is the Arduino Pro Mini that the host shield was originally designed for. Another thing to think about is that the one that I bought might be a 5V board. I won't know until I get it to test, but it's only a regulator to replace to change it anyway.

[attachimg=2]
Title: Re: USB Dvorak Dongle?
Post by: Soarer on Wed, 18 December 2013, 10:49:59
Interesting, certainly looks like it would be easier than wiring the host board to a Teensy (http://deskthority.net/post81213.html#p81213). As you can see there, only certain connections are needed, so it might even be 100% match! (Well, apart from the 5V connection, the position of that on the host board sucks).
Title: Re: USB Dvorak Dongle?
Post by: hasu on Wed, 18 December 2013, 19:18:32
For people who is interested in this kind of things,

FYI:
Skilled guys on colemak forum have done the job, IIRC. See and applaud!
http://forum.colemak.com/viewtopic.php?id=1561
I didn't try this myself yet.
Title: Re: USB Dvorak Dongle?
Post by: clickclack123 on Fri, 20 December 2013, 09:37:42
Just to let anyone trying this know, apparently the pins aren't exactly right, according to a post here (https://forum.sparkfun.com/viewtopic.php?f=32&t=34873#p156730). Still very close though.
Quote
Ok, found the culprit. Unfortunately, the Pro Micro has pin 3 assigned to GND, where the Pro Mini uses that as a RST line. This causes the host shield to be held in reset. I really don't understand that design decision... really dumb move, if you ask me. The only answer is to disconnect pin 3 (the GND pin right next to TxI), and connect it to the RST pin on the other side of the board. Seriously, this design decision makes absolutely no sense to me. The Pro Micro is supposed to be pin-compatible with the Pro Mini... why, guys? :(

Anyway, that modification seems to work for me.

Something else to be aware of is that the cheap board that I bought I think is a 5V version, so I'll need to switch the regulator for a 3.3V one. Dammit it looks like I have to buy 5 minimum on ebay for $11. Anyone have any ideas on where to get a single suitable 3.3V regulator (need a MIC5219-3.3) cheap?
Title: Re: USB Dvorak Dongle?
Post by: Soarer on Fri, 20 December 2013, 10:37:04
That pin change could be really annoying if you didn't know about it beforehand! But, forewarned, it's not a big deal.

Also, don't forget the 5V connection ;)

PJRC sell a different regulator (http://www.pjrc.com/store/mcp1825.html), but I don't know if it's compatible.
Title: Re: USB Dvorak Dongle?
Post by: clickclack123 on Sat, 21 December 2013, 00:06:22
That pin change could be really annoying if you didn't know about it beforehand! But, forewarned, it's not a big deal.

Also, don't forget the 5V connection ;)

PJRC sell a different regulator (http://www.pjrc.com/store/mcp1825.html), but I don't know if it's compatible.

Sorry, don't forget what about the 5V connection?

Yeah, I saw a lot of ones in that packaging on ebay, but unfortunately they're a lot bigger and the pins don't match up. It'd be really ugly if I used them. Pity though, LM1117's are available on ebay for about 16c each (http://www.ebay.com.au/itm/130999735638)! Seems stupid that I need to pay 15x more and buy 5 at a time just to get the same thing in a different case with less current capacity. Oh well, that's how they get you, I'll have to buy them anyway.

The one I need will look like this:
[attachimg=1]
Title: Re: USB Dvorak Dongle?
Post by: Soarer on Sat, 21 December 2013, 03:28:22
That pin change could be really annoying if you didn't know about it beforehand! But, forewarned, it's not a big deal.

Also, don't forget the 5V connection ;)

PJRC sell a different regulator (http://www.pjrc.com/store/mcp1825.html), but I don't know if it's compatible.

Sorry, don't forget what about the 5V connection?

5V to the host shield for powering keyboards etc that need 5V power. It's the pad almost underneath the USB connector, in from the edge of the board. Orange wire here (http://deskthority.net/post81213.html#p81213), explained in section '4. Power Options' here (http://www.circuitsathome.com/usb-host-shield-hardware-manual). (I had to hack the Teensy to put 5V on one Vcc pin and 3.3V on the other, but on the Pro Micro there's a 'RAW' pin which will still have 5V even after its Vcc has been converted to 3.3V).
Title: Re: USB Dvorak Dongle?
Post by: clickclack123 on Sat, 21 December 2013, 11:24:49
Thanks again soarer.