3e mouse button binden aan een key bijv (f1 of tab)

Pagina: 1
Acties:
  • 198 views sinds 30-01-2008

  • ikweetniks
  • Registratie: Maart 2004
  • Laatst online: 27-04-2022
weet iemand een proggie of Registry tweak hack waarmee je de middelste knop van elk willekeurige standaard muis kan binden aan een keyboard toets. Hopelijk ben ik duidelijk in mijn uitleg.

Ik heb net microsoft intellipoint 6.1 geinstaleerd en er zijn meerdere tabs bijgekomen oa een tab met key bindings nu heb ik de middelste muis knop gebind aan tab maar er gebeurt niks geen effect klik ik de middelste knop krijg ik nog steeds dat scroll gebeuren. :|

[ Voor 59% gewijzigd door ikweetniks op 09-03-2007 01:31 ]


  • ikweetniks
  • Registratie: Maart 2004
  • Laatst online: 27-04-2022
Het BOLD gedeelte.

http://www.autohotkey.com/
http://www.autohotkey.com/wiki/index.php?title=Hotkey

Alt-Tab
Special hotkeys can provide an alternate means of alt-tabbing. Each Alt-Tab hotkey must be a combination of two keys, which is typically achieved via the ampersand symbol (&). In the following example, you would hold down the right Alt key and press J or K to navigate the alt-tab menu:


To illustrate the above, the mouse wheel can be made into an entire substitute for Alt-tab. With the following hotkeys in effect, clicking the middle button displays the menu and turning the wheel navigates through it:

MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab
To cancel a hotkey-invoked Alt-tab menu without activating the selected window, use a hotkey such as the following. It might require adjustment depending on: 1) the means by which the alt-tab menu was originally displayed; and 2) whether the script has the keyboard hook installed.

LCtrl & CapsLock::AltTab
!MButton:: ; Middle mouse button. The ! prefix makes it fire while the Alt key is down (which it is if the alt-tab menu is visible).
IfWinExist ahk_class #32771 ; Indicates that the alt-tab menu is present on the screen.
Send !{Escape}{Alt up}
return
Currently, all special Alt-tab actions must be assigned directly to a hotkey as in the examples above (i.e. they cannot be used as though they were commands). Also, the presence of the alt-tab menu can be detected via IfWinExist ahk_class #32771 .


Custom alt-tab actions can also be created via hotkeys. In the following example, you would press F1 to display the menu and advance forward in it. Then you would press F2 to activate the selected window (or press Escape to cancel):

*F1::Send {Alt down}{tab} ; Asterisk is required in this case.
!F2::Send {Alt up} ; Release the Alt key, which activates the selected window.
~*Escape::
IfWinExist ahk_class #32771
Send {Escape}{Alt up} ; Cancel the menu without activating the selected window.
return


[edit]Remarks
Each numpad key can be made to launch two different hotkey subroutines depending on the state of Numlock. Alternatively, a numpad key can be made to launch the same subroutine regardless of the Numlock state. For example:

NumpadEnd::
Numpad1::
MsgBox, This hotkey is launched regardless of whether Numlock is on.
return
If the tilde modifier is used with a prefix key even once, that prefix will always be sent through to the active window. For example, in both of the below hotkeys, the active window will receive all right-clicks even though only one of the definitions contains a tilde:

~RButton & LButton::MsgBox You pressed the left mouse button while holding down the right.
RButton & WheelUp::MsgBox You turned the mouse wheel up while holding down the right button.
The Suspend command can temporarily disable all hotkeys except for ones you make exempt. For greater selectivity, use #IfWinActive/Exist.

Joystick hotkeys do not currently support modifier prefixes such as ^ (Control) and # (Win). However, you can use GetKeyState to mimic this effect as shown in the following example:

Joy2::
if not GetKeyState("Control") ; Neither the left nor right Control key is down.
return ; i.e. Do nothing.
MsgBox You pressed the first joystick's second button while holding down the Control key.
return
There may be times when a hotkey should wait for it's own modifier keys to be released before continuing. Consider the following example:

