AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Awesome Hotkey combination.

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  

Does this interest you.
Very much
27%
 27%  [ 3 ]
Yes
0%
 0%  [ 0 ]
Somewhat
18%
 18%  [ 2 ]
Not really
18%
 18%  [ 2 ]
No
36%
 36%  [ 4 ]
Total Votes : 11

Author Message
Deller



Joined: 21 Nov 2007
Posts: 209
Location: 0x01101110

PostPosted: Wed Apr 23, 2008 5:34 pm    Post subject: Awesome Hotkey combination. Reply with quote

This is not a script or function but an idea that i think people may be interested in.

I have thought of a really accesible hotkey.

Code:
Lbutton & {any key}::do anything


As silly as this seems to have a mouse hotkey, it is amazingly useful.
Think of how many times you would press the mouse at the same time as a key...............................................NEVER except for a game where you wouldnt use this hotkey anyway.
Back to top
View user's profile Send private message
Guest






PostPosted: Thu Apr 24, 2008 8:52 am    Post subject: Reply with quote

Interesting, though it may be uncomfortable to use the mouse and the keyboard at the same time.

You may be interested in this topic with an even more accessible hotkey where you don't even need the mouse: http://www.autohotkey.com/forum/viewtopic.php?p=190200
Back to top
nli - MsgBox
Guest





PostPosted: Thu Apr 24, 2008 10:38 am    Post subject: Reply with quote

Hi Deller

I've been using mouse/keyboard combinations for a long time and couldn't do without them now!! Smile
This combination is very useful for any task involving text selection ie. select text with mouse, keep the button pressed and then press C (copy), V (paste)....etc.

This is what I use:
Code:
;;::*** Text Editing ***
LButton & C::                   ;; Copy selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{c up}^c
Return

LButton & V::                   ;; Paste selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{v up}^v
Return

LButton & X::                   ;; Cut selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{x up}^x
Return

LButton & Z::                   ;; Undo last action.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{z up}^z
Return


I've just bought a laptop (with no mouse), and the script still works using the touch-pad (doubletap-hold-C).

Quote:
As silly as this seems to have a mouse hotkey
Naa!! Smile
Back to top
mai9



Joined: 18 Mar 2008
Posts: 26
Location: Barcelona, Catalonia

PostPosted: Thu Apr 24, 2008 2:28 pm    Post subject: Reply with quote

nli - MsgBox wrote:

This is what I use:

I tried your code and when runing it doesn't allow me to single click!

That's it, simple as that. I can't click anywhere. I click and nothing happens.

It's very strange. It may be because of the mouse driver? I have a Genius NetScroll.
Back to top
View user's profile Send private message
airjrdn



Joined: 25 Feb 2008
Posts: 35

PostPosted: Thu Apr 24, 2008 3:00 pm    Post subject: Reply with quote

mai9 wrote:
nli - MsgBox wrote:

This is what I use:

I tried your code and when runing it doesn't allow me to single click!

That's it, simple as that. I can't click anywhere. I click and nothing happens.

It's very strange. It may be because of the mouse driver? I have a Genius NetScroll.


Put a tilda in front of it:

~Lbutton & c::msgbox "hello"
Back to top
View user's profile Send private message
nli - msgbox
Guest





PostPosted: Thu Apr 24, 2008 3:05 pm    Post subject: Reply with quote

mai9 wrote:
nli - MsgBox wrote:

This is what I use:

I tried your code and when runing it doesn't allow me to single click!

That's it, simple as that. I can't click anywhere. I click and nothing happens.

It's very strange. It may be because of the mouse driver? I have a Genius NetScroll.

Sorry mai9 Sad
The example above was taken from my main script where there are other LButton hotkeys above it. You need to add a ~ to the first hotkey ie ~LButton. That should work, if not, add the tide mark to all the hotkeys.
Back to top
Deller



Joined: 21 Nov 2007
Posts: 209
Location: 0x01101110

PostPosted: Thu Apr 24, 2008 11:33 pm    Post subject: Reply with quote

nli - MsgBox wrote:
Hi Deller

I've been using mouse/keyboard combinations for a long time and couldn't do without them now!! Smile
This combination is very useful for any task involving text selection ie. select text with mouse, keep the button pressed and then press C (copy), V (paste)....etc.

This is what I use:
Code:
;;::*** Text Editing ***
LButton & C::                   ;; Copy selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{c up}^c
Return

LButton & V::                   ;; Paste selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{v up}^v
Return

LButton & X::                   ;; Cut selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{x up}^x
Return

LButton & Z::                   ;; Undo last action.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{z up}^z
Return


I've just bought a laptop (with no mouse), and the script still works using the touch-pad (doubletap-hold-C).

Quote:
As silly as this seems to have a mouse hotkey
Naa!! Smile


I find it more useful to have then launch apps but thats also a really good use for them.
Laughing
Back to top
View user's profile Send private message
mai9



Joined: 18 Mar 2008
Posts: 26
Location: Barcelona, Catalonia

PostPosted: Thu Apr 24, 2008 11:45 pm    Post subject: Reply with quote

thanks to the ~ I could make the "msgbox hello" work, but I can't cut/copy/paste/undo no matter all LButtons have tildes or only the first. What else I could be doing wrong.... Neutral
Back to top
View user's profile Send private message
airjrdn



Joined: 25 Feb 2008
Posts: 35

PostPosted: Fri Apr 25, 2008 1:15 am    Post subject: Reply with quote

Paste your code so we can see it.
Back to top
View user's profile Send private message
Deller



Joined: 21 Nov 2007
Posts: 209
Location: 0x01101110

PostPosted: Fri Apr 25, 2008 1:17 am    Post subject: Reply with quote

i like to have mine with functions

Code:

~LButton::gosub, on
~LButton Up::gosub, off
return

on:
Hotkey, f, f, on
Hotkey, t, t, on
Hotkey, c, c, on
Hotkey, g, g, on
Hotkey, p, p, on
Hotkey, d, d, on
Hotkey, a, a, on
return


off:
Hotkey, f, f, off
Hotkey, t, t, off
Hotkey, c, c, off
Hotkey, g, g, off
Hotkey, p, p, off
Hotkey, d, d, off
Hotkey, a, a, off
return

f:
Run, C:\Program Files\Mozilla Firefox\firefox.exe
return

t:
Run, E:\
return

c:
Run, cmd
return

g:
Run, C:\Documents and Settings\USER\Desktop\Gadgets
return

p:
Run,C:\Program Files\Corel\Corel Graphics 12\Programs\CorelPP
return

d:
Run,C:\Documents and Settings\USER\My Documents
return

a:
Run, C:\Program Files\PSPad editor\PSPad.exe
return
Back to top
View user's profile Send private message
pockinator



Joined: 06 Dec 2007
Posts: 33

PostPosted: Fri Apr 25, 2008 2:04 pm    Post subject: Reply with quote

Deller wrote:
i like to have mine with functions

Code:

~LButton::gosub, on
~LButton Up::gosub, off
return

on:
Hotkey, f, f, on
Hotkey, t, t, on
Hotkey, c, c, on
Hotkey, g, g, on
Hotkey, p, p, on
Hotkey, d, d, on
Hotkey, a, a, on
return


off:
Hotkey, f, f, off
Hotkey, t, t, off
Hotkey, c, c, off
Hotkey, g, g, off
Hotkey, p, p, off
Hotkey, d, d, off
Hotkey, a, a, off
return

f:
Run, C:\Program Files\Mozilla Firefox\firefox.exe
return

t:
Run, E:\
return

c:
Run, cmd
return

g:
Run, C:\Documents and Settings\USER\Desktop\Gadgets
return

p:
Run,C:\Program Files\Corel\Corel Graphics 12\Programs\CorelPP
return

d:
Run,C:\Documents and Settings\USER\My Documents
return

a:
Run, C:\Program Files\PSPad editor\PSPad.exe
return


Hi Deller,
I really like the way that you coded those hotkeys. I've never thought of doing it like this myself; I'll be sure to include this method with other non-standard modifiers in my scripts. Thanks! Very Happy
Back to top
View user's profile Send private message
mai9



Joined: 18 Mar 2008
Posts: 26
Location: Barcelona, Catalonia

PostPosted: Sun Apr 27, 2008 2:48 pm    Post subject: Reply with quote

airjrdn wrote:
Paste your code so we can see it.


it's the same as posted above, but here you are:

Code:
;;::*** Text Editing ***
~LButton & C::                   ;; Copy selected text.
;;msgbox "hello"
If GetKeyState ("LButton", "P")
   Send {LButton Up}{c up}^c
Return

LButton & V::                   ;; Paste selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{v up}^v
Return

LButton & X::                   ;; Cut selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{x up}^x
Return

LButton & Z::                   ;; Undo last action.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{z up}^z
Return


Last edited by mai9 on Sun Apr 27, 2008 2:51 pm; edited 2 times in total
Back to top
View user's profile Send private message
airjrdn



Joined: 25 Feb 2008
Posts: 35

PostPosted: Sun Apr 27, 2008 2:50 pm    Post subject: Reply with quote

You need the tilda in each one, not just the first one.
Back to top
View user's profile Send private message
mai9



Joined: 18 Mar 2008
Posts: 26
Location: Barcelona, Catalonia

PostPosted: Sun Apr 27, 2008 2:54 pm    Post subject: Reply with quote

mai9 wrote:
thanks to the ~ I could make the "msgbox hello" work, but I can't cut/copy/paste/undo no matter all LButtons have tildes or only the first. What else I could be doing wrong.... Neutral

As I said above I already tried that!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group