DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: SOLVED: Chorded shortcuts for RSI prevention  (Read 9,126 times)

phiu

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 4
SOLVED: Chorded shortcuts for RSI prevention
« on: August 15, 2010, 04:13 PM »
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, 04:16 PM by phiu »

skwire

  • I eat Coding Snacks for breakfast...
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,297
    • Participated in NANY Challenge Seventeen Times
    • Coding Snacks
    • Superboy Coder
    • Cody Award
    • Volunteers/Staff
    • Gathering Badge
Re: Chorded shortcuts for RSI prevention
« Reply #1 on: August 15, 2010, 05: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, 05:51 PM by skwire »

phiu

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 4
Re: Chorded shortcuts for RSI prevention
« Reply #2 on: August 15, 2010, 06: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, 06:56 PM by phiu »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Chorded shortcuts for RSI prevention
« Reply #3 on: August 15, 2010, 07:40 PM »
Quote
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: http://www.donationcoder.com/forum/index.php?topic=18620.0

phiu

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 4
Re: Chorded shortcuts for RSI prevention
« Reply #4 on: August 17, 2010, 03:33 PM »
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,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Chorded shortcuts for RSI prevention
« Reply #5 on: August 17, 2010, 04:00 PM »
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
  • **
  • Posts: 4
Re: Chorded shortcuts for RSI prevention
« Reply #6 on: August 17, 2010, 05:14 PM »
Splendid!
Thank you very much - that's it! :Thmbsup:

Original address: https://www.donationcoder.com/forum/index.php?topic=23741.0