^!s::Send {Delete}
Pressing Control-Alt-S in the example below would cause the system to behave as though you pressed Control-Alt-Delete (due to the system's aggressive detection of that sequence). To work around this, use KeyWait to wait for the keys to be released; for example:

^!s::
KeyWait Control
KeyWait Alt
Send {Delete}
return
A hotkey label can be used as the target of a Gosub or Goto. For example: Gosub ^!s

Finally, each script is quasi multi-threaded, which allows a new hotkey to be launched even when a previous hotkey subroutine is still running. For example, new hotkeys can be launched even while a MsgBox is being displayed by the current hotkey.


Damn hoe krijg ik het bold gedeelte in deze script? zodat als ik de middelste knop druk alt tab tevoorschijn komt.?


; IMPORTANT INFO ABOUT GETTING STARTED: Lines that start with a
; semicolon, such as this one, are comments. They are not executed.

; This script has a special filename and path because it is automatically
; launched when you run the program directly. Also, any text file whose
; name ends in .ahk is associated with the program, which means that it
; can be launched simply by double-clicking it. You can have as many .ahk
; files as you want, located in any folder. You can also run more than
; one ahk file simultaneously and each will get its own tray icon.

; SAMPLE HOTKEYS: Below are two sample hotkeys. The first is Win+Z and it
; launches a web site in the default browser. The second is Control+Alt+N
; and it launches a new Notepad window (or activates an existing one). To
; try out these hotkeys, run AutoHotkey again, which will load this file.

#z::Run www.autohotkey.com

^!n::
IfWinExist Untitled - Notepad
WinActivate
else
Run Notepad
return


; Note: From now on whenever you run AutoHotkey directly, this script
; will be loaded. So feel free to customize it to suit your needs.

; Please read the QUICK-START TUTORIAL near the top of the help file.
; It explains how to perform common automation tasks such as sending
; keystrokes and mouse clicks. It also explains more about hotkeys.

  • ikweetniks
  • Registratie: Maart 2004
  • Laatst online: 27-04-2022
http://www.autohotkey.com...ipt_Listing#Mouse_Related
http://www.autohotkey.com/forum/viewtopic.php?t=2560

Dit gaat lang duren zo.

Old versions of Microsoft's IntelliPoint software allowed users to assign the Alt+Tab action to the mouse wheel button. Somewhere after IntelliPoint 4.0 this functionallity was removed.

I wrote the code below to give Alt+Tab functionallity to the mouse wheel button. IntelliPoint is not required. Put the file in your startup folder to have it load every time Windows starts. For example, in Windows XP, you could place it in the folder C:\Documents and Settings\All Users\Start Menu\Programs\Startup.

Click the mouse wheel to switch to the last window viewed. Hold the mouse wheel down to switch to a window of your choice -- no scrolling required.


_______________________________________________


#NoTrayIcon
*MButton::

GetKeyState, CapsState, CapsLock, T
If CapsState = D
SetCapsLockState, Off

Send, {AltDown}{Tab}
Sleep, 200
Loop
{
GetKeyState, WheelState, MButton, P
If WheelState = D
Sleep, 400
GetKeyState, WheelState, MButton, P
If WheelState = D
Send, {Tab}
Else
{
Send, {AltUp}
Break
}
}

Send, {AltUp}

If CapsState = D
SetCapsLockState, On

[ Voor 5% gewijzigd door ikweetniks op 10-03-2007 17:35 ]


  • ikweetniks
  • Registratie: Maart 2004
  • Laatst online: 27-04-2022
Het is me verdomd gelukt om de alt tab aan de middelste muisknop te krijgen met autohotkey. Alleen is het de standaard alt tab geval hoe krijg ik topdesk inplaats van de standaard alt tab.? Ben er bijna.!

[ Voor 14% gewijzigd door ikweetniks op 10-03-2007 17:43 ]


  • ikweetniks
  • Registratie: Maart 2004
  • Laatst online: 27-04-2022
Old versions of Microsoft's IntelliPoint software allowed users to assign the Alt+Tab action to the mouse wheel button. Somewhere after IntelliPoint 4.0 this functionallity was removed.

I wrote the code below to give ALT TAB functionallity to the mouse wheel button. IntelliPoint is not required. Put the file in your startup folder to have it load every time Windows starts. For example, in Windows XP, you could place it in the folder C:\Documents and Settings\All Users\Start Menu\Programs\Startup.

Click the mouse wheel to switch to the last window viewed. Hold the mouse wheel down to switch to a window of your choice -- no scrolling required.


_______________________________________________


#NoTrayIcon
*MButton::

GetKeyState, CapsState, CapsLock, T
If CapsState = D
SetCapsLockState, Off

Send, {AltDown}{Tab}
Sleep, 200
Loop
{
GetKeyState, WheelState, MButton, P
If WheelState = D
Sleep, 400
GetKeyState, WheelState, MButton, P
If WheelState = D
Send, {Tab}
Else
{
Send, {AltUp}
Break
}
}

Send, {AltUp}

If CapsState = D
SetCapsLockState, On

_______________________________________________


Keywords: alt, tab, alt+tab, alt-tab, switch, mouse, wheel, wheel button, window, next window, last window

Back to top


Chris
Site Admin


Joined: 02 Mar 2004
Posts: 9742

Posted: Sun Feb 27, 2005 9:59 pm Post subject:

--------------------------------------------------------------------------------

Nice. If you haven't already, you might try the following as well. I find it quite convenient:

MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab

Click the wheel to show or hide the menu, and turn it to navigate through the menu. The wheel will still function normally whenever the Alt-Tab menu isn't visible.

Back to top


ULTRA


Joined: 15 Feb 2005
Posts: 18
Location: Ludwigsburg, Germany
Posted: Wed Mar 02, 2005 7:43 pm Post subject:

--------------------------------------------------------------------------------

Chris, when I try to use this...

MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab

... it doesn't work correctly. For me it only makes the selected window
flash on the taskbar but it doesn't bring it to the top and it doesn't give focus to it.


When I use something like....

MButton::
Send, {LAlt Down}{TAB}
Sleep, 2000
Send, {LAlt Up}
return

... it does bring the selected window correctly to the top and activates it.

I looked at the source-code and I think it must have to do with this section
in hook_include.cpp:

Code (Copy):
if (alt_tab_menu_is_visible) // Can be true even if which_alt_down is zero.
{
if (hotkey_id_to_fire != HOTKEY_ID_ALT_TAB_AND_MENU) // then it is MENU or DISMISS.
{
KeyEvent(KEYUP, which_alt_down ? which_alt_down : VK_MENU);
if (this_key.as_modifiersLR && vk != VK_LWIN && vk != VK_RWIN && !key_up)
KeyEvent(KEYUP, vk); // Can't send sc here since it's not defined for the mouse hook.
alt_tab_menu_is_visible = false;
break;
}
}


Anyone else having this behavior?
_________________
In a world without walls and fences who needs windows and gates?

Back to top


jonny


Joined: 13 Nov 2004
Posts: 2737
Location: Minnesota
Posted: Wed Mar 02, 2005 7:52 pm Post subject:

--------------------------------------------------------------------------------

It's working fine for me.

Back to top


Titan


Joined: 11 Aug 2004
Posts: 3398
Location: 33434
Posted: Wed Mar 02, 2005 8:08 pm Post subject:

--------------------------------------------------------------------------------

For those WinXP users who don't know already; the Alt-Tab Replacement Powertoy really comes in handy as it shows previews of windows in Alt-Tab; something I felt like sharing
_________________


Back to top


jonny


Joined: 13 Nov 2004
Posts: 2737
Location: Minnesota
Posted: Wed Mar 02, 2005 8:28 pm Post subject:

--------------------------------------------------------------------------------

I tried that once; it was too slow for me and I like tabbed applications better than SDI's anyway.

Back to top


RG


Joined: 09 Feb 2005
Posts: 17
Location: United States
Posted: Wed Mar 09, 2005 1:14 pm Post subject: ALT-TAB Mouse Wheel

--------------------------------------------------------------------------------

This code
Code (Copy):

MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab


works beautifully! I am still being amazed by this program (AutoHotkey). It is excellent!
_________________
RG

Back to top


hs2


Joined: 25 Feb 2005
Posts: 11
Location: Germany
Posted: Wed Mar 09, 2005 3:36 pm Post subject: best Alt-Tabber

--------------------------------------------------------------------------------

This one is just the best Alt-Tabber: http://taskswitchxp.sourceforge.net/
I recommend (and use) the latest 'n greatest beta version 2.0b4: best http://sourceforge.net/projects/taskswitchxp/

HS2

Back to top


jonny


Joined: 13 Nov 2004
Posts: 2737
Location: Minnesota
Posted: Wed Mar 09, 2005 3:49 pm Post subject:

--------------------------------------------------------------------------------

Taskswitch-XP is great, but I don't use it 'cause I've been trying to limit my resource usage lately. Also, it doesn't get along well with Windowblinds, and when an app does that, it's usually not Windowblinds that gets the boot.

Back to top


Brandon Pace
Guest


Posted: Wed Apr 27, 2005 12:08 am Post subject:

--------------------------------------------------------------------------------

I found a script I like better than the one I posted previously. This one makes use of the AltTab function Chris suggested. Just press and hold the right mouse button and use the left button to switch between windows. It seems to work fine on Win 2k and XP.

Code (Copy):
Rbutton & LButton::AltTab
$RButton::MouseClick, right


Back to top


Chris
Site Admin


Joined: 02 Mar 2004
Posts: 9742

Posted: Wed Apr 27, 2005 8:25 pm Post subject:

--------------------------------------------------------------------------------

Here is a slight variation of the above that allows anything that relies on the right mouse to be held down (such as games and right-click-drag of a file in Explorer) to continue to work. However, pressing the right mouse button will cause a right-click-down event, which might cause undesirable side-effects depending on where you click:

~Rbutton & LButton::AltTab
RButton::MouseClick, right,,,,, D
RButton up::MouseClick, right,,,,, U ; This method allows right-click-drag to work.

Back to top


Sith
Guest


Posted: Thu Jun 02, 2005 4:07 pm Post subject: middle mouse button

--------------------------------------------------------------------------------

Thanks Chris for sharing that script.

I was originally trying to get my middle mouse button click to switch between applications. as i rarely use the middle button click event for anything much.

Whatever I tried just wouldnt work, but I know that the middle mouse button is working, as the example from the help file worked, where I could bring up the AltTab menu with middle button click.

this is what tried to get the middle mouse button to switch apps without success;
MButton::AltTab

any ideas?

Back to top


Chris
Site Admin


Joined: 02 Mar 2004
Posts: 9742

Posted: Thu Jun 02, 2005 8:39 pm Post subject: Re: middle mouse button

--------------------------------------------------------------------------------

Sith wrote:
this is what tried to get the middle mouse button to switch apps without success;
MButton::AltTab
The built-in Alt-tab actions require hotkeys that are combination of two keys (such as RControl & RShift::). By contrast, displaying the alt-tab menu/window via AltTabMenu can be assigned to an unmodified hotkey.

You may have already tried the following example, but if so perhaps you can describe how the behavior you want is different from what it gives:

; Clicking the button will display the menu and turning the wheel will navigate through it:
MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab

Last edited by Chris on Tue Aug 16, 2005 11:13 pm; edited 1 time in total

Back to top


urev
Guest


Posted: Tue Aug 16, 2005 10:38 am Post subject:

--------------------------------------------------------------------------------

Hi!
I am searching for the following thing:

If I press the midde mouse button, the task menu appears. Scrolling the mouse wheel up and down, the focused program changes and will be selected with left or middle button mouse button or return. Right button or any other key will escape from the tast menu.

Without prior pressing the middle mouse button, the wheel up and down should behave as before (e.g. for scrolling web pages).

I don't know how to implement this behavior, but perhaps you can help me.

  • ikweetniks
  • Registratie: Maart 2004
  • Laatst online: 27-04-2022
Als er iemand met mij mee kan mee denken graag want volgens mij vul ik die script met onnodige dingen.

http://www.autohotkey.com/forum/viewtopic.php?t=2560


Het is gelukt ik klik de rechtermuisknop houdt em ingedrukt dan links klikken voilla task manager of topdesk task manager ala Flip3d in vista, Ook met de middelste muisknop.

Alleen heb ik teveel in die script zitten volgens mij want heb nou 2 manieren die het tegelijkertijd doen de middelste muisknop moet weg want kan nou niet meer een nieuwe tab openen met de middelstemuisknop in IE.

hahah ;)

[ Voor 78% gewijzigd door ikweetniks op 10-03-2007 17:58 ]


  • pasta
  • Registratie: September 2002
  • Laatst online: 04-04 23:18

pasta

Ondertitel

Wat klopt er niet aan je topic? :)
[list]• Afbeeldingslocatie: http://gathering.tweakers.net/global/templates/tweakers/images/icons/edit.gif Kicken binnen enkele minuten
• Compleet nutteloze teksten die niemand wil doorlezen omdat ze niet relevant zijn aan je topic
• Crossposten, in 1 topic voor jezelf is genoeg
• Wat heb je zelf al geprobeerd? Wat voor muis heb je? Op welk OS probeer je dit te doen? Waar heb je al naar gezocht? Meer informatie is dus wenselijk. :)

Om deze redenen ga ik dan ook je topic sluiten. :)

Signature

Pagina: 1

Dit topic is gesloten.