WootingKb / wooting-macros

The official Wooting Macros software.
GNU General Public License v3.0
165 stars 17 forks source link

Feature: Live Macro Keys (LMK) #104

Open ssvx opened 1 year ago

ssvx commented 1 year ago

Background

Jeroen and Simon asked me (krachnix on twitch) to open an issue for the question i asked during this stream: https://www.twitch.tv/videos/1719944805

Question that was addressed at 54:44 was:

50:52 [krachnix] did you think about "live macro"? like 1. set key as live macro key, 2. hold key to start/stop record and 3. tap key to execute last recorded sequence? =)

Issue

Sometimes i find myself in situations where i have to repeat key sequences over and over again, which would call for a classic macro - but the task at hand is just some "one time only" thing which i'd not need again in the next days/weeks/months, so i wouldn't want to open Wootomation to change a profile and add a new macro etc. I just need a quick fix "rite meow" that doesn't interrupt my workflow.

Feature Request Detail

which implies

Live Macro Key

Is a key that allows the user to record a macro without opening Wootomation UI. The LMK will play its last recorded macro when tapped or repeat it when held down (repetition only available when recording trigger is not set to hold LMK). Recording starts by configured recording trigger and ends when LMK is pressed. Hence LMK can't be part of its own macro.

LMK macros could potentially include sub-routines by pressing other LMKs during recording. This would be cool, but beware of loop holes. At first it's probably simpler to secure "no LMKs allowed during background recording" than securing "no LMKs allowed that include the current LMK somewhere down the chain" (lol)

Recording Trigger

Always needs to include the LMK itself in case the user defined multiple LMKs, so Wootomation knows which key should be cleared/overwritten. Example for modifier + LMK as recording trigger could be [Ctrl]+[LMK] or [Alt]+[LMK].

Background Record Mode

Once activated by the configured recording trigger it clears the current macro on LMK and records all keystrokes as new macro for the LMK. Recording ends when LMK is pressed. Delays at the beginning and end of the recorded sequence need to be removed. Depending on LMK configuration delays and durations would be replaced by {DelayValue} and {DurationValue} as configured.

ssvx commented 1 year ago

Watching the stream segment again i think this was not yet clearly addressed. At 55:15 Jeroen asks:

It's kind of like a macro record key, right? But then will you be able to press any key afterwards? Like you press the record and then any key you press will be overwritten with a macro?

To this a clear: nooooo! I remember my old Corsair which had a feature where you could activate recording mode by pressing such a button and then pick the key that you want to record a macro for during that process - it was awful and super confusing. But i think when the LMK itself is used to start/stop recording AND serves as the macro key it can become a very intuitive workflow.

A Live Macro Key would always record a new macro for itself - not for any other key. Hence a LMK is a dedicated key to hold its last recorded macro to be played/executed when the LMK is pressed. In combination with a modifier (or by holding it down for some time) it enters recording mode for its own new macro.

Example with [NP5] being set to LMK and [Ctrl] set as recording modifier:

  1. press [Ctrl]+[NP5] to start recording
  2. record any input sequence (mouse movement and clicks if possible and all keys except [NP5])
  3. press [NP5] once to stop recording
  4. press [NP5] n times to use/play/execute the recorded macro n times
  5. repeat from 1. if you want to change the macro (record a new one for [NP5] key)

Thanks for consideration! =)

Btw: Who can set the "feature request" flag? Did i miss it?

medzernik commented 1 year ago

I also found myself wanting this feature today, wanted to add it as an issue, but read this thinking it covers it (and it does!) :D Definitely a way towards a very nice flexibility and usecase of the app. Definitely wanna take a look at this

ssvx commented 1 year ago

We could base this on the featureset of LMK. LMK is being worked on rn so it should not be too hard to build on top of this Originally posted by @medzernik in https://github.com/WootingKb/wooting-macros/issues/127#issuecomment-1445046156

Woot! You srs? 😍

Err... if this is ready before April 15 i gotta think of some kind of reward - pizza coupon or something - to give to you guys at Wootup V4 πŸ•πŸ€—πŸ•