Tag Archives: natural

Windows Natural Scrolling and Synergy

Windows Natural Scrolling and Synergy

A lit­tle over a year ago, I wrote about set­ting up “nat­ural scolling” on Windows. I tried it for a week or so and never quite got used to it. One of the biggest set­backs was the soft­ware I use to con­nect my Windows and Linux boxes together as one large desk­top: Synergy. My mouse and key­board are hooked up to a Windows box. When the mouse scrolls off the left side of the screen, Synergy takes over and passes the mouse move­ments and key­board sequences to the Linux box’s desk­top. I get what feels like a large, sweep­ing, cross-OS desk­top. It turns out that the AutoHotkey map­pings to reverse the scroll wheel did not get trans­mit­ted across to Synergy. They only worked on one half of my desk­top. This is not just annoy­ing, but really messes with your mus­cle mem­ory of which way to scroll.

I recently heard John Siracusa men­tion in a recent episode of Hypercritical that he is right-handed, but uses the mouse with his left hand. He switched mouse-handedness long ago because he started to feel the begin­nings of ten­dini­tis and/or carpal-tunnel syn­drome in his right arm and didn’t want to see it worsen. Because I’ve been feel­ing ten­dini­tis come and go, despite breaks and exer­cises, I thought I would try some­thing sim­i­lar. I feel that the major­ity of my dis­com­fort comes from scrolling so I thought I would try using my left hand for the major­ity of scrolling and sim­ple move­ments. I hap­pen to have a spare Apple Magic Trackpad, which I brought into work and hooked up. I set it up to the left of my key­board, but am keep­ing the mouse to the right. The track­pad is okay for point­ing, scrolling, and click­ing. Dragging and right-clicking are much more dif­fi­cult (at least with the Windows dri­vers). For me, those are much more rare oper­a­tions than scrolling and select­ing — I mainly nav­i­gate spec­i­fi­ca­tion doc­u­ments and code trees — so the mouse is still avail­able on the right.

I ini­tially tried this for a day and it mostly worked, except for scrolling. I’m so used to touch-scrolling on my Mac that the reg­u­lar (non-natural? unnat­ural?) track­pad scrolling kept throw­ing me for a loop. AutoHotkey still did not work across Synergy. A lit­tle more research was required.

The key to get­ting this work­ing and usable was dis­cov­er­ing how to reverse scrolling down at the OS level, rather than up in the appli­ca­tion layer (as AutoHotkey does). There are actu­ally just some reg­istry keys to tog­gle in HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Enum/HID that will reverse scroll-direction at a layer deeper than AutoHotkey and deeper than Synergy. I ran across this blog post that explains how to find the “FlipFlopWheel” keys within the above-mentioned HID path and tog­gle them. This isn’t the solu­tion for every­one — regedit can be a scary and dan­ger­ous tool in the hands of the unini­ti­ated — but it worked for me.

I now have a left-handed track­pad set up with nat­ural scrolling for day-to-day nav­i­ga­tion and a right-handed mouse set up for more tricky oper­a­tions. So far, things are good.

Posted in: Code Dear Diary Software Work

os_x_lion_natural_gestures

Natural” scrolling across operating systems

Natural” Scrolling Overview

I am begin­ning to get used to the reversed scrolling behav­ior in the new OS X. For those that have not heard about it, this was one of the most con­tro­ver­sial changes in the new oper­at­ing sys­tem. They reversed the direc­tion of the action that is per­formed by spin­ning the mouse’s scroll wheel or using two fin­gers to scroll on a touch­pad. There have been a lot of heated debates on both sides of the fence.

If you think about it, the scroll wheel action is fairly arbi­trary. It was:

  • scroll the wheel down, the slider in the win­dow that marks your posi­tion moves down­ward (to match your fin­ger move­ment), the text of your doc­u­ment slides up, you reveal more text at the bot­tom edge of the win­dow.

It is now:

  • scroll the wheel down, the slider in the win­dow that marks your posi­tion moves upward, the text of your doc­u­ment slides down (to match your fin­ger move­ment), you reveal more text at the top edge of the win­dow.

In other words, the move­ment switched from manip­u­lat­ing the win­dow slider to manip­u­lat­ing the doc­u­ment itself. You might argue that it is a lit­tle more direct now — instead of manip­u­lat­ing the slider that manip­u­lates your posi­tion in the doc­u­ment, you are directly manip­u­lat­ing the doc­u­ment. You might argue that, at least for touch-based track­pad sys­tems (not mice, per se), the action is more iPhone-like. You might also argue that as a soci­ety we now have a cul­ture muscle-memory of how the scroll wheel works and chang­ing it would be akin to swap­ping the posi­tion of the gas and brake ped­als on a car or (less dan­ger­ous) build­ing ana­log clocks whose hands spun counter-clockwise.

