浏览代码

* synchronize with ptc trunk from sourceforge; adds support for the numpad 5
key in ptccrt and several keys under windows have been changed to produce
the same key codes as under x11

git-svn-id: trunk@36556 -

nickysn 8 年之前
父节点
当前提交
9f5011af30
共有 2 个文件被更改,包括 19 次插入0 次删除
  1. 7 0
      packages/graph/src/ptcgraph/ptccrt.pp
  2. 12 0
      packages/ptc/src/win32/base/win32kbd.inc

+ 7 - 0
packages/graph/src/ptcgraph/ptccrt.pp

@@ -419,6 +419,10 @@ begin
                         KeyBufAdd(#0#78)
                       else if KeyMode = kmGO32 then
                         KeyBufAdd(#0#144);
+                    PTCKEY_CLEAR,
+                    PTCKEY_NUMPAD5:
+                      if KeyMode in [kmGO32, kmFPWINCRT] then
+                        KeyBufAdd(#0#143);
                   end;
                 end
                 else
@@ -493,6 +497,9 @@ begin
                       PTCKEY_END:       KeyBufAdd(#0#79);
                       PTCKEY_PAGEUP:    KeyBufAdd(#0#73);
                       PTCKEY_PAGEDOWN:  KeyBufAdd(#0#81);
+                      PTCKEY_CLEAR:
+                        if KeyMode in [kmGO32, kmFPWINCRT] then
+                          KeyBufAdd(#0#76);
                       else
                         if (KeyEv.Unicode >= 32) and (KeyEv.Unicode <= 127) then
                           KeyBufAdd(Chr(KeyEv.Unicode));

+ 12 - 0
packages/ptc/src/win32/base/win32kbd.inc

@@ -223,6 +223,18 @@ begin
       KeyCode := PTCKEY_COMMA;
     if wParam = VK_OEM_PERIOD then
       KeyCode := PTCKEY_PERIOD;
+    if wParam = VK_OEM_PLUS then
+      KeyCode := PTCKEY_EQUALS;
+    if wParam = VK_OEM_4 then
+      KeyCode := PTCKEY_OPENBRACKET;
+    if wParam = VK_OEM_6 then
+      KeyCode := PTCKEY_CLOSEBRACKET;
+    if wParam = VK_OEM_5 then
+      KeyCode := PTCKEY_BACKSLASH;
+    if wParam = VK_OEM_1 then
+      KeyCode := PTCKEY_SEMICOLON;
+    if wParam = VK_OEM_2 then
+      KeyCode := PTCKEY_SLASH;
 
     { handle key repeat count }
     for i := 1 to lParam and $FFFF do