topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday April 18, 2024, 12:55 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: SOLVED: Chorded shortcuts for RSI prevention  (Read 6371 times)

phiu

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
SOLVED: Chorded shortcuts for RSI prevention
« on: August 15, 2010, 11:13 AM »
Hi everybody,

I have been a more or less avid AHK user for some time now.
I have been using it mainly to alleviate my RSI (mapping Alt-Tab to Pause, etc.)

However, my goal is to be able to hit a specified button, e.g. F12, and then be able to type in a two letter combination like gw to perform a specific action.

Example:

1. Hit F12
2. Type in gw (no need to press the Enter key)
3. Firefox opens a new tab, Wikipedia is selected as the search plugin and all I have to do is enter a term and press Enter. [The macro for this would be written by me. I only need a framework to perform steps 1-2.]

In essence, something similar to that:
http://stackoverflow.com/questions/200587/how-can-i-mimic-visual-studios-ctrl-k-c-two-step-macro-behaviour-using-autoit.

Only difference would be that macro mode can only be exited by command ex and that a two letter combination is accepted.

Any idea on how to accomplish this?

Extra points if there is an easy way to add my own commands.

Thanks very much in advance and kind regards,

phiu
« Last Edit: August 15, 2010, 11:16 AM by phiu »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: Chorded shortcuts for RSI prevention
« Reply #1 on: August 15, 2010, 12:50 PM »
By chance, have you checked out FARR by our very own mouser?  To do a Wikipedia search, I do this:

1) Press the Pause key to invoke FARR.
2) Type:  wiki <search term>
3) Press the Enter key.

Would a routine like that suffice?
« Last Edit: August 15, 2010, 12:51 PM by skwire »

phiu

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Chorded shortcuts for RSI prevention
« Reply #2 on: August 15, 2010, 01:54 PM »
Yes, I've checked out FARR and use it daily.

The thing is that I want to limit the # of keypresses, i.e. I do not want to hit Enter.

The wikipedia search was just an example.
« Last Edit: August 15, 2010, 01:56 PM by phiu »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Chorded shortcuts for RSI prevention
« Reply #3 on: August 15, 2010, 02:40 PM »
The thing is that I want to limit the # of keypresses, i.e. I do not want to hit Enter.

if you are already using farr, let me just mention that you can create your own aliases that don't require you to hit enter, see this thread for details: https://www.donation...ex.php?topic=18620.0

phiu

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Chorded shortcuts for RSI prevention
« Reply #4 on: August 17, 2010, 10:33 AM »
mouser:
Thanks that works great and just as intented. Only problem is that this somehow limits the normal functions.
I.e.: I have set up an alias ma to perform some action. But now I can no longer search for items beginning with ma.
Would it be possible to somehow activate dolaunch aliases only, if a certain hotkey is pressed to launch FARR?
Maybe in the Hotkey configuration dialog?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Chorded shortcuts for RSI prevention
« Reply #5 on: August 17, 2010, 11:00 AM »
the traditional thing to do would be to use an alias name you dont use as a prefix for any search, like
zma
instead of something common like ma.

but if you are willing to use a different hotkey to show farr, you can make a new hotkey and tell it to start the search text with something already in it, like "auto_", which would mean you could create aliases like "auto_ma" and then just hit the special hotkey and then type ma.

does that make sense?

phiu

  • Supporting Member
  • Joined in 2010
  • **
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Chorded shortcuts for RSI prevention
« Reply #6 on: August 17, 2010, 12:14 PM »
Splendid!
Thank you very much - that's it! :Thmbsup: