mouse gestures, keyboard shortcut, remapping, Alt-F4

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Post Reply
asdf-asdf
New User
Posts: 8
Joined: Mon Feb 14, 2011 3:27 am

mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by asdf-asdf »

Is it possible to use mouse gestures in X-Mouse? I want to have something activate the Alt F4 Program Close command. I'm already using all the mouse buttons in X-Mouse I can for other more important things.

If not, is there another mouse program that has system wide mouse gestures? I can't use the Kensington driver because its not 64 bit.

And is it possible to change the very awkward keyboard shortcut Alt F4 (for Program Close) to something like the very easy to type Alt Q? Does anyone know if Alt Q is used for anything? I haven't found anything yet but I haven't looked into this much. And how does one go about remapping a 2-key system wide shortcut? Can I do it in the Registry somehow? Most keymapping programs I've looked at just map single keys. Keystrokes are usually for individual programs. I open and close programs a LOT each day - hence my query here. Whoever dreamed up Alt F4 must have had rocks in their head. As a pianist I can attest to the fact it is an extremely awkward shortcut. All your shortcuts should be able to be done easily without strain with your non-mouse hand. Why take your hand off the mouse to perform something unnecessarily? Makes no sense. For most of us that means the left hand. Alt 1 could be used too I guess. Alt Esc might be good too though thats a bit of a reach. Alt Q is just perfect. When you do something hundreds of times a day - it should be VERY convenient.
User avatar
phil
Site Admin
Posts: 7670
Joined: Sun Apr 06, 2003 11:12 pm

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by phil »

Hi,

Firstly XMBC can not do gestures yet. Its on the todo list but it has been for years - and I've no idea when it will get done - its a lot of big changes gui and functionally that I don't have much time to spend on. However as the todo list gets shorter, the chances are higher that I will look at it one day.

I don't know about another app to do mouse gestures generically.globally - I havn't not used one (or looked) - but maybe someone else here does. If not, google might help?

Secondly, XMBC does not do remapping of keys, so I guess you might want to look at autohotkey or something that might allow you to remap ALT+F4 or assign the same action to another hotkey like ALT-Q.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9/G604/M720/MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)
MainTrane
Dedicated
Posts: 90
Joined: Wed Jan 26, 2011 12:47 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by MainTrane »

Use StrokeIt. It's freeware and a very popular/feature-rich mouse gesture program.
As far as remapping hotkeys,

Changing Alt-Q to Alt-F4

Code: Select all

!Q::
Send !{F4}
or something similar, will work through autohotkey.
 
  • Beta Tester ‖ Global Moderator
    Logitech [ G700 | G500 | MX1100 ᵛ¹ ᵛ² ]
    Windows 7 Professional 64-bit (6.1, Build 7601)
    Intel Core i7-960 @ 3.85GHz
    18GB (3x4GB+3x2GB) RAM
    DirectX 11
    NVIDIA GeForce 9800 GT
[/size]
asdf-asdf
New User
Posts: 8
Joined: Mon Feb 14, 2011 3:27 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by asdf-asdf »

MainTrane wrote:Use StrokeIt. It's freeware and a very popular/feature-rich mouse gesture program.
As far as remapping hotkeys,

Changing Alt-Q to Alt-F4

Code: Select all

!Q::
Send !{F4}
or something similar, will work through autohotkey.
--------
Got Strokeit but I must be doing something wrong. In Global Actions, Close Window (C), highlighted Alt+F4, then inserted Alt+Q in the Hotkey windows. Nothing. I noticed there is no Save button or OK button in my windows.
Any ideas? Is it XP 64bit compatible?
MainTrane
Dedicated
Posts: 90
Joined: Wed Jan 26, 2011 12:47 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by MainTrane »

Sorry asdf, my wording wasn't clear enough.
The code I posted above is for AutoHotkey not StrokeIt. StrokeIt is just for mouse gestures, it won't remap your keyboard.

After installing AutoHotkey, create a blank text document and paste the code I posted into it. Save with the extension AHK, then run the file.
 
  • Beta Tester ‖ Global Moderator
    Logitech [ G700 | G500 | MX1100 ᵛ¹ ᵛ² ]
    Windows 7 Professional 64-bit (6.1, Build 7601)
    Intel Core i7-960 @ 3.85GHz
    18GB (3x4GB+3x2GB) RAM
    DirectX 11
    NVIDIA GeForce 9800 GT
