Bug 561810 - [RAP]Key events on the Display are not read when the focus is on any widget
Summary: [RAP]Key events on the Display are not read when the focus is on any widget
Status: CLOSED WONTFIX
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 3.12   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: ui
Depends on:
Blocks:
 
Reported: 2020-04-06 05:51 EDT by Dinesh Mulanjur CLA
Modified: 2020-04-10 04:47 EDT (History)
0 users

See Also:


Attachments
Snippet to reproduce the issue (10.32 KB, application/zip)
2020-04-06 05:51 EDT, Dinesh Mulanjur CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dinesh Mulanjur CLA 2020-04-06 05:51:51 EDT
Created attachment 282352 [details]
Snippet to reproduce the issue

Key event listener added to Display is not triggered if the focus is on any widget. 
Please refer to the snippet attached to reproduce the issue.

Key event on the Display are read properly in SWT applications but the same code does not work in RAP.

There are a couple of workarounds for that
1. use display.setData(RWT.ACTIVE_KEYS, new String[]{"//any specific keys"});
2. add empty key listener to the widgets (refer to the snippet attached)

Ideally key event listener in Display should function the same way as it does in SWT.
Comment 1 Ivan Furnadjiev CLA 2020-04-10 04:47:12 EDT
These limitations are by desing. Adding global key listener to display (without active keys) will trigger a lot of requests (for every key press) that will flood the server. In a multi user RAP application this will make the performance really really bad. Please reopen if you disagree.