Showing posts with label ergonomics. Show all posts
Showing posts with label ergonomics. Show all posts

06 June 2020

Better access to special characters with AutoHotkey on Windows

EDIT 2020-06-21: I tweaked the layout a bit, and updated screenshot and scripts.

When you're trying to improve your typing skills, there are quite a few things you can do: learning to touchtype, getting an ergonomic / split keyboard, or moving to a better layout than QWERTY. However, if you're like me (small hands, short pinkie), chances are that none of these will be of much help when you have to type a lot of special characters, for example in programming. That's because special characters are typically hard to reach. Most layouts banish them to the edges of town, leaving them almost entirely to the right pinkie and to shift+<number>, which forces your hands to wander very far from the home-row on which your muscle-memory is based.

I'm currently experimenting with a solution to this state of things. Thanks to a wonderful little program called AutoHotkey, you can tweak your keyboard in great ways; what I decided to do was to leverage the largely-unused (but very easy to reach) CapsLock. I basically turned CapsLock into a new meta key (which is not Ctrl, Alt, AltGr, Win or Cmd), allowing me to get a completely blank layer that is independent of any existing key or shortcut. I then associated the most easily-reachable keys to the most common (and hardest to reach with typical layouts) special characters I need.

The result is that, by pressing capslock+<home-row-key>, I now get special characters with less effort and less wandering.

What you see above is the layout I'm currently using. It's not perfect, but the principles are:

  • optimize the position of keys I find least-reachable and most-used on a regular layout
  • privilege right-hand keys, which are the most natural companions to a left-hand meta
  • privilege opening brackets, as editors typically auto-close them
  • try to minimize "wandering" of hands from home-row as much as possible

I've also added a numpad on CapsLock+Shift, which is useful on laptop keyboards. Yes, you often have a hardware NumLock mode, but I never use it because I find it risky (if you mistakenly leave it on and the screen locks, good luck typing your password).