[/size]
asdf-asdf
New User
Posts: 8
Joined: Mon Feb 14, 2011 3:27 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by asdf-asdf »

It seems to be working. Many thanks. But when I use Alt_Q a blank Notepad window is created. Any idea why? (Alt Q is such an easy to type shortcut!)
MainTrane
Dedicated
Posts: 90
Joined: Wed Jan 26, 2011 12:47 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by MainTrane »

I don't understand.
What window are you in when you get a blank notepad by pressing the Alt-Q shortcut?
How are you pressing it (ex. on your keyboard, assigned mouse keystroke)?

Did you paste the exact code?

Code: Select all

!Q::
Send !{F4}
Just click Select All in the CODE box above, then copy and paste it into notepad.
Make sure the 'save as type' box is set to 'All Files' not 'Text Document' or Windows will attach the .txt extension. Save as YOURFILENAMEHERE.ahk - the resulting file should have the AutoHotkey 'H' icon not the standard text document icon.
Run the file and you will see a green H icon in the notification area, telling you the script is active.

Now press Alt-Q over a window you want to close :) .
 
  • Beta Tester ‖ Global Moderator
    Logitech [ G700 | G500 | MX1100 ᵛ¹ ᵛ² ]
    Windows 7 Professional 64-bit (6.1, Build 7601)
    Intel Core i7-960 @ 3.85GHz
    18GB (3x4GB+3x2GB) RAM
    DirectX 11
    NVIDIA GeForce 9800 GT
[/size]
asdf-asdf
New User
Posts: 8
Joined: Mon Feb 14, 2011 3:27 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by asdf-asdf »

I thought I replied yesterday but it didn't show up.
Anyway I wanted to thank you for the AutoHotKey tip. It works great. The only question I had was that I was wondering why a blank Notepad window pops up when this shortcut is used? Its underneath all my other windows so it doesn't make much difference but I thought that seemed a little odd.
asdf-asdf
New User
Posts: 8
Joined: Mon Feb 14, 2011 3:27 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by asdf-asdf »

OK - now my reply and your reply is showing up....lol.
--------------
> What window are you in when you get a blank notepad by pressing the Alt-Q shortcut?

In any program. As soon as I close the program using Alt-Q the blank Notepad window pops up. I thought it stayed underneath the other windows but I was mistaken. It pops up on top each time I use the Alt-Q keyboard shortcut.

> How are you pressing it (ex. on your keyboard, assigned mouse keystroke)?

Keyboard. Using a Microsoft keyboard with the latest Intellipoint software.

> Did you paste the exact code?
Code: Select all
!Q::
Send !{F4}

Yes. Probably why it works perfectly....:)

> Just click Select All in the CODE box above, then copy and paste it into notepad.
Make sure the 'save as type' box is set to 'All Files' not 'Text Document' or Windows will attach the .txt extension. Save as YOURFILENAMEHERE.ahk - the resulting file should have the AutoHotkey 'H' icon not the standard text document icon.

Ah...I saved it as an .ahk file but it was a text document. That's probably the problem.

Run the file and you will see a green H icon in the notification area, telling you the script is active.

I do see the H icon in the Systray. I'll try again. :)
asdf-asdf
New User
Posts: 8
Joined: Mon Feb 14, 2011 3:27 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by asdf-asdf »

Still the same. I did notice your original post said "Change Alt-Q to Alt-F4". I just wanted to clarify that was accurate. I'm changing the default Alt-F4 (Close Program) shortcut to Alt-Q.
Another question: Where is the "Alt" in that script? It looks like I'm just dealing with Q and F4.
For what its worth....F4 does work fine on its own.
MainTrane
Dedicated
Posts: 90
Joined: Wed Jan 26, 2011 12:47 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by MainTrane »

An exclamation mark (!) represents the Alt key in AutoHotkey's scripting language.

You are altering the Alt-Q hotkey to perform Alt-F4 not the other way around, I don't what else to say :( .

I followed my exact instructions, given to you, before posting on this topic.  With the script running, pressing Alt-Q on my keyboard closes the active window. Notepad is not launched when i run the script or execute the shortcut command Alt-Q.

