Hello Alexander.

I am out of computer (stolen in my van with lot of other things) for the summer.
So, sorry, but I cannot test hotkeys at the moment.

But it would be very great if you become member of github/mse-org (please, do 
it).
I just need your github account.

Thanks.

Fre;D

________________________________
De : Alexander via mseide-msegui-talk <[email protected]>
Envoyé : samedi 9 juillet 2022 05:11
À : [email protected] 
<[email protected]>
Cc : Alexander <[email protected]>
Objet : [MSEide-MSEgui-talk] Global hotkeys in MSE ?

Hi,

Thanx for transparency in MSE !

As about add (or implement) global hotkeys in MSE ?

In Galaxy Organizer version 1 is implemented global hotkeys.

In GNU/Linux is similar function XGrabKey and small working example:

// 
https://stackoverflow.com/questions/30994628/why-does-xgrabkey-return-badrequest

uses
xlib,
keysym,
x;

var
d :  PXDisplay;
root : TWindow;
keycode, rv : Int64;
evt : TXEvent;

begin
d := XOpenDisplay(nil);
root := DefaultRootWindow(d);
keycode := XKeysymToKeycode(d, XK_BackSpace);

rv := XGrabKey(d, keycode, AnyModifier, root, 1, GrabModeAsync, GrabModeAsync);
writeln('XGrabKey returned');
writeln(rv);

    while true do begin
        XNextEvent(d, @evt);
        writeln('Got event');
        writeln(evt._type);
    end;
end.

If try just implement it in MSE as is occur troubles.

I try use d := msedisplay; instead d := XOpenDisplay(nil); ,
Try use:

//root := window.winid;
//root := DefaultRootWindow(d);
root := gui_getrootwindow(window.winid);

in mainfo oncreated and try
handle it in onkeyup and onapplicationevent

In onapplicationevent more correctly handled.
In onkeyup buggy.

Good Luck,
Alexander


_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to