NOTE: the ALT+` combo is a "mac-ism" - it's actually AltGR+` on Windows (or Ctrl+Shift+Alt+`). It's the shortcut to prepend to a vowel to get a grave-accented character. I'm Italian, so I use it to type accents on a US keyboard.

I wish someone would come up with a "standard" meta-layout like this, with some real thought to ergonomics and frequencies; then again, programming languages can vary so much (for example there are lots of $ in Perl, but very few in Python) that I guess it would be difficult to appease everyone.

Here is a AutoHotkey script for QWERTY and AutoHotkey script for COLEMAK (that's actually what I use). If you install AutoHotkey, just save the script as AutoHotkey.ahk in the resulting installation folder and it will be automatically executed when you start the program (it can also be run at startup).

If you are on macOS/OSX, things are a bit more awkward; I might cover that in another post at some point, but my solution there relies on a smart external keyboard. Happy hacking!

12 March 2017

A new Freestyle ...?

A bit of serendipity. Yesterday I noticed that hey, I barely charge my Bluetooth Kinesis Freestyle2 (which I reviewed here) once or twice per year. I duly tweeted about it, and the folks at Kinesis replied saying 4 to 6 months on a single charge is expected, which is awesome.

Then I went to their twitter page to follow their account, and there I discovered that they now have a kickstarter for a new Freestyle model, supposedly built for gamers. This looks awesome, in the sense that it addresses my few issues with the old model: the ability to program and remap keys, real mechanical switches, and backlighting.

It looks like the "first edition" pledges are US-only, but the simple preorders shipping in September are worldwide, so - go support the campaign! I did :)

04 August 2016

CSL Vertical Mouse Review

A couple of weeks ago, I started experiencing a bit of recurring pain in the right forearm. I put it down to a few heavy sessions of MiniMetro, a game where you have to constantly drag & drop between points on the screen; the Magic Trackpad, even rotated in a negative-slope position, was forcing my arm and wrist to do too much work. After a bit of googling, I decided to try a vertical mouse, which should (in theory) keep your arm in a more natural position, and actually move a lot of work from wrist and forearm muscles towards the shoulder and upper arm muscles.

The market for ergonomic devices has always been small, but there's a surprisingly wide choice of vertical mice out there. Unfortunately, a lot of them don't inspire much confidence; some are sold as vertical but actually end up being just fancy-shaped regular mice. The best in class seem to be Evoluent products, which are really vertical and really ergonomic but also really expensive. I wasn't ready to drop almost £100 on something I might not like, so I steered towards cheaper alternatives.

Some of the best reviews on the net pointed towards this fin-shaped CSL wireless mouse, and it was so inexpensive that it wouldn't feel like a waste if I ended up not liking it. The shape makes a bit more sense when you see the SHARKK-branded version - fins, sharks... I honestly don't know which brand came first or which one is more reliable; SHARKK is a US company whereas CSL seems to be based in Germany, but both have a history of distributing and rebranding products by Asian manufacturers, so the original factory is probably the same Shenzhen hangout.

The most annoying element of this mouse is the fact that it does not use Bluetooth, but rather a bog-standard USB wifi dongle. In recent Macs, USB ports are very few and losing one forever is a Big Deal.

The mouse does not require drivers, which is great news for Mac users. It simply appears as a regular HID with 5 buttons: left, right, middle (under the wheel),  and two near the thumb. A sixth button, on top of the fin, is actually the DPI selector, which allows you to change resolution (and hence sensitivity) between three modes: 800, 1200 and 1600 DPI. The selector works fine (just cycles through modes as you click it, with no feedback on screen) but OSX just doesn't "see it" as a regular button, which means you cannot easily re-purpose it once you've set the DPI mode. How often will you need to change mouse sensitivity? An operation so rarely performed doesn't really deserve a large button in such a prime location, but there you go.

The two thumb buttons are supposed to be for browser Back/Forward, but with Firefox they actually trigger the infamous "hold and scroll" widget, so I used BetterTouchTool to remap them with  trackpad gestures I used the most (Mission Control to switch between windows across all apps, and Application ExposĂ© to switch between application-specific windows). I also set middle-click to Launchpad. A little quirk: the mouse built-in powersave settings will switch off the mouse if you don't use it for a few minutes; often you will have to click it or shake it to wake it up. There is no way to disable this behaviour under Mac.

It obviously takes a bit of time to adapt to the vertical position. Movements that would rely on the wrist with a trackpad or horizontal mouse, now require better coordination further up the arm. Wrist movements are set on a different axis (up-down, rather than sideways), but to be honest it's probably best to keep them at a minimum, relying on your arm instead.

After a few days of use, the pain seems to have gone, which is great news. However, I'm not totally convinced about this mouse. It does take some conscious effort to keep my hand in the vertical position, being way too easy to absent-mindedly slip back into a traditional posture; the fin shape will not stop you from doing it. That's probably the reason Evoluent models have steeper shapes.
WRONG! Might as well get a normal mouse then...
Correct position, with vertical wrist.
My hand as a whole also does not feel more relaxed, and the mouse/keyboard switch now seems a bit more tiring, since I have to actually rotate the forearm; I guess I could address that by sloping my keyboard, something I've resisted until now. Still, it's a bit annoying.

In conclusion, the CSL vertical mouse is great value for money: solid build, works flawlessly, cheap as chips. Is it a great vertical mouse though? I'm not so sure. Will I switch to vertical mice for good? Probably not, at this time and with this mouse, but I will revisit this position in a month or two.

22 January 2015

How To Invert Apple Magic Trackpad Orientation

UPDATE 2016-12-18: as suggested by a very helpful comment, Sierra users can get this back with BetterTouchTool. I can confirm that it works: in BTT Preferences, click on the Trackpad icon in upper-right corner, then in General (Tracking Speed etc.) tab, at the bottom, select "Mirror complete Magic Trackpad orientation for "upside-down" usage. BTT is an awesome utility with plenty of other features and constantly adding new ones (I've been using it for a very long time and wasn't even aware they had introduced this option!), and it's incredibly cheap, so you should definitely check it out.

UPDATE 2016-10-01: It's all over, folks - OSX 10.12 "Sierra" officially broke this trick. The only suggestion I have left is to "flatten" the mouse with a book underneath, long enough to give you wrist support.

UPDATE 2015-10-30: Various commenters noted that the following hack doesn't work with Magic Trackpad 2. I cannot verify this; I can only say that the original version I have (model no. A1339) still works the same way with OSX 10.11 "El Capitan".

Over the years, I've grown so fond of OSX trackpad gestures that I couldn't bear the thought of going back to a mouse when I bought my Freestyle2 keyboard. The solution was to buy a Magic Trackpad, which works exactly as expected. However, Jony Ive's people clearly ignored ergonomics when designing this product: in the default configuration, it's just a wrist killer.
I wonder if somebody knew about this, because OSX has a very easy way to turn the trackpad around, in what becomes a much better stance; a negative slope is much kinder on your wrists and hands. So, without further ado, here's how you revert your trackpad:
  1. Disconnect your trackpad, by pressing the power button until the green light goes off.
  2. Type the following command in your Terminal, all on one line: sudo defaults write com.apple.MultitouchSupport ForceAutoOrientation YES
  3. invert your trackpad, turn it on, then place five fingers on it, stretched enough that the device can recognise a hand shape. Congratulations, your trackpad is now inverted.
  4. If you want to go back to the previous orientation, just switch the trackpad off, turn it around, and again place five fingers on it on reconnect.
I suggest adding a padded rest for your wrist, or something to that effect. I'm currently using a couple of CD cases but I'll probably get something softer at some point. Now my wrist feels *much* better, even more relaxed than with a mouse.
Caveat: the trackpad has a significant inactive area where the battery is stored. This means that you have to keep your hand a bit further from the edge than before. It might take a few minutes to adapt, especially if you drag&drop with your thumb as I do. One alternative is to use three-fingers dragging instead, which also works very well.

08 January 2015

Kinesis Freestyle2 Multichannel Bluetooth for Mac - Review

As New Year Resolutions go, improving your ergonomics is an easy one to achieve for most programmers: just buy decent kit (proper chair, table, screen, keyboard, mouse), set it up once, et voilĂ . In this spirit, I've just bought the Kinesis Freestyle2 Multichannel Bluetooth, and this is a short review after just a few hours of usage.

Freestyle2 is the revised model of the (fairly successful) Freestyle keyboard. It's a split Bluetooth keyboard that can actually detach its two halves, so that it can suit your personal ergonomic stance rather than forcing you to adapt to an arbitrary keyboard position. Out of the box, it comes with a pivot tether keeping the halves together, but I personally removed it straight away and it felt immensely liberating.

Obviously, such a keyboard will pay great attention to ergonomics all over. It's flat, but keys are slightly counter-sloped in order to achieve a negative-slope feeling, which is nice. Still, the Freestyle2 is fairly thick, so you'll want to buy the optional padded armrests as well (I originally forgot and can clearly feel the strain - time for a top-up order).

I'm quite happy with overall build quality, including good key switches you don't have to bang onto and never get stuck. The Mac version comes with Command and Option keys in all the right places, and quite a few goodies I've missed since I moved to laptops (Delete, Home, End, PgUp, PgDwn). I'll likely need a few weeks to get fully used to a regular keyboard again, after two years exclusively spent on a MacBook, but that would have been inevitable with any keyboard.

I'm not entirely sold on the huge Esc key being so far away from the main rows, but if it's the price to pay for a big Delete just above regular Backspace, so be it; I'm not a big Vi user anyway! ;-) Note: the "Multichannel for Mac" version of the Freestyle2 is only available in US layout at the moment; this said, if you switch to UK layout in OSX, the keyboard will happily give you UK characters where they're supposed to be (except for slash, which is physically in a different place), so if you're not a "hunt & peck" person, you should have little trouble adapting. Considering the split layout, I wouldn't recommend this keyboard to any H&P friend anyway.

The multichannel concept is intriguing, and works smoothly. Basically, you can pair the keyboard to 3 different computers/phones/tablets, and switch between them as necessary. Getting a text message on your Android phone while you're working on your laptop? Just hit Fn-2 or Fn-3 to respond. Having several laptops (like me)? Just switch between them as necessary without having to buy a cumbersome KVM setup. I tested it switching between MBP and iPhone 5, and it worked great. This is seriously cool, now I wish I had a mouse/trackpad that could do it as well.

Talking of trackpads, there is a really nice coincidence: if you get an Apple Magic Trackpad, like I did, and put a simple cd case underneath to even it out (seriously, Apple: who thought sloping it was a good idea?), you'll find that trackpad surface sits perfectly even to the Freestyle2. If this effect was achieved on purpose, well done Kinesis! It makes it really easy to transition from keyboard to trackpad.

The only real "wtf moment" I had was that the key assigned to Mission Control seems to actually return F12. This is probably the result of some hackery I did in the past on my laptop, but I haven't been able to track it down yet. It's not a big deal anyway: I bought a trackpad exactly so that I could keep using gestures for this sort of activity.

Last and probably least, the Freestyle2 features two additional key columns on the left-hand side, predefined for some supposedly-common actions: "back" and "forward" in browsers, "go to" beginning or end of the line, Cut/Copy/Paste, Undo, and Select All. In truth, I can see how Kinesis really needed just one column (for Fn and 1/2/3 switches to change channel); the second was probably added to get better symmetry with the right half of the keyboard. These keys would be more useful if they could be remapped, which can probably be achieved with some hackery but is not officially supported by Kinesis. "Forward" in particular seem particularly wasted -- there is a reason most browsers only emphasise Back these days.

Setup was easy, but make sure you read the instructions properly; I initially failed to notice that you have to explicitly select the channel before pairing, and overwrote my initial pairing a couple of times. It would be nice if the Freestyle2 were smart enough to default to a "free" channel when pairing, but it's a minor feature that you'll likely use only the first time you connect the keyboard anyway. Btw, make sure you download those instructions, because they are not actually included in the box.

If you'd like to buy a Freestyle2 and you are in the US, you can just order it from the Kinesis website (remember armrests!). I got mine in the UK thanks to official distributor Osmond Ergonomics, which very kindly got in touch as soon as I tweeted (between Christmas and New Year's Eve) and notified me when they received some stock -- they should have Multichannel models available on their webstore in a week or two; in the meantime just get in touch directly and they'll be happy to oblige (BTW, if you don't care about Multichannel features, you can order a regular Freestyle2 on the website right now).