send key combinations with persistence

Announcements, questions
Post Reply
dgwebster
Posts: 2
Joined: 08 Feb 2017, 15:53

send key combinations with persistence

Post by dgwebster » 08 Feb 2017, 17:37

Hi all,

I'm using luaMacros to create a secondary keyboard to make certain functions I perform much easier.

One such issue is in Microsoft SQL Server Management Studio. To switch between SQL windows, the key combination is an annoying "ctrl+F6"

If I use sendkeys('^{F6}') on "page up" this works for sending a single instance, and the application switches from window 1 to window 2. Pressing it again just switches back from window 2 to window 1 again. What I'm trying to do is enable holding down "page up" to cycle through the windows, which involves pressing and holding CTRL, then repeatedly pressing F6.

Anyone have any thoughts on how to achieve this? I'd even be happy to use a double-combination on the macro keyboard.

many thanks,

Dave

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: send key combinations with persistence

Post by admin » 09 Feb 2017, 09:20

In other words you want to be able to send key down only (for Ctrl) - without key up (and vice versa)?
Petr Medek
LUAmacros author

dgwebster
Posts: 2
Joined: 08 Feb 2017, 15:53

Re: send key combinations with persistence

Post by dgwebster » 09 Feb 2017, 11:25

pretty much yes - in principle I think the sequence would be:

send key down (this state persists until otherwise)
followed by send key {F6} by each repetition from the user, fooling the system into thinking the ctrl key is held down whilst the F6 key is pressed repeatedly at the users instruction (i.e {F6 10} does not do what is needed as it just repeats it a specified number of times and not at the users control.)

I am quite happy to have a two part solution i.e. one key sets the ctrl key down event as on or off and another key does F6 as per the users keypress, making it an easily one handed solution for those having difficulty making this key-combination - not everyone has 10 fingers & thumbs of normal size.

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: send key combinations with persistence

Post by admin » 10 Feb 2017, 09:06

Ok, I'll see what can be done when I'll be rewriting unit for key sequence.
However it won't be soon...
Petr Medek
LUAmacros author

thjakob
Posts: 4
Joined: 03 Mar 2017, 21:05

Re: send key combinations with persistence

Post by thjakob » 05 Mar 2017, 11:37

Hi there,

In the meantime one can eventualy call an AutoIT script and use its somewhat extended possibilities ...

Greatings
Thomas

ps:
on the other side, luamacros has some internal functions send_key_down / up - that could be made available...
(I know, there is some code in luamacros that trys to deal with key-pressed while other keys should be sent -> see source uSendKeys.pas - but I haven't understood the mechano and problem till yet... :) )

Post Reply