• You are not logged in.

    WIP: Hardware Dongles

    • Started by unfy
    • 9 Replies:
    • Reputation: 0
    • Registered: 29-Apr-2014
    • Posts: 65

    After 10 months since going through The Change (TM) to Colemak ... I have been an ecstatic / happy camper.

    Love me some Colemak.

    Anyway - for the past few days, I've been forced to sit in front of some Qwerty keyboards here at work quite frequently.  The layout switches back and forth are pissing me off to no end.

    I can't take it anymore.

    So.  I'm going to make a dongle to translate key presses.

    I dunno how long it'll take, I have plenty of projects on my plate at the moment.  I do know what I'm doing (having made my own ps/2 keyboard fake uC device etc) - it's just a matter of time etc.

    I'll prolly be built on an attiny, taking power directly from the ps/2 bus.

    And later I'll do a USB version.

    I'll post schematics, code, etc later as I progress in the project.

    There are no time frames or anything.

    Offline
    • 0
    • Reputation: 0
    • Registered: 29-Apr-2014
    • Posts: 65

    Actually...

    https://forum.colemak.com/viewtopic.php?id=1561

    I see that Darkness has done an arduino based project for this.

    Not an arduino fan myself.  And although the Teensy + shield is pretty small, my goal is smaller.  Something that is really quite happy existing as a key chain fob.

    Big props to Darkness though :D.

    ------

    And, thanks to f8l on the irc channel for bouncing ideas off of and stuff <3

    Last edited by unfy (05-Feb-2015 07:55:38)
    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    At the very least, you should find the code from the Arduino project interesting. Let us know how it's going!

    If you can make it with the possibility of key code mods (AngleWide, Curl etc), Extend mappings (preferably more than one layer) and multiple layouts, I'd be very interested! ;-)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 11
    • Registered: 06-Jun-2013
    • Posts: 551

    i already have a teensy from another project, will get a shield at some point and try and replicate what darkness did

    they are pretty small so i wouldn't worry too much about size

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    Well, size... Teensy plus shield will be like a big USB drive (by today's standards) which isn't big but Unfy wants key chain size. It is a tempting thought! Of course, you'll need two USB ports on the thing so if you want to use USB-A that'll be somewhat bulky no matter what. But these days USB-Mini/Micro are common so if the rest of the body is small enough one could go with those and use USB A-to-Mini/Micro cables for it.

    Last edited by DreymaR (05-Feb-2015 14:11:22)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 11
    • Registered: 06-Jun-2013
    • Posts: 551

    the teensy is 18x35 - i think the shield is slightly smaller and mounts on to the teensy so only increases the thickness

    the teensy usb port is micro

    Offline
    • 0
    • Reputation: 0
    • Registered: 29-Apr-2014
    • Posts: 65

    Since, for either the ps/2 or USB version, all it needs to do is have a male and a female jack, the tiny smd chip, a cap, and maybe a few resistors and a few ESD diodes.  USB version will prolly also require a couple diodes for voltage level adjustment on one of the ports (unless there's an avr that hardware that offers 2 usb ports). I should get this whole thing to be half the size of the teensy alone, easily.  And requires no extra board.

    Being that it's "dongle" intended target, one end plugs into computer, and other side accepts the input.  Won't be any cables involved.  Header sizes don't matter either because they'll all have to be USB-A (just differing genders).

    There will be a delay when using the device - this is unavoidable due to the nature of having to capture and process packets.  It's intended to make someone's life sane as they travel, nothing more.

    ---------------

    Multiple layouts for translation - I'll keep the software designed with this in mind.  Since it's all ROM based look up tables, that shouldn't be a problem.

    ---------------

    Now for concerns.

    While discussing stuff in #colemak, someone had mentioned that most folks don't mind PKL / AHK being run on their computer in order to change the layout temporarily.  I happen to be the opposite - running "random programs" or changing someone else's settings is a pet peeve.

    Lets go into the opposite side now.  What about plugging in "random hardware"?  Let alone between the keyboard and PC!  ZOMG YOU SNIFFING HACKER!)@(%*!)(*%

    --------

    I have other thoughts, but I'm keeping them to myself right now :D

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    IT people will be primarily worried about the safety of their computers. They don't like strange software, but most wouldn't take too much offense at external hardware. Some would have a knee-jerk reaction, but you could explain that they probably would allow you to plug in your own USB keyboard and that has a similar chip in it which could to the exact same thing.

    Users will of course be worried if they're supposed to be working through your dongle. But that won't be an issue most of the time, except maybe with a few users that know you (if you share a computer with a few people and want the dongle to stay plugged in – given that it starts in a pass-through mode and you have a hotkey combo to switch to your layout).

    It's not just multiple layouts that's needed! It's multiple layers: First the initial scan code translation for one ergo mod, and then another for the next ergo mod, and then a layout translation. I don't suppose we can readily expect virtualkey translations (AltGr etc) because that usually doesn't happen from the keyboard? But I suppose one could SendInput from USB too...

    Last edited by DreymaR (06-Feb-2015 08:45:23)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 29-Apr-2014
    • Posts: 65

    Hardware - if it's a key fob you keep on you, the hope is that you install it between computer and keyboard while using it -- then remove it when you walk away.  I dunno.

    -------

    I'll get something going, possibly even send you some hardware - and then we can go about figuring out more of what you want :D.  There is much about keyboard whatever you seem to be mentioning that is foreign to me ? hehehehe.

    But - again - all in due time.

    My current primary project is to get my electronics workbench built so that I have a nice sane place in which to do all this work (rather than whatever table is handy).  A nice place to keep solder tools, oscilloscope, pcb etchant tank, etc.  It's mostly all bought, just need to assemble.

    Offline
    • 0
    • Reputation: 210
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,343

    Nice! I wish you luck in this exciting project.

    I think a fob like this should be about mapping keystrokes to new keystrokes, essentially. That means there won't be AltGr mappings or dead keys (that map symbols to keystrokes by sending codes to the "Input stream"). The symbol sending would probably be OS dependent too, and we want this fob to work as a keyboard for any machine that can use a keyboard be it a PlayStation, a smart phone or a Mac. So from my Big Bag of Tricks, scratch the Colemak[eD] mappings (1.1), dead key enhancements (1.3) and locale layouts (3.1).

    Primary layouts will be the main point of course, and there could be a decent number of those available although for any one user only a couple would probably be needed. I like the Ctrl+Shift+# convention for changing layouts, which gives you a dozen options or so. It'd be kinda nice if the Tarmak layouts could be in there as well as Colemak for presentation purposes, but it may on the other hand be largely unnecessary as the Tarmaks are a temporary need and later on they'll just be in the way in there. I don't know.

    The Extend mappings (BBoT 1.2) would be great! And maybe the Mirror mappings too (BBoT 4.2) although the demand for that has been low so far. These are key-to-key remappings like layouts, but need one or more modifier keys. So they could be defined in the same format as normal layouts, but numbered separately and instead of activating them normally you could set modifiers with which to activate them. The best would be a configurable modifier: E.g., pressing Ctrl+Shift+`, 1, and then, say, the <> key would set that as your modifier for Extend layer #1. Ctrl+Shift+`, 1 and then Ctrl+Shift+` again could disable that modifier. I'd like the following Extend layers to be available:
    • Normal Extend #1
    • Extend #2, KeyPad layer (see the Extend part of my Big Bag topic)
    • Mirrored Colemak
    • Extend #3, maybe a programmer's layer?

    One question is whether a modifier could be made either a switch (like normal Shift works), latch (like a dead key) or lock (like CapsLock). Maybe complex, but for a KeyPad layer it could be handy to be able to lock it on. In Linux a solution for this is to let a combo of switch modifiers (say, two level5 modifiers together) work as a lock modifier – and the next such press would release the lock again.

    Another question is how to get enough modifiers with only a few free keys to choose from! I like the thought of having, say, Caps as the Extend#1 key but, say, Alt+Caps (and after that you only need to hold Caps down) as the Extend#2 key. Some also like on-release modifiers that act as a modifier while held down and then give their normal KeyDown stroke on KeyUp instead (typically this is used for having Space as a modifier).

    I haven't specified a programmer's layer myself, but I see that some like them. As you may know, they're about getting common coding symbols in easy positions. Maybe even some key ligatures like "<, >, left" which creates a bracket pair and puts you inside it (similarly for '[]', or "// " for inserting a C comment). I think it'd be kinda cool to have a key that spews out a bunch of asterisks or hashes – say, 10 at a time – for separator lines in comments. This means supporting more than one output key from one input key. Might be a decent thing in general.

    Now, the ergo mods (BBoT 2.1/2.2) and such. These are really important to me, as if you have to specify each combo of a layout and mods the number of layouts will balloon. So here modularity is ideal. In my head, it goes like this:
    1) I press Ctrl+Shift+1 for Colemak
    2) While holding down Ctrl+Shift, I now press, say, 7 for Curl-DbgHk
    3) Still holding the modifiers, I finally press, say, 5 for WideAngle(Slash)

    Sure, it'll make it less simple to switch layouts but I think it'd be nice. What this means is that some remappings will be partial and cumulative. In the example above, the Curl remapping would swap around whatever keys were mapped to the 'D', 'B' and 'G' as well as 'H' and 'K' (Colemak) positions. The WideAngle remapping would then shift the right-hand and lower left-hand half-rows from the previous step so you'd end up with a combo of your layout and the two selected ergo mods! This opens for many possibilities.

    All this may be way too much for now, of course. First things first I guess, getting a layout to work. Making it a Curl-AngleWide-DoubleMochaccino-Colemak could be accomplished by actually specifying all your preferences before compiling (as I guess you will make your fob reprogrammable like the Arduino?). But at least keep the modifier/Extend thing in mind because the Extend layer is something I really miss to have around when using a keyboard without it.

    Last edited by DreymaR (07-Feb-2015 15:02:56)

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0