I'm thinking you could have a mixed up file association on your system.  Please check to make sure that notepad is not associated with AHK files.
 
  • Beta Tester ‖ Global Moderator
    Logitech [ G700 | G500 | MX1100 ᵛ¹ ᵛ² ]
    Windows 7 Professional 64-bit (6.1, Build 7601)
    Intel Core i7-960 @ 3.85GHz
    18GB (3x4GB+3x2GB) RAM
    DirectX 11
    NVIDIA GeForce 9800 GT
[/size]
asdf-asdf
New User
Posts: 8
Joined: Mon Feb 14, 2011 3:27 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by asdf-asdf »

I checked..... ahk files are set to open only with that program, not Notepad.
Wow....I'm so close. If I could even get the Notepad window not to grab focus it would be fine. But its always front and center after each Alt-Q action. I just saved the .ahk files in My Documents for now. Could that be it? Should they be somewhere else I wonder?

This is such a great little shortcut for people that are moving between programs a lot!
MainTrane
Dedicated
Posts: 90
Joined: Wed Jan 26, 2011 12:47 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by MainTrane »

That's the same directory I used.  There's no way that save path will effect the script.
Just to confirm again, pressing the Alt-Q hotkey or Alt-F4 hotkey when the script is not running do not cause notepad to launch right?

Code: Select all

!Q::
Send !{F4}
Return
I've added a return command at the end of the script, it doesn't make any difference on my machine but maybe it will for you.

I recommend that you run the AHK file, press the Alt-Q hotkey to close a window, then right click on the green H icon in the tray area.  Select Open from the menu and you will see the script's execution log.

It should show the following:

Code: Select all

001: Return (7.41)
002: Send,!{F4} (0.01)
003: Return (8.64)
Confirming that all the script is doing is sending the !{F4} Alt-F4 hotkey, the timing in parenthesis doesn't matter.
If that is the case you know for certain what the script is doing and can troubleshoot elsewhere, though I'm clueless as to what's on your computer that could be causing notepad to launch.
 
  • Beta Tester ‖ Global Moderator
    Logitech [ G700 | G500 | MX1100 ᵛ¹ ᵛ² ]
    Windows 7 Professional 64-bit (6.1, Build 7601)
    Intel Core i7-960 @ 3.85GHz
    18GB (3x4GB+3x2GB) RAM
    DirectX 11
    NVIDIA GeForce 9800 GT
[/size]
MainTrane
Dedicated
Posts: 90
Joined: Wed Jan 26, 2011 12:47 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by MainTrane »

I think I've found the root of your problem.  When AutoHotkey first installs it creates a demonstration script that launches notepad.exe when the hotkey ^!n aka Ctrl-Alt-N is pressed.
Do not launch the script in your My Documents directory named Autohotkey.  That is not the AutoHotkey program, it is just a demonstration of how AHK works, launching notepad.exe with the previously mentioned ^!n hotkey.  Make sure that you do not have the two scripts running simultaneously (even though when I run them together notepad still never opens unless I press Ctrl-Alt-N).

Don't run the AutoHotkey.exe file in your program files directory or from the start menu.  Launching that file will always load the demo scipt, which launches notepad.  AuotHotkey doesn't need to be run like other programs.  You only need to run the scripts you create, not the autohotkey executable.
Pasting the code I gave you into the preexisting AutoHotkey.ahk script, instead of pasting it into a blank text document could also cause what you're experiencing.

Again, make sure there is only one script running (one H icon in the notification area, including the hidden icons section).  I hope this finally clears up your Alt-Q problem :) .
 
  • Beta Tester ‖ Global Moderator
    Logitech [ G700 | G500 | MX1100 ᵛ¹ ᵛ² ]
    Windows 7 Professional 64-bit (6.1, Build 7601)
    Intel Core i7-960 @ 3.85GHz
    18GB (3x4GB+3x2GB) RAM
    DirectX 11
    NVIDIA GeForce 9800 GT
[/size]
asdf-asdf
New User
Posts: 8
Joined: Mon Feb 14, 2011 3:27 am

Re: mouse gestures, keyboard shortcut, remapping, Alt-F4

Post by asdf-asdf »

You nailed it. And also I had a blank .ahk file in the same folder as well that was being launched that might have caused it. Anyway, its perfect now.

So now I use the Tilda for closing Tabs. Very convenient. Better than that Control_W thing that is so awkward to do. Pinky (5th finger) on Control and middle finger on W? So easy to mistype. I find if I'm rooted on the Alt key with my thumb I make far less typos. More pianists should decide on keyboard shortcuts in these programs!
Post Reply