Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-08

TSynEdit keystrokes in win32 interface

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Weustink
to Micha Nelissen: Can anyone explain about synedit keystrokes. If I press a 'b', then it tries to find an…

+ From: Micha Nelissen
+ Sent: woensdag 13 augustus 2003 13:59
+
+ Hi,
+
+ Can anyone explain about synedit keystrokes. If I press a 'b', then it
+ tries to find an associated command with findkeycode2 and findkeycode,
+ but on my system it returns with ecNone, so no action is done. +
+ Is there something I missed?

Don't know. But a tip. If you have delphi, try to use TSynedit with it. Then
you can see what to expect and what not.

Marc

Reply by email

Micha Nelissen
to Micha Nelissen: Can anyone explain about synedit keystrokes. If I press a 'b', then it tries to find an…
Mattias Gaertner wrote 20 lines
On Wed, 13 Aug 2003 14:14:48 +0200 "Marc Weustink" wrote: >+ From: Micha Nelissen >+ Sent: woensdag 13 augustus 2003 13:59 >+ >+ Hi, >+ >+ Can anyone explain about synedit keystrokes. If I press a 'b', then it >+ tries to find an associated command with findkeycode2 and findkeycode, >+ but on my system it returns with ecNone, so no action is done. >+ >+ Is there something I missed? > >Don't know. But a tip. If you have delphi, try to use TSynedit with it. >Then you can see what to expect and what not. 'b' is no special key, and therefore handled in the keypress event.

Thanks for the hint, solved the bug quickly now :). Attached is a patch for it. Apply in win32 interface please.

Micha.

--- win32callback.old.inc	Wed Aug 13 12:52:56 2003
+++ win32callback.inc	Wed Aug 13 14:40:34 2003
@@ -93,6 +93,7 @@
   LMInsertText: TLMInsertText; // used by CB_INSERTSTRING, LB_INSERTSTRING
   LMScroll: TLMScroll; // used by WM_HSCROLL
   LMKey: TLMKey; // used by WM_KEYDOWN WM_KEYUP
+  LMChar: TLMChar; // used by WM_CHAR
   LMMouse: TLMMouse; // used by WM_LBUTTONDBLCLK
   LMMouseMove: TLMMouseMove; // used by WM_MOUSEMOVE
   LMMouseEvent: TLMMouseEvent; // used by WM_MOUSEWHEEL
@@ -190,6 +191,17 @@
         NewText := PChar(LParam);
         Length := System.Length(NewText);
 //        UserData := Pointer(GetWindowLong(Window, GWL_USERDATA));
+      End;
+    End;
+    WM_CHAR:
+    Begin
+      ;
+      With LMChar Do
+      Begin
+        Msg := LM_CHAR;
+        KeyData := LParam;
+        CharCode := WParam;
+        writeln('WM_CHAR KeyData=',KeyData,' CharCode=',CharCode);
       End;
     End;
     WM_CLOSE:

Reply by email

Micha Nelissen

Hi,

Can anyone explain about synedit keystrokes. If I press a 'b', then it tries to find an associated command with findkeycode2 and findkeycode, but on my system it returns with ecNone, so no action is done.

Is there something I missed?

Regards,

Micha.

Reply by email

Mattias Gaertner
to Micha Nelissen
Show quoted text 25 lines
Mattias Gaertner wrote: > On Wed, 13 Aug 2003 14:14:48 +0200 > "Marc Weustink" wrote: > > >>+ From: Micha Nelissen >>+ Sent: woensdag 13 augustus 2003 13:59 >>+ >>+ Hi, >>+ >>+ Can anyone explain about synedit keystrokes. If I press a 'b', then it >>+ tries to find an associated command with findkeycode2 and findkeycode, >>+ but on my system it returns with ecNone, so no action is done. >>+ >>+ Is there something I missed? >> >>Don't know. But a tip. If you have delphi, try to use TSynedit with it. >>Then you can see what to expect and what not. > > > 'b' is no special key, and therefore handled in the keypress event. Thanks for the hint, solved the bug quickly now :). Attached is a patch for it. Apply in win32 interface please.

Thanks. Applied.

Mattias

Reply by email

Mattias Gaertner
to Micha Nelissen: Can anyone explain about synedit keystrokes. If I press a 'b', then it tries to find an…
Show quoted text 13 lines
+ From: Micha Nelissen + Sent: woensdag 13 augustus 2003 13:59 + + Hi, + + Can anyone explain about synedit keystrokes. If I press a 'b', then it + tries to find an associated command with findkeycode2 and findkeycode, + but on my system it returns with ecNone, so no action is done. + + Is there something I missed? Don't know. But a tip. If you have delphi, try to use TSynedit with it. Then you can see what to expect and what not.

'b' is no special key, and therefore handled in the keypress event.

Mattias

Reply by email