You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@guacamole.apache.org by "Nick Couchman (Jira)" <ji...@apache.org> on 2022/01/03 05:02:00 UTC

[jira] [Updated] (GUACAMOLE-892) Ctrl+Alt+Shift menu call is incompatible with Alt+Shift keyboard layout swith on Linux

     [ https://issues.apache.org/jira/browse/GUACAMOLE-892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Couchman updated GUACAMOLE-892:
------------------------------------
    Affects Version/s:     (was: 1.0.0)

> Ctrl+Alt+Shift menu call is incompatible with Alt+Shift keyboard layout swith on Linux
> --------------------------------------------------------------------------------------
>
>                 Key: GUACAMOLE-892
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-892
>             Project: Guacamole
>          Issue Type: Improvement
>          Components: guacamole
>         Environment: Ubuntu 18.04.3 LTS
> Firefox 70.0b2 and Chrome 77.0.3865.90
>            Reporter: Andrey Doronin
>            Priority: Minor
>
> The problem is that on Linux in case of such key-combo we receive {{"GroupNext"}} key instaead of "Shift".
> In Firefox the keydown event looks like this:
> {code:none}
> keydown Alt-Control
> ​altKey: true
> ​bubbles: true
> ​cancelBubble: false
> ​cancelable: true
> ​charCode: 0
> ​code: "ShiftLeft"
> ​composed: true
> ​ctrlKey: true
> ​currentTarget: null
> ​defaultPrevented: false
> ​detail: 0
> ​eventPhase: 0
> ​explicitOriginalTarget: <body>
> ​isComposing: false
> ​isTrusted: true
> ​key: "GroupNext"
> ​keyCode: 16
> ​layerX: 0
> ​layerY: 0
> ​location: 0
> ​metaKey: false
> ​originalTarget: <body>
> ​rangeOffset: 0
> ​rangeParent: null
> ​repeat: false
> ​returnValue: true
> ​shiftKey: false
> ​srcElement: <body>
> ​target: <body>
> ​timeStamp: 2320832
> ​type: "keydown"
> ​view: Window about:blank
> ​which: 16
> ​<get isTrusted()>: function isTrusted()
> ​<prototype>: KeyboardEventPrototype { getModifierState: getModifierState(), initKeyboardEvent: initKeyboardEvent(), initKeyEvent: initKeyEvent(), ... }{code}
> So I guess the most easy way to fix it could be to change the order here [https://github.com/apache/guacamole-client/blob/9d485ffcf755e88cccf9a7aadc72911633277117/guacamole-common-js/src/main/webapp/modules/Keyboard.js#L249]
> in the same way as in KeyupEvent.
> But unfortunately in Chrome we get keyCode == 0
> {code:none}
> KeyboardEvent {isTrusted: true, key: "GroupNext", code: "ShiftLeft", location: 1, ctrlKey: true, ...}
> altKey: true
> bubbles: true
> cancelBubble: false
> cancelable: true
> charCode: 0
> code: "ShiftLeft"
> composed: true
> ctrlKey: true
> currentTarget: null
> defaultPrevented: false
> detail: 0
> eventPhase: 0
> isComposing: false
> isTrusted: true
> key: "GroupNext"
> keyCode: 0
> location: 1
> metaKey: false
> path: (4) [body.light-chip.inited, html, document, Window]
> repeat: false
> returnValue: true
> shiftKey: false
> sourceCapabilities: InputDeviceCapabilities {firesTouchEvents: false}
> srcElement: body.light-chip.inited
> target: body.light-chip.inited
> timeStamp: 9475.445000000036
> type: "keydown"
> view: Window {parent: Window, postMessage: ƒ, blur: ƒ, focus: ƒ, close: ƒ, ...}
> which: 0
> __proto__: KeyboardEvent
> {code}
> So it looks like the only way to guess the real Shift key is event.code.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)