I fig­ured I would at least give it a try, but had to jump in with both feet. That meant leav­ing the new default OS X reversed (“nat­ural”) scrolling, but that also meant hack­ing my Windows and Linux boxes to behave sim­i­larly — oth­er­wise, I found myself get­ting stuck in a limbo of not know­ing which direc­tion the scroller worked at any given time, hes­i­tat­ing with a lit­tle test nudge to ensure it was going to work the way I thought.

Windows

For me, the Windows hack was pretty easy. I already run AutoHotkey for a few key­board short­cuts. AutoHotkey is an app that inter­cepts key­presses and mouse clicks and lets you trans­form them to other actions. I have a few macros set up (sim­i­lar to TextExpander on the Mac) that lets me type an abbre­vi­a­tion, which gets expanded to a hard-to-enter uni­code char­ac­ter, pre-canned text, or snip­pet of code. I also have a key­stroke that auto­mat­i­cally opens the selected file in Notepad++. I just had to paste a few lines into my con­fig­u­ra­tion file, and it inter­cepts the up-scroll and passes it to the sys­tem as a down-scroll and vice-versa. Specifically, it looks a lit­tle some­thing like this:

; Reverse mouse wheel to be more like OS X
WheelUp::
    Send {WheelDown}
Return

WheelDown::
    Send {WheelUp}
Return

Linux

Under Linux, I had to edit my Xorg con­fig­u­ra­tion file. I opened /etc/X11/xorg.conf in a text edi­tor and looked for the ‘Section “InputDevice“‘ block that cor­re­sponded to the mouse. I then had to change (or add, if it was not already there) the “Option ZAxisMapping” to the fol­low­ing:

Option "ZAxisMapping" "5 4"

This works with a mouse locally plugged into the sys­tem. I still have a prob­lem when the key­board and mouse are remotely con­nected via Synergy in that the mouse scolling does not get trans­lated. I am not sure whether that is the server (on Windows) bypass­ing the AutoHotkey and/or the client (on Linux) side-stepping the Xorg con­fig­u­ra­tion. It may be both, since if I con­fig­ure only one or the other with a reversed mouse, there is no change to the behav­ior. I’d expect a change if one was revers­ing it and the other was un-reversing.

So aside from via Synergy, it’s all work­ing and I am doing a good job at adapt­ing, though I fear the day that I sit down at a coworker’s com­puter and get tripped up because their mouse wheel works “back­wards.”

Posted in: Software

Regurgitating an Interesting Article

Please note that all blog posts before 8 April 2007 were auto­mat­i­cally imported from LiveJournal.  To see the com­ments and any LiveJournal-specific extras such as polls and user icons, please find the source post­ing at http://brianenigma.livejournal.com/2005/12/

I am feel­ing much less sick now. Plus, I have enough chicken soup to drown a baby (or bap­tize a baby, depend­ing on your inten­tions.)

Why McDonald's Fries Taste So Good is an arti­cle (linked from Digg) which was used in Fast Food Nation. It describes a lit­tle bit of the his­tory of their fries, but mostly focuses on the chem­i­cal indus­try of fla­vors, scents, and col­ors. Originally, the fries were well received because they were cooked in over 90% beef tal­low. They switched to veg­etable oil in '90, but had to make up for the fla­vor. Legally, they just have to say that it con­tains a “nat­ural fla­vor,” but they have admit­ted that part of that fla­vor comes from an ani­mal source. I have known many veg­e­tar­i­ans in the past that have had no prob­lem eat­ing the fries. I guess it all depends on your def­i­n­i­tion or rea­sons for being veg­e­tar­ian. Due to the potency of these kinds of things, the ani­mal prod­uct has to be a minus­cule amount — maybe one part per bil­lion (the exam­ple they gave was that one drop of fla­vor was enough for five swim­ming pools.) It does not mat­ter one way or the other to me — I just do not like the taste of their fries.

Surprising fact: on aver­age, Americans now eat about four serv­ings of french fries every week. Who are these aver­age Americans? Most peo­ple I know have fries less than once a month, although a few might have them as much as once a week.

Carmine/Carminic Acid/Cohineal Extract is made from des­ic­cated bug bod­ies. 70,000 of the Dactylopius Coccus Costa, a small insect from Peru that eats red cac­tus berries, get used to make a pound of pink dye. Think about that next time you have a Dannon straw­berry yogurt or Ocean Spray pink grape­fruit juice. Again, it is parts per bil­lion, but still...

The “nat­ural” vs. “arti­fi­cial” flavor/color des­ig­na­tion is entirely arbi­trary. For some rea­son, I thought nat­ural was bet­ter (as do many peo­ple out there), but the same chem­i­cal can be either nat­ural or arti­fi­cial depend­ing on how it was syn­the­sized. Actually tak­ing a banana and leech­ing out chem­i­cals from it (by using other chem­i­cals) is nat­ural. Creating the same exact chem­i­cals by mix­ing things in test-tubes is arti­fi­cial. Chemically, they are both the same thing, but one is cheaper because you do not need real bananas.

Posted in: Dear Diary Food