Keyboard special wheel

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JoPo
Posts: 25
Joined: 04 Feb 2018, 09:03

Keyboard special wheel

09 Jun 2018, 10:59

Hi !

I just offer to myself a logitech 'craft' keyboard. It has a wheel but what logitech does with really sucks.
I'd like to be able to use it in autohotkey in order to do interesting things. But I don't know at all what could be the autohotkey command for the logitech craft keyboard.

If anyone had any idea....

BTW, is there a way to 'capture' the signal that goes from the wheel in the computer and then use it in a script ? I don't find how.

Thanks a lot !
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Keyboard special wheel

09 Jun 2018, 11:30

run this, see if any keycodes come up when u turn the wheel

Code: Select all

#NoEnv
#SingleInstance Force
#WinActivateForce
#InstallKeybdHook
#InstallMouseHook
#KeyHistory 24
SetBatchLines -1

SetTimer, RefreshKeyHistory, 100
Esc::ExitApp

RefreshKeyHistory:
	if !WinExist("ahk_id" keyHistoryHWND)
		ExitApp

	ControlSend, % "ahk_parent", % "{F5}", % "ahk_id" keyHistoryHWND
Return

OpenKeyHistory()
{
	static INIT := OpenKeyHistory()
	activeHWND := WinActive("A")
	KeyHistory
	SetTitleMatchMode RegEx
	WinWaitActive, % ".* - AutoHotkey v1\.1\.\d+.\d+"
	SetTitleMatchMode 2
	global keyHistoryHWND := WinActive("A")
	WinMove, % "ahk_id" keyHistoryHWND, , 10, 10, A_ScreenWidth * 0.3, A_ScreenHeight * 0.8
	WinSet, AlwaysOnTop, On, % "ahk_id" keyHistoryHWND
	WinActivate, % "ahk_id" activeHWND
}
JoPo
Posts: 25
Joined: 04 Feb 2018, 09:03

Re: Keyboard special wheel

09 Jun 2018, 12:42

Oh ! I didn't know that ! Exactly what I needed ! It catched the wheel !

See on the jpg, lines with 'wheelup^' or 'wheeldown', for the other lines, I'm unable to know what they are.
wheel!.jpg
wheel!.jpg (76.11 KiB) Viewed 2612 times
Apparently, there could be a way to use the keyboard wheel, no ?

Thanks a lot !
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Keyboard special wheel

09 Jun 2018, 13:00

it appears as though its either sending CTRL + Wheel or CTRL + SHIFT + Wheel
try verifying that:

Code: Select all

^WheelUp::MsgBox, % "ctrl + wheel"
^+WheelUp::MsgBox, % "ctrl + shift + wheel"
JoPo
Posts: 25
Joined: 04 Feb 2018, 09:03

Re: Keyboard special wheel

09 Jun 2018, 14:06

Oh ! I guess I know why ! It's because the wheel is setted up for zoom on any application.
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <
JoPo
Posts: 25
Joined: 04 Feb 2018, 09:03

Re: Keyboard special wheel

09 Jun 2018, 14:09

The result of the small script is a message "ctrl + wheel" on wheel clockwise but nothing in the otherway !
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <
JoPo
Posts: 25
Joined: 04 Feb 2018, 09:03

Re: Keyboard special wheel

09 Jun 2018, 14:11

I had the second message with this little changes :

Code: Select all

^WheelUp::MsgBox, % "ctrl + wheel"
^Wheeldown::MsgBox, % "ctrl + shift + wheel"
That's awesome ! I've got the key to use in autohotkey, now ! Thanks a lot !! Gonna be able to do exactly what I want ! Excellent ! :D
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <
JoPo
Posts: 25
Joined: 04 Feb 2018, 09:03

Re: Keyboard special wheel

09 Jun 2018, 14:22

Ooops ! No ! Sorry ! I think I must do the first big test again...

The test remains totally empty when moving the wheel with any command assigned in its application !
But I think I know how I can do... Gonna assign it a dummy command, useless for me, check what it is thanks to your 1° script and reassign it in autohotkey. It should work.
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <
JoPo
Posts: 25
Joined: 04 Feb 2018, 09:03

Re: Keyboard special wheel

09 Jun 2018, 14:25

..... It does !! Many thanks !
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Keyboard special wheel

10 Jun 2018, 04:20

If you want to remap the wheel on the keyboard, but not mess with the wheel on your mouse, you should be able to do that with AutoHotInterception
If it is sending CTRL+Wheel, not sure how easy it would be to block the CTRL that gets sent before wheel, but not your normal use of CTRL, because you cannot see into the future.
JoPo
Posts: 25
Joined: 04 Feb 2018, 09:03

Re: Keyboard special wheel

10 Jun 2018, 05:28

Thanks, evilC ! In fact, because the keyboard wheel was map to CTRL+Wheel, I get the result on the jpg of my second post. When the wheel is mapped to nothing, I get nothing ! So, I've found a way to map it to some dummy keys in order to have the wheel doing what I want.

It's working well, now.
> > > > > > > > > > > > --- Musica --> here ! ---< < < < < < < < < < < <
User avatar
evilC
Posts: 4822
Joined: 27 Feb 2014, 12:30

Re: Keyboard special wheel

11 Jun 2018, 07:10

My point being, what happens if you hold CTRL on the keyboard, and roll the mouse wheel on your mouse?
I am guessing that your existing solution would not be able to tell the difference between this and the wheel on your keyboard being rolled.
AutoHotInterception would be able to tell the difference, and could block the wheel on your keyboard (And do something else instead), but not block the wheel on your mouse.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: boydfields, Google [Bot] and 151 guests