+ From: + Sent: vrijdag 2 januari 2004 14:26 + + I have a problem with the different key…
Marc Weustink wrote 31 lines
Okay. But "hkeys.inc" should be removed.

Mailing lists / lazarus / 2004-01
3 messages · 2 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
+ From: + Sent: vrijdag 2 januari 2004 14:26 + + I have a problem with the different key…
Okay. But "hkeys.inc" should be removed.
I have a problem with the different key codes identifiers. I would suggest a carnonical key code
like shown below. According to used platform/component-library the dedicated key codes are always
being mapped to the same identifier Key_<name>.
//Kylix Qt : Key_Return = 4100;
//Microsoft : VK_RETURN = 13;
//Lazarus : key_Return = 13;
//GTK : GDK_KEY_Return = $FF0D;
{$IFDEF MsWindows}
const
Key_Return = Windows.vk_Return;
Key_Escape = Windows.vk_Escape;
Key_Space = Windows.vk_Space;
Key_C = Windows.vk_Cancel;
Key_Up = Windows.vk_Up;
Key_Down = Windows.vk_Down;
Key_Prior = Windows.vk_Prior;
Key_Next = Windows.vk_Next;
Key_Left = Windows.vk_Left;
Key_Right = Windows.vk_Right;
Key_Home = Windows.vk_Home;
Key_End = Windows.vk_End;
{$ENDIF}
{$IFDEF FPC_Linux}
const
Key_Return = VCLGlobals.key_Return;
Key_Escape = VCLGlobals.key_Escape;
Key_Space = -0;//???
Key_C = -1;//???
Key_Up = VCLGlobals.key_Up;
Key_Down = VCLGlobals.key_Down;
Key_Prior = -2;//???
Key_Next = -3;//???
Key_Left = VCLGlobals.key_Left;
Key_Right = VCLGlobals.key_Right;
Key_Home = VCLGlobals.key_Home;
Key_End = VCLGlobals.key_End;
{$ENDIF}...
+ From:
+ Sent: vrijdag 2 januari 2004 14:26
+
+ I have a problem with the different key codes identifiers. I would
+ suggest a carnonical key code
+ like shown below. According to used platform/component-library the
+ dedicated key codes are always
+ being mapped to the same identifier Key_<name>.
+
+
+ //Kylix Qt : Key_Return = 4100;
+ //Microsoft : VK_RETURN = 13;
+ //Lazarus : key_Return = 13;
+ //GTK : GDK_KEY_Return = $FF0D;
Lazarus uses VK_<name> (and if you find a place where this isn't the case it has to change, let me know)
The idea is that lazarus on all platforms produces the same code. Eventually there will be an interface function where a VK_<name> can be mapped to a platform specific value.
Marc