Forum > Designer

Sendkeys

<< < (5/5)

bytebites:

--- Quote from: kris on December 03, 2017, 04:41:28 pm ---
Also on the wiki about MouseAndKeyInput, under Gtk chapter it reads:

--- Quote ---(...) ALT key pressing is not supported (...)
--- End quote ---


--- End quote ---


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  VK_MENU: Result := XK_VoidSymbol; // alt key crashes app, XK_Alt_R;
Actually  Alt-left works, if you change code in xkeyinput-file:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---VK_MENU: Result := XK_Alt_L;

kris:
very interesting how this topic came back to life after all these years.
Kudos to bytebites for sharing the patch ;)

I could only wish for someone knowledgeable to find this thread and also help me to figure out why the approach using gtk_main_do_event did not work for me.

Zoran:

--- Quote from: taazz on December 03, 2017, 12:01:39 pm --- A 10 year old excavation. Nice! Assuming you are looking for a way to send keys, I recommend to take a look on the mouseandkeyInput package. It claims to support sending keys.

--- End quote ---

Or better don't take a look at it, unless you want to license your code under GPL (and you will have to, if you take any piece of code from it).
MouseAndKeyInput package is under GPL, which makes it unusable for many Lazarus users.
So, another solution with more permissive license will be welcomed.

Thaddy:
Kris, you are responding to an 11 year old thread.

Better to look at the wiki under keupress http://wiki.lazarus.freepascal.org/LCL_Key_Handling

That's cross-platform.

Navigation

[0] Message Index

[*] Previous page

Go to full version