[Gambas-user] Keystroke recorder for the IDE :)

Bruce Steers bsteers4 at gmail.com
Wed May 3 13:31:47 CEST 2023


On Sun, 30 Apr 2023 at 22:52, Bruce Steers <bsteers4 at gmail.com> wrote:

>
> https://gitlab.com/bsteers4/gambas/-/commit/20781bb43271e624d1bc3bbb83316f49e7692ee9
>
> oooh yeah :)
> gotta run it through some serious testing yet but ,,, oooh yeah :)
>


Does this Keystroke recorder not interest anyone?
https://gitlab.com/bsteers4/gambas/-/commits/Keystroke_Recorder?ref_type=heads

Actually found myself using it last night on a repetitive task.
I have set Ctrl-F7 to toggle recording and Ctrl-Insert to playback and boy
did it speed up that little task :)
This is something I am going to utilize well :)

I've added a simple editor to manually edit macros.

The methods I have used should theoretically work with gtk, qt and wayland.

Summary of methods...
Enabling/disabling the recorder creates or destroys it's own observer on
the TextEditor keypress event so when not in use it has zero effect on
current methods.

When recording, Key class properties are converted to a pseudo
MacroKey.class and saved as a sequence of MacroKey[] using Shortcut text.

Playback sends the MacroKey[] sequence to a copy of the TextEditor_KeyPress
method converted to use MacroKey.class not Key.class.

All OnKeyPress methods/functions in the Mode files also have OnMacroPress
alternative.

Todo: a Std TextEditor has it's own Find method/objects and pressing F3 in
a macro event will find the next text.  the IDE works differently though
and I have not yet worked out how to get the last search text.  next job


Is this not anything of interest to you Ben?

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230503/f1529d3d/attachment.htm>


More information about the User mailing list