Use it

Press control, then option, then a letter key or the space bar to get
the equivalent of pressing the return key. Alternately, the key can be
pressed before the control key, followed by a letter key. Both the
option key and the control key must be pressed and held down before
pressing the letter key. They can be released in any order.

History

Many times I have had my right hand on the mouse and it was
inconvenient to mouse over to a default dialog box button to click
?OK?. So the choices are either to take my right hand off the mouse
and hit return or enter or to move my left hand from the left side of
the keyboard over to the return key. I find that none of these choices
is convenient and have wished for a return key on the left side of the
keyboard. So I decided to write up a little INIT (oops -- old time Mac
person talking there -- an extension ) that would simulate the return
key with some other key combination that was convenient to my left
hand. I figured that control+option would be the most obvious and
least likely to interfere with some other already-used key
combination. So a little bit of evening hacking and Left Return was
born.

Technical Stuff

It turns out that there is a teeny tiny little problem. Rather than
patches and other ugly and otherwise prone-to-cause-problems methods,
I chose to insert a little bit of code into the event filter path.
Basically, this code gets called every time there is an event, such as
a mouse down or keypress. Apple provides a nice spot in low memory to
insert a vector to my code so that it gets executed every time there
is an event posted by the Mac OS. This gives me an opportunity to look
at the event and just pass it back to the OS if it doesn?t meet my
criteria, or do something if it does. That?s all well and good except
for one small detail. Certain keys on the Mac keyboard are considered
to be ?dead? keys. They don?t generate an event when they are pressed.
Some of these keys are shift, control, option and the Command key.
Just so happens that both of the keys I chose are dead keys, so
pressing them, even both of them together, does not cause an event to
be generated. So we punt. If you press control and option and any non-
dead key (all at the same time) then my code sees an event and checks
to see if both the control and option key are pressed. If they are, my
code puts a return code in the event record and passes it on to the
operating system. This fools the operating system into thinking that
the return key was pressed. This works just about anywhere, even in a
word processor or any time that it would be appropriate to press the
return key. There are some applications that put their own code into
the event filter path, so they might get to the event before my code
does. If they play nice, they pass the event along to the next piece
of code. If not, they might glom onto the event and keep it selfishly
to themselves so my code never sees it. Not very likely, but possible.
In other words, Left Return may not work in all situations. That?s
called a disclaimer, folks.

DL #1 Left Return v1.0

Compatibility
Architecture: 68k