aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2020-01-03 13:46:54 +0100
committerPierre Ossman <ossman@cendio.se>2020-01-03 13:46:54 +0100
commit81e114f29f007c689a41ca2bb72f314d50898381 (patch)
treec72d8c1a87068f4608e8ba87711bf6d9c7de4a4f /common
parent73014910f56278a91e796ad8eed620196e289f47 (diff)
downloadtigervnc-81e114f29f007c689a41ca2bb72f314d50898381.tar.gz
tigervnc-81e114f29f007c689a41ca2bb72f314d50898381.zip
Allow XK_Scroll_Lock when LED state isn't supported
Otherwise such clients cannot use Scroll Lock at all, and that is probably worse than any effects we might get from getting out of sync.
Diffstat (limited to 'common')
-rw-r--r--common/rfb/VNCSConnectionST.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index cdd87b13..5d2d4b13 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -519,8 +519,7 @@ void VNCSConnectionST::keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down) {
// Avoid lock keys if we don't know the server state
if ((server->getLEDState() == ledUnknown) &&
((keysym == XK_Caps_Lock) ||
- (keysym == XK_Num_Lock) ||
- (keysym == XK_Scroll_Lock))) {
+ (keysym == XK_Num_Lock))) {
vlog.debug("Ignoring lock key (e.g. caps lock)");
return;
}
@@ -528,13 +527,6 @@ void VNCSConnectionST::keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down) {
// Lock key heuristics
// (only for clients that do not support the LED state extension)
if (!client.supportsLEDState()) {
- // Always ignore ScrollLock as we don't have a heuristic
- // for that
- if (keysym == XK_Scroll_Lock) {
- vlog.debug("Ignoring lock key (e.g. caps lock)");
- return;
- }
-
if (down && (server->getLEDState() != ledUnknown)) {
// CapsLock synchronisation heuristic
// (this assumes standard interaction between CapsLock the Shift