[Bug 7874] New: OnHotHey function in EasyUO doesn't work
wine-bugs at winehq.org
Tue Mar 27 01:23:23 CDT 2007
Summary: OnHotHey function in EasyUO doesn't work
AssignedTo: wine-bugs at winehq.org
ReportedBy: zajec5 at gmail.com
EasyUO is a powerfull tool that enables me to write scripts that help me to
play Ultima Online (which works great under Wine). It works in 90%, expect
I asked developer if he could show a part of Delphi code that is used for this
function. He was so nice he did. There it is:
function OnHotkey(KeyStr : String; Ctrl,Alt,Shift : Boolean) : Boolean;
VK : Cardinal;
if VK=0 then Exit;
if (Hi(GetAsyncKeyState(VK))<128) then Exit;
if Ctrl xor (Hi(GetAsyncKeyState(VK_CONTROL))>127) then Exit;
if Alt xor (Hi(GetAsyncKeyState(VK_MENU))>127) then Exit;
if Shift xor (Hi(GetAsyncKeyState(VK_SHIFT))>127) then Exit;
He also gave us a little comment about it. Quote:
GetVK isn't provided here, but it simply maps string names like "F1" to the
corresponding Windows VirtualKey constant. The Hi() function returns the most
Maybe the problem is the WINE implementation of GetAsyncKeyState. It might be
the format of the return value or the VK mapping table.
GetAsyncKeyState on MSDN:
I've uploaded a test application with just GetAsyncKeyState in it here:
In Delphi, values with a dollar sign in front are interpreted as hexadecimal.
So the value $74 is actually 116 which is the key F5.
A description of all available virtual keycodes is here:
When I press F5 on my WinXP, I get the a result value of $FFFF8000 or $FFFF8001
(if I keep the F5 button pressed down).
This bug means that I can not detect when some key is pressed inside Ultima
Online window. As a result I can not for ex. bind healing my character under F1.
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs