[Lazarus] Cut, Copy, Paste shortcuts don't work in SynEdit

Martin Frb lazarus at mfriebe.de
Fri Aug 12 11:56:01 CEST 2016


the patch here might help, but might cause new issues (so I was told / I 
remember some discussion on the topic, but I cant find it)
(It is very old, not sure if the issue is still the same)


The issue is that the "time" in the events for different keys is the 
same. Apparently that means it is one event only (again Ive been told, I 
never looked at the gtk spec)

The LCL filters by that time.

the patch adds the key itself to the filter.
But if you take a key that is currently handled correctly, and where the 
"key" value is changed by a handler, then the patch will lead to that 
stroke being duplicated (or maybe duplicated...) (again so I was told)



On 12/08/2016 10:31, Graeme Geldenhuys wrote:
> I'm using the TypeMatrix 2030 USB keyboard (Dvorak layout). The
> TypeMatrix keyboard has special clipboard shortcuts via Fn functionality
> for Cut, Copy and Paste.
>
> I'm using FreeBSD running JWM (a plain window manager). The issue is
> observed under Linux (Centos 6) too. All X11 applications work fine with
> the Fn clipboard functions - that's all except Lazarus IDE and I can't
> figure out why.
>
> When I press the special Fn clipboard keys, it actually generates the
> IBM style Cut, Copy and Paste via Shift+Del, Ctrl+Ins and Shift+Ins
> respectively. The "xev" output shows that - below it generate the key
> sequence for Cut.
>
> Because I use the Dvorak layout, I've always used the IBM style Cut,
> Copy and Paste because it is easier to type. I've also set up Lazarus
> IDE with secondary shortcuts for those. When I physically press
> Shift+Del it works, but the Fn+Cut key doesn't. Yet they generate the
> exact same key sequences in xev.
>
> Anybody got any idea why Lazarus IDE (more specifically SynEdit) doesn't
> work correctly?
>
>    NOTE:
>      Any dialogs in Lazarus IDE that accepts text, the Fn clipboard
>      functionality works (eg: a TEdit). So LCL is not the problem.
>      It seems on SynEdit is the issue.
>
>
> If I press Fn+Cut on my TypeMatrix 2030, this is what xev outputs:
>
> ================[ xev output ]====================
> KeyPress event, serial 36, synthetic NO, window 0x2600001,
>      root 0x295, subw 0x0, time 175828944, (1760,391), root:(1939,589),
>      state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
>      XLookupString gives 0 bytes:
>      XmbLookupString gives 0 bytes:
>      XFilterEvent returns: False
>
> KeyPress event, serial 36, synthetic NO, window 0x2600001,
>      root 0x295, subw 0x0, time 175828944, (1760,391), root:(1939,589),
>      state 0x1, keycode 107 (keysym 0xffff, Delete), same_screen YES,
>      XLookupString gives 1 bytes: (7f) ""
>      XmbLookupString gives 1 bytes: (7f) ""
>      XFilterEvent returns: False
>
> KeyRelease event, serial 36, synthetic NO, window 0x2600001,
>      root 0x295, subw 0x0, time 175829000, (1760,391), root:(1939,589),
>      state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
>      XLookupString gives 0 bytes:
>      XFilterEvent returns: False
>
> KeyRelease event, serial 36, synthetic NO, window 0x2600001,
>      root 0x295, subw 0x0, time 175829000, (1760,391), root:(1939,589),
>      state 0x0, keycode 107 (keysym 0xffff, Delete), same_screen YES,
>      XLookupString gives 1 bytes: (7f) ""
>      XFilterEvent returns: False
> ===========================================
>
>
> I haven't tested under Windows yet.
>
> Regards,
>    Graeme
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160812/da862648/attachment.html>


More information about the Lazarus mailing list