Bug 544518 - 'Delete' key does not have repeat function
Summary: 'Delete' key does not have repeat function
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.10   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo, triaged
Depends on:
Blocks:
 
Reported: 2019-02-17 16:33 EST by paul deg CLA
Modified: 2023-12-14 04:53 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description paul deg CLA 2019-02-17 16:33:15 EST
On Fedora 29, Eclipse J2EE IDE, pressing Del and holding the button does not produce repeated delete action in any editor.
Comment 1 Dani Megert CLA 2019-02-18 04:16:12 EST
(In reply to paul deg from comment #0)
> On Fedora 29, Eclipse J2EE IDE, pressing Del and holding the button does not
> produce repeated delete action in any editor.
Does it work on text input fields, e.g. in the Find/Replace dialog?
Comment 2 Eric Williams CLA 2019-02-20 15:48:44 EST
I faced a bug like this awhile ago on Wayland, are you running on Wayland?

I can reproduce the issue in the editor (on Wayland) but not in native text fields (like find/replace, etc.)

Build ID: I20190206-1800
Comment 3 Robert Marcano CLA 2020-08-07 11:58:31 EDT
Still present on version 2020-06. I can confirm it only happens when running on Wayland and only on the editor, Native GTK widgets work fine.

Forcing GTK over X11 on the Wayland session is a workaround.

`export GDK_BACKEND=x11` before starting Eclipse.
Comment 4 Soraphol (Paul) Damrongpiriyapong CLA 2020-08-10 15:00:38 EDT
I have looked into this bug, seems to happen to StyledText only. However, it seems weird that the Delete & Backspace key events are handled differently. 

I have tested on X11 & Wayland. On both, SWT correctly sends key events for when the delete key is held down. However, on X11 is the 5 key events that were sent actually passed to the StyledText. For some reason, on Wayland these 5 key events don't get passed (only 1). 

The thing that is weird is that the way the events are handled in between are not up to SWT (from what I saw).
Comment 5 Soraphol (Paul) Damrongpiriyapong CLA 2020-08-12 15:22:56 EDT
Looks like this is a Platform problem. In AbstractTextEditor, the handling of SWT.DEL action by StyledText is explicitly nullify. Apparently this was done to  accommodate this bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51516.
Comment 6 Alexander Kurtakov CLA 2020-08-12 15:26:22 EDT
(In reply to Soraphol (Paul) Damrongpiriyapong from comment #5)
> Looks like this is a Platform problem. In AbstractTextEditor, the handling
> of SWT.DEL action by StyledText is explicitly nullify. Apparently this was
> done to  accommodate this bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=51516.

So how does it happen to work on X11?
Comment 7 Soraphol (Paul) Damrongpiriyapong CLA 2020-08-13 11:52:23 EDT
I'm not sure, but the fact that the AbstractTextEdtior nullifies the action of StyledText the event seems to no longer be in control of SWT. The events emitted from X11 & Wayland are exactly the same.
Comment 8 Alexander Kurtakov CLA 2020-08-13 11:56:17 EDT
(In reply to Soraphol (Paul) Damrongpiriyapong from comment #7)
> I'm not sure, but the fact that the AbstractTextEdtior nullifies the action
> of StyledText the event seems to no longer be in control of SWT. The events
> emitted from X11 & Wayland are exactly the same.

Is it possible that some bundle tries to emulate Delete key after that and this works on x11 but not on wayland?
Comment 9 Oded Arbel CLA 2022-10-31 07:03:56 EDT
This issue is still apparent in 2022-09 (4.25) and forcing the X11 backend workaround is still working.

I've noticed that in the keyboard shortcut configuration, "Delete" appears as a configured shortcut to "delete text", with no actions specified, and if I remove this keybinding - the Delete key stops working in the styled text editor. There is no such accommodation for Backspace.

From the previous discussion, it seems to me that it could be that the Delete key event is nullified in AbstractTextEditor and then is acted upon as a keyboard shortcut. I don't know why it makes it not repeat or why it is only a problem on Wayland.
Comment 10 Bob Ansay CLA 2022-12-02 03:02:23 EST
I experience a similar issue on Windows

under some circumstances the Delete key stops working.
Usually it works fine after a restart but after a while I note that hitting Del does nothing at all. Backspace still works fine.

I use a eclipse installation called sloeber (https://eclipse.baeyens.it/ Eclipse bundled CDT with an Arduino plugin)

It is based on eclipse Platform 4.25.0.v20220831-1800

If you need further information, let me know...
Comment 11 Nicola Mori CLA 2023-12-14 04:33:49 EST
Any progress about this? I just switched my Plasma desktop to the Wayland session and I experience the same issue: cancel key repeat does not work, only in text editors, single press works fine, other keys seem to work fine regarding to repeat. Didn't have this problem on X11.

Using Eclipse 2023-12 and CDT 11.4.0.202311271618 on ArchLinux.
Comment 12 Alexander Kurtakov CLA 2023-12-14 04:38:55 EST
SWT development moved to https://github.com/eclipse-platform/eclipse.platform.swt . If the issue is not there it would be nice to open new one there - ideally with pure swt reproducer of the issue to ease debugging for when someone finds the time for it.
Comment 13 Nicola Mori CLA 2023-12-14 04:53:09 EST
Issue on GitHub:

https://github.com/eclipse-platform/eclipse.platform.swt/issues/938