Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E33A9200D4B for ; Mon, 27 Nov 2017 19:57:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E1A6F160C13; Mon, 27 Nov 2017 18:57:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DB270160BFA for ; Mon, 27 Nov 2017 19:57:47 +0100 (CET) Received: (qmail 73908 invoked by uid 500); 27 Nov 2017 18:57:47 -0000 Mailing-List: contact user-help@guacamole.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@guacamole.apache.org Delivered-To: mailing list user@guacamole.apache.org Received: (qmail 73898 invoked by uid 99); 27 Nov 2017 18:57:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Nov 2017 18:57:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 35822C02E6 for ; Mon, 27 Nov 2017 18:57:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.448 X-Spam-Level: ** X-Spam-Status: No, score=2.448 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, KAM_LOTSOFHASH=0.25, KB_WAM_FROM_NAME_SINGLEWORD=0.2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=guac-dev-org.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id WehgY_UUeNlW for ; Mon, 27 Nov 2017 18:57:44 +0000 (UTC) Received: from mail-vk0-f47.google.com (mail-vk0-f47.google.com [209.85.213.47]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 4C20C5F23E for ; Mon, 27 Nov 2017 18:57:44 +0000 (UTC) Received: by mail-vk0-f47.google.com with SMTP id p144so18096976vkp.3 for ; Mon, 27 Nov 2017 10:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=guac-dev-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=wtZIfdEwfzWU+pZJ/hruFgBOuVnpvpuSi1FBwDDhKAA=; b=EKyzxumPpOHg2iO3ga+Ose8+RVVWOTBn49jq2QLOBNKCpqZq5umt6/IkzvhCiaS+XW kVvSLcboMuZA+camP1OQDNnQhBEYFgjzNFizkTzNfrc41RJFQfW53yJFwnNI9jnE0VA+ E/SFC32HX3m/zXgbyHPsoQonnCmuOGX+Z4U8n3tCiBEALvYUDaXHPTShnk54gl1bK1Hg vvw+sAWZ4oZ0XGSHrcy+pPags2uBUi/oiZV1xkUwXYqDaB3xurZ0RU47hrwlQexaIJPO hQGSywlnERjwqOuUfJktpUG55+FPk2UpfBxxDg5YbQ8j/oW6I2tRe8E+5Zz5tmdTDBMB x9qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=wtZIfdEwfzWU+pZJ/hruFgBOuVnpvpuSi1FBwDDhKAA=; b=f/ZIdEBpOkx6EuOKR0PM3dRsiYcw02u1Hotn9I6nKAL1xMxJgIDwrHg4zBQVYTre2s 0Kg0L8dyndbxvhUx8bm67OXu+FD9sbaXtx772Z4BPq0Q3iBH8u6JBpA+c34ARIW/opoM NxnZj4k9eOq3q9KiBOJ1dUBXWKsRGQdeZIQB2FVSh25mA3VOdIUYK8Xlr3vmmPib08cN 8RmSOe+m1I+jPPZIVLtsliGFxSiJ205QGMyYEGyxJ7SZAk+yKBzWvUHo4qzLmqEir4ik IPBorgiO3uu46rJ3UN3fu20iH6//GgvMSrVi/J1Uf8d1Iopepuby1c1W0fKq0JtpsdG2 jEyA== X-Gm-Message-State: AJaThX49oHhj+DFkochLq67jR15kg4ceObQhFI3FAUB5D3lvRKksj2KE UrZm675UsVuzxYixxJhbxnLUik8i+1djmANpEP926d7C X-Google-Smtp-Source: AGs4zMbuCZsIFJP8SQMBw6nwOrnsHssEb0SYpBUi9i8HU3CxRMDil0J2+XNkgCE0v2+ZTQop6ryyIsWAoC5rict3WqQ= X-Received: by 10.31.107.205 with SMTP id k74mr27697380vki.159.1511809058313; Mon, 27 Nov 2017 10:57:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.93.196 with HTTP; Mon, 27 Nov 2017 10:56:57 -0800 (PST) X-Originating-IP: [157.130.212.6] In-Reply-To: <477FB81E-79E5-46DA-80F3-4A8CE20940E0@stratuscom.com> References: <477FB81E-79E5-46DA-80F3-4A8CE20940E0@stratuscom.com> From: Mike Jumper Date: Mon, 27 Nov 2017 10:56:57 -0800 Message-ID: Subject: Re: External keyboard with iPad To: user@guacamole.apache.org Content-Type: multipart/alternative; boundary="001a114793bee3b3cb055efb791b" archived-at: Mon, 27 Nov 2017 18:57:49 -0000 --001a114793bee3b3cb055efb791b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Nov 25, 2017 at 10:48 PM, Greg Trasuk wrote: > Hi Mike: > > Thanks for the reply. Here=E2=80=99s the result from the keypress tester= : > > keydown e.keyCode=3D0 e.which=3D0 e.keyIdentifier=3DUnidentifie= d > e.key=3DUIKeyInputEscape e.altKey=3Dfalse e.ctrlKey=3Dfalse > e.altGraphKey=3Dfalse e.metaKey=3Dfalse e.shiftKey=3Dfalse > e.location=3D0 e.keyLocation=3D0 > keypress e.keyCode=3D85 e.which=3D85 e.keyIdentifier=3D > e.key=3DUIKeyInputEscape e.altKey=3Dfalse e.ctrlKey=3Dfalse > e.altGraphKey=3Dfalse e.metaKey=3Dfalse e.shiftKey=3Dfalse > e.location=3D0 e.keyLocation=3D0 > keyup e.keyCode=3D0 e.which=3D0 e.keyIdentifier=3DUnidentifie= d > e.key=3DUIKeyInputEscape e.altKey=3Dfalse > > So=E2=80=A6 looks kind of funny. The keycode reported is =E2=80=9985=E2= =80=99 which is the U > character, but the key that=E2=80=99s reported is =E2=80=98UIKeyInputEsca= pe=E2=80=99, which is > clearly not =E2=80=98U=E2=80=99, and also not ESC (27). Googling =E2=80= =98UIKeyInputEscape=E2=80=99 > suggests that this is UIKit=E2=80=99s name for the escape key, but the ke= ycode is > wrong. > > It's unfortunately fairly common for at least one or two JavaScript key events and their properties to be completely incorrect. Guacamole's keyboard handling is actually one of the more complicated parts of the JavaScript side of the stack. We employ retrospective inspection of key events, looking over either or both of the keydown and keypress events depending on how reliable the associated properties are given other factors= : https://github.com/apache/incubator-guacamole-client/blob/649fd8c036861014a= 6064f4af3e05f309cd92973/guacamole-common-js/src/main/webapp/modules/Keyboar= d.js#L934-L938 In this case, iOS Safari shouldn't actually be sending a keypress event, as that event is supposed to only be sent for keys which would result in a printable character. It is this event which is resulting in Guacamole interpreting the key as a "U": https://github.com/apache/incubator-guacamole-client/blob/649fd8c036861014a= 6064f4af3e05f309cd92973/guacamole-common-js/src/main/webapp/modules/Keyboar= d.js#L940-L944 Does Guacamole have some idea of an editable keymap? And if it did, would > it be looking at the =E2=80=98key=E2=80=99 value or the =E2=80=98keycode= =E2=80=99 value? > > The client side of things is meant to be independent of keyboard layout, so not exactly, but it does have a mapping of known key identifiers and known-accurate key codes (for the cases where a key code is always tied to a specific key). In those cases, it would ignore the keypress event and rely solely on keydown: https://github.com/apache/incubator-guacamole-client/blob/649fd8c036861014a= 6064f4af3e05f309cd92973/guacamole-common-js/src/main/webapp/modules/Keyboar= d.js#L381-L506 https://github.com/apache/incubator-guacamole-client/blob/649fd8c036861014a= 6064f4af3e05f309cd92973/guacamole-common-js/src/main/webapp/modules/Keyboar= d.js#L174-L181 Though the "UIKeyInputEscape" identifier is non-standard, adding it to the above list would solve the issue. Do you perhaps know of where a full list of these UIKeyInput* names could be found? We could add them all in one fell swoop to fix this Safari quirk going forward. - Mike --001a114793bee3b3cb055efb791b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On S= at, Nov 25, 2017 at 10:48 PM, Greg Trasuk <trasukg@stratuscom.com= > wrote:
Hi = Mike:

Thanks for the reply.=C2=A0 Here=E2=80=99s the result from the keypress tes= ter:

keydown e.keyCode=3D0=C2=A0 =C2=A0 =C2=A0e.which=3D0=C2=A0 =C2=A0 =C2=A0 = =C2=A0e.keyIdentifier=3DUnidentified=C2=A0 =C2=A0 e.key=3DUIKeyInputEscape= =C2=A0 e.altKey=3Dfalse=C2=A0 e.ctrlKey=3Dfalse e.altGraphKey=3Dfalse=C2=A0= =C2=A0 =C2=A0e.metaKey=3Dfalse e.shiftKey=3Dfalse=C2=A0 =C2=A0 =C2=A0 =C2= =A0 e.location=3D0=C2=A0 =C2=A0 e.keyLocation=3D0
keypress=C2=A0 =C2=A0 =C2=A0 =C2=A0 e.keyCode=3D85=C2=A0 =C2=A0 e.which=3D8= 5=C2=A0 =C2=A0 =C2=A0 e.keyIdentifier=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 e.key= =3DUIKeyInputEscape=C2=A0 e.altKey=3Dfalse=C2=A0 e.ctrlKey=3Dfalse e.altGra= phKey=3Dfalse=C2=A0 =C2=A0 =C2=A0e.metaKey=3Dfalse e.shiftKey=3Dfalse=C2=A0= =C2=A0 =C2=A0 =C2=A0 e.location=3D0=C2=A0 =C2=A0 e.keyLocation=3D0
keyup=C2=A0 =C2=A0e.keyCode=3D0=C2=A0 =C2=A0 =C2=A0e.which=3D0=C2=A0 =C2=A0= =C2=A0 =C2=A0e.keyIdentifier=3DUnidentified=C2=A0 =C2=A0 e.key=3DUIKeyInpu= tEscape=C2=A0 e.altKey=3Dfalse

So=E2=80=A6 looks kind of funny.=C2=A0 The keycode reported is =E2=80=9985= =E2=80=99 which is the U character, but the key that=E2=80=99s reported is = =E2=80=98UIKeyInputEscape=E2=80=99, which is clearly not =E2=80=98U=E2=80= =99, and also not ESC (27).=C2=A0 Googling =E2=80=98UIKeyInputEscape=E2=80= =99 suggests that this is UIKit=E2=80=99s name for the escape key, but the = keycode is wrong.


It's unfortunately fairly common f= or at least one or two JavaScript key events and their properties to be com= pletely incorrect. Guacamole's keyboard handling is actually one of the= more complicated parts of the JavaScript side of the stack. We employ retr= ospective inspection of key events, looking over either or both of the keyd= own and keypress events depending on how reliable the associated properties= are given other factors:


In this case, iOS Safari= shouldn't actually be sending a keypress event, as that event is suppo= sed to only be sent for keys which would result in a printable character. I= t is this event which is resulting in Guacamole interpreting the key as a &= quot;U":


Does Guacamole have some idea of an editable keymap?=C2=A0 And if it did, w= ould it be looking at the =E2=80=98key=E2=80=99 value or the =E2=80=98keyco= de=E2=80=99 value?


The client side of things is meant to = be independent of keyboard layout, so not exactly, but it does have a mappi= ng of known key identifiers and known-accurate key codes (for the cases whe= re a key code is always tied to a specific key). In those cases, it would i= gnore the keypress event and rely solely on keydown:

https://github.com/apache/incubator-guacamole= -client/blob/649fd8c036861014a6064f4af3e05f309cd92973/guacamole-common-js/s= rc/main/webapp/modules/Keyboard.js#L381-L506

Though the "= ;UIKeyInputEscape" identifier is non-standard, adding it to the above = list would solve the issue. Do you perhaps know of where a full list of the= se UIKeyInput* names could be found? We could add them all in one fell swoo= p to fix this Safari quirk going forward.

- Mike

--001a114793bee3b3cb055efb791b--