You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by Joao Alexandre <ja...@gmail.com> on 2016/06/15 16:42:23 UTC
Portuguese European (pt-PT) RDP keyboard layout.
Hi All,
I would like very much to have a Portuguese European (pt-PT, Portugal) RDP
keyboard layout in Guacamole.
I'm not a programmer, but I'm available to help anyway to accomplish this.
I've been trying Guacamole for a few weeks, and it's an awesome product,
congratulations to the developers and the community.
It's just missing this pt-PT keyboard layout in RDP sessions as it mess up
the user experience.
How can I help? Is there any config file I can look at and modify?
Best regards,
João M. Alexandre
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by Joao Alexandre <ja...@gmail.com>.
Mike,
I've done it, only with your help, please add the attached file as the
keymap for the Portuguese European keyboard to Guacamole's project.
All the keys are working, even the dead keys, tested on a Windows 10
machine with IE11 and Firefox ESR 45.1.1, at least.
I've added the Portuguese keyboard option to rdp.json and en.json,
recompiled, installed the new guacamole.war and
guacamole-auth-jdbc-mysql-0.9.9.jar (as I'm using MySql database
authentication), and all worked OK, Portuguese (Qwerty) as an option in
Edit Connection -> Keyboard layout, just perfect.
I had just one problem with the database, as this one was created with the
published binaries sql scripts, and I'm now using the git version (git
clone https://github.com/apache/incubator-guacamole-server and git clone
https://github.com/apache/incubator-guacamole-client). As this was a test
setup, with only 2 connections, I dropped the old database and created a
new one using the new scripts.
The error was:
### Error querying database. Cause:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column
'enable_session_affinity' in 'field list'
I do have another Guacamole, almost production, with more connections. How
do I upgrade the database? Like this:
mysql -u root -p guacamole_db < schema/upgrade/upgrade-pre-0.9.9.sql
mysql -u root -p guacamole_db < schema/upgrade/upgrade-pre-0.9.10.sql
Thank you very much for your assistance, you're my man.
Can I help, test, whatever, add assistance to Guacamole's project on this
subject or anything else?
Kind regards,
João
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
parent "base"
name "pt-pt-qwerty"
freerdp "KBD_PORTUGUESE"
#
# Basic keys
#
map -altgr -shift 0x29 0x02..0x0D ~ "\1234567890'«"
map -altgr -shift 0x10..0x1B ~ "qwertyuiop+´"
map -altgr -shift 0x1E..0x28 0x2B ~ "asdfghjklçº~"
map -altgr -shift 0x56 0x2C..0x35 ~ "<zxcvbnm,.-"
map -altgr +shift 0x29 0x02..0x0D ~ "|!"#$%&/()=?»"
map -altgr +shift 0x10..0x1B ~ "QWERTYUIOP*`"
map -altgr +shift 0x1E..0x28 0x2B ~ "ASDFGHJKLǪ^"
map -altgr +shift 0x56 0x2C..0x35 ~ ">ZXCVBNM;:_"
#
# Keys requiring AltGr
#
map +altgr -shift 0x12 ~ "€"
map +altgr -shift 0x09 ~ "["
map +altgr -shift 0x0A ~ "]"
map +altgr -shift 0x03 ~ "@"
map +altgr -shift 0x04 ~ "£"
map +altgr -shift 0x05 ~ "§"
map +altgr -shift 0x08 ~ "{"
map +altgr -shift 0x0B ~ "}"
map +altgr -shift 0x1A ~ "¨"
On Mon, Jun 20, 2016 at 10:28 AM, Joao Alexandre <ja...@gmail.com>
wrote:
> Hi Mike,
>
> Very useful information, I'll try and get back for feedback.
>
> NOTE: PORTUGUSE was definitively a typo :), although our Portuguese
> soccer team isn't doing very well, shame on them.
>
> What you asked for (á):
>
> http://guacamole.incubator.apache.org/pub/tests/key-event-test.html
>
> IE11 on Windows 10
>
> keydown e.keyCode=186 e.which=186 e.keyIdentifier=undefined
> e.key=Unidentified e.altKey=false e.ctrlKey=false
> e.altGraphKey=undefined e.metaKey=false e.shiftKey=false e.location=0
> e.keyLocation=undefined
> keyup e.keyCode=186 e.which=186 e.keyIdentifier=undefined
> e.key=Unidentified e.altKey=false e.ctrlKey=false
> e.altGraphKey=undefined e.metaKey=false e.shiftKey=false e.location=0
> e.keyLocation=undefined
> keydown e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
> keypress e.keyCode=225 e.which=225 e.keyIdentifier=undefined e.key=á
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
> keyup e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
>
>
> Firefox ESR 45.1.1 on Windows 10
>
> keydown e.keyCode=192 e.which=192 e.keyIdentifier=undefined e.key=Dead
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
> keydown e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=á
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
> keypress e.keyCode=0 e.which=225 e.keyIdentifier=undefined e.key=á
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
> keyup e.keyCode=192 e.which=192 e.keyIdentifier=undefined e.key=´
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
> keyup e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
>
>
> Google Chrome 50.0.2661.102 m on WIndows 10
>
>
> keydowne.keyCode=186e.which=186e.keyIdentifier=U+00BAe.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
>
> keyupe.keyCode=186e.which=186e.keyIdentifier=U+00BAe.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
>
> keydowne.keyCode=65e.which=65e.keyIdentifier=U+0041e.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
>
> keypresse.keyCode=225e.which=225e.keyIdentifier=U+00E1e.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
>
> keyupe.keyCode=65e.which=65e.keyIdentifier=U+0041e.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
>
> Edge on WIndows 10
>
> keydown e.keyCode=186 e.which=186 e.keyIdentifier=undefined
> e.key=Unidentified e.altKey=false e.ctrlKey=false
> e.altGraphKey=undefined e.metaKey=false e.shiftKey=false e.location=0
> e.keyLocation=undefined
> keyup e.keyCode=186 e.which=186 e.keyIdentifier=undefined
> e.key=Unidentified e.altKey=false e.ctrlKey=false
> e.altGraphKey=undefined e.metaKey=false e.shiftKey=false e.location=0
> e.keyLocation=undefined
> keydown e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
> keypress e.keyCode=225 e.which=225 e.keyIdentifier=undefined e.key=á
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
> keyup e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
> e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
> e.shiftKey=false e.location=0 e.keyLocation=undefined
>
> http://guacamole.incubator.apache.org/pub/tests/guac/keyboard-test.html
>
> IE11 on WIndows 10
>
> guacamole keydown 0x61 U+0061 LATIN SMALL LETTER A
> guacamole keyup 0x61 U+0061 LATIN SMALL LETTER A
>
>
> Firefox ESR 45.1.1 on Windows 10
>
> guacamole keydown 0xe1 U+00E1 LATIN SMALL LETTER A WITH ACUTE
> guacamole keyup 0xe1 U+00E1 LATIN SMALL LETTER A WITH ACUTE
>
>
> Google Chrome 50.0.2661.102 m on WIndows 10
>
> guacamolekeydown0xe1U+00E1 LATIN SMALL LETTER A WITH ACUTE
> guacamolkeyup0xe1U+00E1 LATIN SMALL LETTER A WITH ACUTE
>
>
> Edge on WIndows 10
>
> guacamole keydown 0x61 U+0061 LATIN SMALL LETTER A
> guacamole keyup 0x61 U+0061 LATIN SMALL LETTER A
>
> Kind regards,
>
> João
>
> On Sun, Jun 19, 2016 at 6:18 AM, Mike Jumper <mi...@guac-dev.org>
> wrote:
> > On Sat, Jun 18, 2016 at 4:28 PM, Joao Alexandre
> > <ja...@gmail.com> wrote:
> >> Hi Mike,
> >>
> >> Sorry, I've sent a message without being finished.
> >>
> >> I've always been a polite guy, but my 52 years old is driving me
> impatient,
> >> so I'm really sorry for my precipitated "bump myself".
> >>
> >> First things first, thank you Mike for this detailed, time consuming and
> >> enlightened reply.
> >>
> >
> > No problem!
> >
> >> Indeed yesterday, I've made a git clone of both Guacamole server and
> client,
> >> as I've found the files you've mentioned at "src/protocols/rdp/keymaps".
> >> I've looked at all of them, made a new one based on the French or
> Italian
> >> files, I really don't recall, and altered a Makefile so that the
> >> "pt_pt_qwerty.keymap" would get compiled. After I tried to test it but
> then
> >> I've realized that the web client interface didn't have the option to
> choose
> >> my new keyboard, and I could not find out to do it.
> >
> > Ah, OK.
> >
> >> Next, I've copied my new Portuguese keymap file over the
> failsafe.keymap,
> >> that I thought it was the unicode option in the web interface. I tried
> these
> >> combination but I had several mismatch keys. I also search in Google for
> >> keyboard scan codes, but I could find any information useful, at least
> to my
> >> knowledge, so I got frustrated. The Portuguese keyboard has more keys
> than
> >> the English one, and at the end of the day I've quit.
> >>
> >
> > Figuring out the proper scancodes for keys which are missing from the
> > English keyboard will be difficult, but not impossible. They must
> > exist if such keyboards work with RDP at all, so it's just a matter of
> > time.
> >
> >> Today after reading your post, I've decided to give it another try, I
> still
> >> have doubts.
> >>
> >> Forme the Portuguese keymap file should look like this:
> >>
> >> parent "base"
> >> name "pt-pt-qwerty"
> >> freerdp "KBD_PORTUGUSE"
> >>
> >> #
> >> # Basic keys
> >> #
> >>
> >> map -altgr -shift 0x29 0x02..0x0D ~ "\1234567890'«"
> >> map -altgr -shift 0x10..0x1B ~ "qwertyuiop+'"
> >> map -altgr -shift 0x1E..0x28 0x2B ~ "asdfghjklçº~"
> >
> > Looks good so far, though "KBD_PORTUGUSE" should be "KBD_PORTUGUESE".
> >
> >> map -altgr -shift 0x56 0x2C..0x35 ~ "<zxcvbnm,.-"
> >> (the last character of the second row is a dead key, the accent
> character in
> >> "a" letter like á)
> >>
> >
> > Dead keys may be a problem. We've had issues supporting these in the
> > past, as it varies widely by browser and OS how the resulting key
> > events are exposed to JavaScript (if at all).
> >
> > I'd be interested to hear what you see when you type "á" using dead
> > keys while on our JavaScript key event test page:
> >
> > http://guacamole.incubator.apache.org/pub/tests/key-event-test.html
> >
> > As well as what happens on the Guacamole key event test page:
> >
> > http://guacamole.incubator.apache.org/pub/tests/guac/keyboard-test.html
> >
> >> map -altgr +shift 0x29 0x02..0x0D ~ "|!"#$%&/()=?»"
> >> map -altgr +shift 0x10..0x1B ~ "QWERTYUIOP*`"
> >> map -altgr +shift 0x1E..0x28 0x2B ~ "ASDFGHJKLçª^"
> >> map -altgr +shift 0x56 0x2C..0x35 ~ ">ZXCVBNM;:_"
> >>
> >> #
> >> # Keys requiring AltGr
> >> #
> >>
> >> map +altgr -shift 0x12 ~ "€"
> >> map +altgr -shift 0x09 ~ "["
> >> map +altgr -shift 0x0A ~ "]"
> >> map +altgr -shift 0x03 ~ "@"
> >> map +altgr -shift 0x04 ~ "£"
> >> map +altgr -shift 0x05 ~ "§"
> >> map +altgr -shift 0x08 ~ "{"
> >> map +altgr -shift 0x0B ~ "}"
> >> map +altgr -shift 0x1A ~ "¨"
> >>
> >> Those this looks OK to you?
> >>
> >
> > In general, yes, but I don't have a Portuguese keyboard to compare
> > against. If these mappings seem to work for you thus far (with the
> > exception of dead keys), then I'd say you're on the right track.
> >
> >> Yesterday, I've tried a similar setup on failsafe.keymap supposing it
> was
> >> the unicode option in the web client, but some keys didn't work like
> 0x29 \
> >> between others.
> >>
> >
> > The "failsafe.keymap" is a barebones keymap which defines only the
> > keys common to most layouts which are not available via Unicode. The
> > keymap system built into Guacamole's RDP support will default to
> > sending Unicode events (which are distinct from key events, but
> > supported by Windows and RDP) if there are no combinations of
> > scancodes which can produce the desired effect. By not defining
> > virtually any keys, the failsafe keymap forces use of Unicode events
> > for everything.
> >
> >> Last questions:
> >>
> >> - does failsafe.keymap correspond to unicode?
> >
> > Yes, in that it forces the Guacamole RDP keymap system to fallback to
> > Unicode events. This can be problematic in some cases, however,
> > especially if the RDP server does not implement Unicode events (like
> > XRDP and some virtualization software).
> >
> >> - Is it easy to add a new keyboard option in the web client?
> >>
> >
> > Yes. All available options for the admin interface are defined using
> > JSON within guacamole-ext [1]. You would need to add your option to
> > that JSON definition.
> >
> > Once that's done, you'll need to add a translation string at least for
> > English so that the interface knows what to display when rendering the
> > option [2].
> >
> >> Once more, thank you.
> >>
> >
> > Sure thing. Please give it another shot, and definitely come back if
> > you have any further questions.
> >
> > It would be wonderful to get some more keymaps added to the RDP
> > support, and hopefully use this to drive development which gets dead
> > keys working correctly ... if that is possible at all.
> >
> > Thanks,
> >
> > - Mike
> >
> > [1]
> https://github.com/apache/incubator-guacamole-client/blob/e8232315ce06fbb480ebf5785ea866577bd3e994/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json#L63-L76
> > [2]
> https://github.com/apache/incubator-guacamole-client/blob/e8232315ce06fbb480ebf5785ea866577bd3e994/guacamole/src/main/webapp/translations/en.json#L337-L344
>
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by Joao Alexandre <ja...@gmail.com>.
Hi Mike,
Very useful information, I'll try and get back for feedback.
NOTE: PORTUGUSE was definitively a typo :), although our Portuguese
soccer team isn't doing very well, shame on them.
What you asked for (á):
http://guacamole.incubator.apache.org/pub/tests/key-event-test.html
IE11 on Windows 10
keydown e.keyCode=186 e.which=186 e.keyIdentifier=undefined
e.key=Unidentified e.altKey=false e.ctrlKey=false
e.altGraphKey=undefined e.metaKey=false e.shiftKey=false e.location=0
e.keyLocation=undefined
keyup e.keyCode=186 e.which=186 e.keyIdentifier=undefined
e.key=Unidentified e.altKey=false e.ctrlKey=false
e.altGraphKey=undefined e.metaKey=false e.shiftKey=false e.location=0
e.keyLocation=undefined
keydown e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
keypress e.keyCode=225 e.which=225 e.keyIdentifier=undefined e.key=á
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
keyup e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
Firefox ESR 45.1.1 on Windows 10
keydown e.keyCode=192 e.which=192 e.keyIdentifier=undefined e.key=Dead
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
keydown e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=á
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
keypress e.keyCode=0 e.which=225 e.keyIdentifier=undefined e.key=á
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
keyup e.keyCode=192 e.which=192 e.keyIdentifier=undefined e.key=´
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
keyup e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
Google Chrome 50.0.2661.102 m on WIndows 10
keydowne.keyCode=186e.which=186e.keyIdentifier=U+00BAe.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
keyupe.keyCode=186e.which=186e.keyIdentifier=U+00BAe.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
keydowne.keyCode=65e.which=65e.keyIdentifier=U+0041e.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
keypresse.keyCode=225e.which=225e.keyIdentifier=U+00E1e.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
keyupe.keyCode=65e.which=65e.keyIdentifier=U+0041e.key=undefinede.altKey=falsee.ctrlKey=falsee.altGraphKey=undefinede.metaKey=falsee.shiftKey=falsee.location=0e.keyLocation=undefined
Edge on WIndows 10
keydown e.keyCode=186 e.which=186 e.keyIdentifier=undefined
e.key=Unidentified e.altKey=false e.ctrlKey=false
e.altGraphKey=undefined e.metaKey=false e.shiftKey=false e.location=0
e.keyLocation=undefined
keyup e.keyCode=186 e.which=186 e.keyIdentifier=undefined
e.key=Unidentified e.altKey=false e.ctrlKey=false
e.altGraphKey=undefined e.metaKey=false e.shiftKey=false e.location=0
e.keyLocation=undefined
keydown e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
keypress e.keyCode=225 e.which=225 e.keyIdentifier=undefined e.key=á
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
keyup e.keyCode=65 e.which=65 e.keyIdentifier=undefined e.key=a
e.altKey=false e.ctrlKey=false e.altGraphKey=undefined e.metaKey=false
e.shiftKey=false e.location=0 e.keyLocation=undefined
http://guacamole.incubator.apache.org/pub/tests/guac/keyboard-test.html
IE11 on WIndows 10
guacamole keydown 0x61 U+0061 LATIN SMALL LETTER A
guacamole keyup 0x61 U+0061 LATIN SMALL LETTER A
Firefox ESR 45.1.1 on Windows 10
guacamole keydown 0xe1 U+00E1 LATIN SMALL LETTER A WITH ACUTE
guacamole keyup 0xe1 U+00E1 LATIN SMALL LETTER A WITH ACUTE
Google Chrome 50.0.2661.102 m on WIndows 10
guacamolekeydown0xe1U+00E1 LATIN SMALL LETTER A WITH ACUTE
guacamolkeyup0xe1U+00E1 LATIN SMALL LETTER A WITH ACUTE
Edge on WIndows 10
guacamole keydown 0x61 U+0061 LATIN SMALL LETTER A
guacamole keyup 0x61 U+0061 LATIN SMALL LETTER A
Kind regards,
João
On Sun, Jun 19, 2016 at 6:18 AM, Mike Jumper <mi...@guac-dev.org> wrote:
> On Sat, Jun 18, 2016 at 4:28 PM, Joao Alexandre
> <ja...@gmail.com> wrote:
>> Hi Mike,
>>
>> Sorry, I've sent a message without being finished.
>>
>> I've always been a polite guy, but my 52 years old is driving me impatient,
>> so I'm really sorry for my precipitated "bump myself".
>>
>> First things first, thank you Mike for this detailed, time consuming and
>> enlightened reply.
>>
>
> No problem!
>
>> Indeed yesterday, I've made a git clone of both Guacamole server and client,
>> as I've found the files you've mentioned at "src/protocols/rdp/keymaps".
>> I've looked at all of them, made a new one based on the French or Italian
>> files, I really don't recall, and altered a Makefile so that the
>> "pt_pt_qwerty.keymap" would get compiled. After I tried to test it but then
>> I've realized that the web client interface didn't have the option to choose
>> my new keyboard, and I could not find out to do it.
>
> Ah, OK.
>
>> Next, I've copied my new Portuguese keymap file over the failsafe.keymap,
>> that I thought it was the unicode option in the web interface. I tried these
>> combination but I had several mismatch keys. I also search in Google for
>> keyboard scan codes, but I could find any information useful, at least to my
>> knowledge, so I got frustrated. The Portuguese keyboard has more keys than
>> the English one, and at the end of the day I've quit.
>>
>
> Figuring out the proper scancodes for keys which are missing from the
> English keyboard will be difficult, but not impossible. They must
> exist if such keyboards work with RDP at all, so it's just a matter of
> time.
>
>> Today after reading your post, I've decided to give it another try, I still
>> have doubts.
>>
>> Forme the Portuguese keymap file should look like this:
>>
>> parent "base"
>> name "pt-pt-qwerty"
>> freerdp "KBD_PORTUGUSE"
>>
>> #
>> # Basic keys
>> #
>>
>> map -altgr -shift 0x29 0x02..0x0D ~ "\1234567890'«"
>> map -altgr -shift 0x10..0x1B ~ "qwertyuiop+'"
>> map -altgr -shift 0x1E..0x28 0x2B ~ "asdfghjklçº~"
>
> Looks good so far, though "KBD_PORTUGUSE" should be "KBD_PORTUGUESE".
>
>> map -altgr -shift 0x56 0x2C..0x35 ~ "<zxcvbnm,.-"
>> (the last character of the second row is a dead key, the accent character in
>> "a" letter like á)
>>
>
> Dead keys may be a problem. We've had issues supporting these in the
> past, as it varies widely by browser and OS how the resulting key
> events are exposed to JavaScript (if at all).
>
> I'd be interested to hear what you see when you type "á" using dead
> keys while on our JavaScript key event test page:
>
> http://guacamole.incubator.apache.org/pub/tests/key-event-test.html
>
> As well as what happens on the Guacamole key event test page:
>
> http://guacamole.incubator.apache.org/pub/tests/guac/keyboard-test.html
>
>> map -altgr +shift 0x29 0x02..0x0D ~ "|!"#$%&/()=?»"
>> map -altgr +shift 0x10..0x1B ~ "QWERTYUIOP*`"
>> map -altgr +shift 0x1E..0x28 0x2B ~ "ASDFGHJKLçª^"
>> map -altgr +shift 0x56 0x2C..0x35 ~ ">ZXCVBNM;:_"
>>
>> #
>> # Keys requiring AltGr
>> #
>>
>> map +altgr -shift 0x12 ~ "€"
>> map +altgr -shift 0x09 ~ "["
>> map +altgr -shift 0x0A ~ "]"
>> map +altgr -shift 0x03 ~ "@"
>> map +altgr -shift 0x04 ~ "£"
>> map +altgr -shift 0x05 ~ "§"
>> map +altgr -shift 0x08 ~ "{"
>> map +altgr -shift 0x0B ~ "}"
>> map +altgr -shift 0x1A ~ "¨"
>>
>> Those this looks OK to you?
>>
>
> In general, yes, but I don't have a Portuguese keyboard to compare
> against. If these mappings seem to work for you thus far (with the
> exception of dead keys), then I'd say you're on the right track.
>
>> Yesterday, I've tried a similar setup on failsafe.keymap supposing it was
>> the unicode option in the web client, but some keys didn't work like 0x29 \
>> between others.
>>
>
> The "failsafe.keymap" is a barebones keymap which defines only the
> keys common to most layouts which are not available via Unicode. The
> keymap system built into Guacamole's RDP support will default to
> sending Unicode events (which are distinct from key events, but
> supported by Windows and RDP) if there are no combinations of
> scancodes which can produce the desired effect. By not defining
> virtually any keys, the failsafe keymap forces use of Unicode events
> for everything.
>
>> Last questions:
>>
>> - does failsafe.keymap correspond to unicode?
>
> Yes, in that it forces the Guacamole RDP keymap system to fallback to
> Unicode events. This can be problematic in some cases, however,
> especially if the RDP server does not implement Unicode events (like
> XRDP and some virtualization software).
>
>> - Is it easy to add a new keyboard option in the web client?
>>
>
> Yes. All available options for the admin interface are defined using
> JSON within guacamole-ext [1]. You would need to add your option to
> that JSON definition.
>
> Once that's done, you'll need to add a translation string at least for
> English so that the interface knows what to display when rendering the
> option [2].
>
>> Once more, thank you.
>>
>
> Sure thing. Please give it another shot, and definitely come back if
> you have any further questions.
>
> It would be wonderful to get some more keymaps added to the RDP
> support, and hopefully use this to drive development which gets dead
> keys working correctly ... if that is possible at all.
>
> Thanks,
>
> - Mike
>
> [1] https://github.com/apache/incubator-guacamole-client/blob/e8232315ce06fbb480ebf5785ea866577bd3e994/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json#L63-L76
> [2] https://github.com/apache/incubator-guacamole-client/blob/e8232315ce06fbb480ebf5785ea866577bd3e994/guacamole/src/main/webapp/translations/en.json#L337-L344
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by Mike Jumper <mi...@guac-dev.org>.
On Sat, Jun 18, 2016 at 4:28 PM, Joao Alexandre
<ja...@gmail.com> wrote:
> Hi Mike,
>
> Sorry, I've sent a message without being finished.
>
> I've always been a polite guy, but my 52 years old is driving me impatient,
> so I'm really sorry for my precipitated "bump myself".
>
> First things first, thank you Mike for this detailed, time consuming and
> enlightened reply.
>
No problem!
> Indeed yesterday, I've made a git clone of both Guacamole server and client,
> as I've found the files you've mentioned at "src/protocols/rdp/keymaps".
> I've looked at all of them, made a new one based on the French or Italian
> files, I really don't recall, and altered a Makefile so that the
> "pt_pt_qwerty.keymap" would get compiled. After I tried to test it but then
> I've realized that the web client interface didn't have the option to choose
> my new keyboard, and I could not find out to do it.
Ah, OK.
> Next, I've copied my new Portuguese keymap file over the failsafe.keymap,
> that I thought it was the unicode option in the web interface. I tried these
> combination but I had several mismatch keys. I also search in Google for
> keyboard scan codes, but I could find any information useful, at least to my
> knowledge, so I got frustrated. The Portuguese keyboard has more keys than
> the English one, and at the end of the day I've quit.
>
Figuring out the proper scancodes for keys which are missing from the
English keyboard will be difficult, but not impossible. They must
exist if such keyboards work with RDP at all, so it's just a matter of
time.
> Today after reading your post, I've decided to give it another try, I still
> have doubts.
>
> Forme the Portuguese keymap file should look like this:
>
> parent "base"
> name "pt-pt-qwerty"
> freerdp "KBD_PORTUGUSE"
>
> #
> # Basic keys
> #
>
> map -altgr -shift 0x29 0x02..0x0D ~ "\1234567890'«"
> map -altgr -shift 0x10..0x1B ~ "qwertyuiop+'"
> map -altgr -shift 0x1E..0x28 0x2B ~ "asdfghjklçº~"
Looks good so far, though "KBD_PORTUGUSE" should be "KBD_PORTUGUESE".
> map -altgr -shift 0x56 0x2C..0x35 ~ "<zxcvbnm,.-"
> (the last character of the second row is a dead key, the accent character in
> "a" letter like á)
>
Dead keys may be a problem. We've had issues supporting these in the
past, as it varies widely by browser and OS how the resulting key
events are exposed to JavaScript (if at all).
I'd be interested to hear what you see when you type "á" using dead
keys while on our JavaScript key event test page:
http://guacamole.incubator.apache.org/pub/tests/key-event-test.html
As well as what happens on the Guacamole key event test page:
http://guacamole.incubator.apache.org/pub/tests/guac/keyboard-test.html
> map -altgr +shift 0x29 0x02..0x0D ~ "|!"#$%&/()=?»"
> map -altgr +shift 0x10..0x1B ~ "QWERTYUIOP*`"
> map -altgr +shift 0x1E..0x28 0x2B ~ "ASDFGHJKLçª^"
> map -altgr +shift 0x56 0x2C..0x35 ~ ">ZXCVBNM;:_"
>
> #
> # Keys requiring AltGr
> #
>
> map +altgr -shift 0x12 ~ "€"
> map +altgr -shift 0x09 ~ "["
> map +altgr -shift 0x0A ~ "]"
> map +altgr -shift 0x03 ~ "@"
> map +altgr -shift 0x04 ~ "£"
> map +altgr -shift 0x05 ~ "§"
> map +altgr -shift 0x08 ~ "{"
> map +altgr -shift 0x0B ~ "}"
> map +altgr -shift 0x1A ~ "¨"
>
> Those this looks OK to you?
>
In general, yes, but I don't have a Portuguese keyboard to compare
against. If these mappings seem to work for you thus far (with the
exception of dead keys), then I'd say you're on the right track.
> Yesterday, I've tried a similar setup on failsafe.keymap supposing it was
> the unicode option in the web client, but some keys didn't work like 0x29 \
> between others.
>
The "failsafe.keymap" is a barebones keymap which defines only the
keys common to most layouts which are not available via Unicode. The
keymap system built into Guacamole's RDP support will default to
sending Unicode events (which are distinct from key events, but
supported by Windows and RDP) if there are no combinations of
scancodes which can produce the desired effect. By not defining
virtually any keys, the failsafe keymap forces use of Unicode events
for everything.
> Last questions:
>
> - does failsafe.keymap correspond to unicode?
Yes, in that it forces the Guacamole RDP keymap system to fallback to
Unicode events. This can be problematic in some cases, however,
especially if the RDP server does not implement Unicode events (like
XRDP and some virtualization software).
> - Is it easy to add a new keyboard option in the web client?
>
Yes. All available options for the admin interface are defined using
JSON within guacamole-ext [1]. You would need to add your option to
that JSON definition.
Once that's done, you'll need to add a translation string at least for
English so that the interface knows what to display when rendering the
option [2].
> Once more, thank you.
>
Sure thing. Please give it another shot, and definitely come back if
you have any further questions.
It would be wonderful to get some more keymaps added to the RDP
support, and hopefully use this to drive development which gets dead
keys working correctly ... if that is possible at all.
Thanks,
- Mike
[1] https://github.com/apache/incubator-guacamole-client/blob/e8232315ce06fbb480ebf5785ea866577bd3e994/guacamole-ext/src/main/resources/org/apache/guacamole/protocols/rdp.json#L63-L76
[2] https://github.com/apache/incubator-guacamole-client/blob/e8232315ce06fbb480ebf5785ea866577bd3e994/guacamole/src/main/webapp/translations/en.json#L337-L344
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by Joao Alexandre <ja...@gmail.com>.
Hi Mike,
Sorry, I've sent a message without being finished.
I've always been a polite guy, but my 52 years old is driving me impatient,
so I'm really sorry for my precipitated "bump myself".
First things first, thank you Mike for this detailed, time consuming and
enlightened reply.
Indeed yesterday, I've made a git clone of both Guacamole server and
client, as I've found the files you've mentioned at
"src/protocols/rdp/keymaps". I've looked at all of them, made a new one
based on the French or Italian files, I really don't recall, and altered a
Makefile so that the "pt_pt_qwerty.keymap" would get compiled. After I
tried to test it but then I've realized that the web client interface
didn't have the option to choose my new keyboard, and I could not find out
to do it.
Next, I've copied my new Portuguese keymap file over the failsafe.keymap,
that I thought it was the unicode option in the web interface. I tried
these combination but I had several mismatch keys. I also search in Google
for keyboard scan codes, but I could find any information useful, at least
to my knowledge, so I got frustrated. The Portuguese keyboard has more keys
than the English one, and at the end of the day I've quit.
Today after reading your post, I've decided to give it another try, I still
have doubts.
Forme the Portuguese keymap file should look like this:
parent "base"
name "pt-pt-qwerty"
freerdp "KBD_PORTUGUSE"
#
# Basic keys
#
map -altgr -shift 0x29 0x02..0x0D ~ "\1234567890'«"
map -altgr -shift 0x10..0x1B ~ "qwertyuiop+'"
map -altgr -shift 0x1E..0x28 0x2B ~ "asdfghjklçº~"
map -altgr -shift 0x56 0x2C..0x35 ~ "<zxcvbnm,.-"
(the last character of the second row is a dead key, the accent character
in "a" letter like á)
map -altgr +shift 0x29 0x02..0x0D ~ "|!"#$%&/()=?»"
map -altgr +shift 0x10..0x1B ~ "QWERTYUIOP*`"
map -altgr +shift 0x1E..0x28 0x2B ~ "ASDFGHJKLçª^"
map -altgr +shift 0x56 0x2C..0x35 ~ ">ZXCVBNM;:_"
#
# Keys requiring AltGr
#
map +altgr -shift 0x12 ~ "€"
map +altgr -shift 0x09 ~ "["
map +altgr -shift 0x0A ~ "]"
map +altgr -shift 0x03 ~ "@"
map +altgr -shift 0x04 ~ "£"
map +altgr -shift 0x05 ~ "§"
map +altgr -shift 0x08 ~ "{"
map +altgr -shift 0x0B ~ "}"
map +altgr -shift 0x1A ~ "¨"
Those this looks OK to you?
Yesterday, I've tried a similar setup on failsafe.keymap supposing it was
the unicode option in the web client, but some keys didn't work like 0x29 \
between others.
Last questions:
- does failsafe.keymap correspond to unicode?
- Is it easy to add a new keyboard option in the web client?
Once more, thank you.
Kind regards,
João Alexandre
On Sat, Jun 18, 2016 at 5:45 AM, Mike Jumper <mi...@guac-dev.org>
wrote:
> On Fri, Jun 17, 2016 at 4:49 AM, Joao Alexandre <ja...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> I do understand that this mailing list isn't an answering machine, but
>> could anyone give me some help, tip, please?
>>
>>
> Hi João,
>
> Please be patient [1]. Sometimes we respond quickly, other times slowly.
> We always try to respond eventually, but we are all volunteers here.
> There's no harm in giving your email thread a friendly bump, but please
> keep this in mind.
>
>
>> On Wed, Jun 15, 2016 at 5:42 PM, Joao Alexandre <jalexandre1964@gmail.com
>> > wrote:
>>
>>> Hi All,
>>>
>>> I would like very much to have a Portuguese European (pt-PT, Portugal)
>>> RDP keyboard layout in Guacamole.
>>>
>>> I'm not a programmer, but I'm available to help anyway to accomplish
>>> this.
>>>
>>
> Great!
>
> This actually shouldn't be too tricky. Adding a new keyboard layout does
> not require any real programming, but you would need to create a keyboard
> mapping file. There are a few examples of this in the source [2][3], so the
> first thing I would recommend is that you take a brief look at those files
> and see what you think.
>
> You need to understand at least conceptually the purpose of these
> mappings. Guacamole uses "keysyms" to represent pressed/released keys.
> These are conveniently well-defined by X11 and are quite thorough; they
> represent the *identity* of a key, as well as the implied behavior. If you
> attempt to type "a", Guacamole will send the keysym representing the
> lowercase letter "a". Protocols like VNC and SSH are very happy with this,
> as they also only care about the identity of the key or character, not the
> hardware implementation of that key.
>
> RDP is a different animal. It uses scancodes to represent keys. Keyboard
> scancodes do not represent the identity of the key - they represent the
> *location* of the key. If you press "a" while using an RDP client, the
> client sends a key event to the server which more-or-less translates to
> "the user pressed the second key in the second row". Clearly, determining
> what that actually means depends on the keyboard layout, which brings us to
> Guacamole's RDP keymap system:
>
> Guacamole's RDP support contains a system which translates received
> keysyms to a corresponding sequence of scancodes, where that sequence is
> whatever is required to duplicate the function of the pressed key on the
> RDP server. Often, this is a simple one-to-one mapping of keysym to
> scancode, but it can get much more complicated. Take, for example, the "@"
> character:
>
> On a US keyboard, this is typed by pressing Shift+2. On a German keyboard,
> this is typed by pressing AltGr+Q. Thus, if you're using a US keyboard
> while connected to an RDP server that expects a German keyboard, Guacamole
> has to perform some shuffling when following when you type "@":
>
> 1) The Shift key is currently held down, but the remote keyboard cannot
> type "@" with Shift. Release Shift.
> 2) The AltGr key is not held down, but the remote keyboard requires this
> for "@". Press AltGr.
> 3) The "@" key maps to scancode 0x10 - send that.
> 4) The AltGr key was not originally held down. Release AltGr to restore
> state.
> 5) The Shift key was originally held down. Press Shift to restore state.
>
> This behavior is automatic thanks to the keymap files mentioned above. In
> this case, it's due to the following simple line in the German keyboard
> mapping file:
>
> map +altgr -shift 0x10 ~ "@"
>
> which essentially means "to type '@', use scancode 0x10, and ensure that
> AltGr is pressed and Shift is released". The keymap file syntax is more
> flexible than this, though, and allows you to define entire swaths of keys
> in a way that is visually easy to verify:
>
> map -altgr -shift 0x02..0x0C ~ "1234567890ß"
> map -altgr -shift 0x10..0x1B ~ "qwertzuiopü+"
> map -altgr -shift 0x1E..0x28 0x2B ~ "asdfghjklöä#"
> map -altgr -shift 0x56 0x2C..0x35 ~ "<yxcvbnm,.-"
>
> The whole concept is to define the requirements and behavior of the
> keyboard that the RDP server is using, such that incoming keysyms from the
> Guacamole client can be correctly and automatically translated into
> sequences of scancodes based on the meanings of those keys from both the
> client's and server's perspectives.
>
> ... make sense?
>
> Let me know if you have any questions on this.
>
> Thanks,
>
> - Mike
>
> [1] http://www.apache.org/dev/contrib-email-tips#patience
> [2]
> https://github.com/apache/incubator-guacamole-server/blob/master/src/protocols/rdp/keymaps/en_us_qwerty.keymap
> [3]
> https://github.com/apache/incubator-guacamole-server/blob/master/src/protocols/rdp/keymaps/de_de_qwertz.keymap
>
>
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by Joao Alexandre <ja...@gmail.com>.
Hi Mike,
I've always been a polite guy, but my 52 years old is driving me impatient,
so I'm really sorry for my precipitated "bump myself".
First things first, thank you Mike for this detailed, time consuming and
enlightened reply.
Indeed yesterday, I've made a git clone of both Guacamole server and
client, as I've found the files you've mentioned at
"src/protocols/rdp/keymaps". I've looked at all of them, made a new one
based on the French or Italian files, I really don't recall, and altered a
Makefile so that the "pt_pt_qwerty.keymap" would get compiled. After I
tried to test it but then I've realized that the web client interface
didn't have the option to choose my new keyboard, and I could not find out
to do it.
Next, I've copied my new Portuguese keymap file over the failsafe.keymap,
that I thought it was the unicode option in the web interface. I tried
these combination but I had several mismatch keys. I also search in Google
for keyboard scan codes, but I could find any information useful, at least
to my knowledge, so I got frustrated. The Portuguese keyboard has more keys
than the English one, and at the end of the day I've quit.
Today after reading your post, I've decided to give it another try, I still
have doubts.
Forme the Portuguese keymap file should look like this:
parent "base"
name "pt-pt-qwerty"
freerdp "KBD_PORTUGUSE"
#
# Basic keys
#
map -altgr -shift 0x29 0x02..0x0D ~ "\1234567890'«"map -altgr
-shift 0x10..0x1B ~ "qwertyuiop+'" map -altgr -shift
0x1E..0x28 0x2B ~ "asdfghjklçº~"map -altgr -shift 0x56 0x2C..0x35
~ "<zxcvbnm,.-"
(the last character of the second row is a dead key, the accent
character in "a" letter like á)
map -altgr +shift 0x29 0x02..0x0D ~ "|!"#$%&/()=?»"
map -altgr +shift 0x10..0x1B ~ "QWERTYUIOP*'"
map -altgr +shift 0x1E..0x28 0x2B ~ "ASDFGHJKLçª^"map -altgr
+shift 0x56 0x2C..0x35 ~ ">ZXCVBNM;:_"
(the last character of the second row is a dead key, the accent
character in "a" letter like à)
#
# Keys requiring AltGr
#
map +altgr -shift 0x12 ~ "€"
map +altgr -shift 0x1A ~ "["
map +altgr -shift 0x1B ~ "]"
map +altgr -shift 0x03 ~ "@"map +altgr -shift 0x04 ~ "£"
map +altgr -shift 0x04 ~ "£"
map +altgr +shift 0x1A ~ "{" map +altgr +shift 0x1B ~ "}"
On Sat, Jun 18, 2016 at 5:45 AM, Mike Jumper <mi...@guac-dev.org>
wrote:
> On Fri, Jun 17, 2016 at 4:49 AM, Joao Alexandre <ja...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> I do understand that this mailing list isn't an answering machine, but
>> could anyone give me some help, tip, please?
>>
>>
> Hi João,
>
> Please be patient [1]. Sometimes we respond quickly, other times slowly.
> We always try to respond eventually, but we are all volunteers here.
> There's no harm in giving your email thread a friendly bump, but please
> keep this in mind.
>
>
>> On Wed, Jun 15, 2016 at 5:42 PM, Joao Alexandre <jalexandre1964@gmail.com
>> > wrote:
>>
>>> Hi All,
>>>
>>> I would like very much to have a Portuguese European (pt-PT, Portugal)
>>> RDP keyboard layout in Guacamole.
>>>
>>> I'm not a programmer, but I'm available to help anyway to accomplish
>>> this.
>>>
>>
> Great!
>
> This actually shouldn't be too tricky. Adding a new keyboard layout does
> not require any real programming, but you would need to create a keyboard
> mapping file. There are a few examples of this in the source [2][3], so the
> first thing I would recommend is that you take a brief look at those files
> and see what you think.
>
> You need to understand at least conceptually the purpose of these
> mappings. Guacamole uses "keysyms" to represent pressed/released keys.
> These are conveniently well-defined by X11 and are quite thorough; they
> represent the *identity* of a key, as well as the implied behavior. If you
> attempt to type "a", Guacamole will send the keysym representing the
> lowercase letter "a". Protocols like VNC and SSH are very happy with this,
> as they also only care about the identity of the key or character, not the
> hardware implementation of that key.
>
> RDP is a different animal. It uses scancodes to represent keys. Keyboard
> scancodes do not represent the identity of the key - they represent the
> *location* of the key. If you press "a" while using an RDP client, the
> client sends a key event to the server which more-or-less translates to
> "the user pressed the second key in the second row". Clearly, determining
> what that actually means depends on the keyboard layout, which brings us to
> Guacamole's RDP keymap system:
>
> Guacamole's RDP support contains a system which translates received
> keysyms to a corresponding sequence of scancodes, where that sequence is
> whatever is required to duplicate the function of the pressed key on the
> RDP server. Often, this is a simple one-to-one mapping of keysym to
> scancode, but it can get much more complicated. Take, for example, the "@"
> character:
>
> On a US keyboard, this is typed by pressing Shift+2. On a German keyboard,
> this is typed by pressing AltGr+Q. Thus, if you're using a US keyboard
> while connected to an RDP server that expects a German keyboard, Guacamole
> has to perform some shuffling when following when you type "@":
>
> 1) The Shift key is currently held down, but the remote keyboard cannot
> type "@" with Shift. Release Shift.
> 2) The AltGr key is not held down, but the remote keyboard requires this
> for "@". Press AltGr.
> 3) The "@" key maps to scancode 0x10 - send that.
> 4) The AltGr key was not originally held down. Release AltGr to restore
> state.
> 5) The Shift key was originally held down. Press Shift to restore state.
>
> This behavior is automatic thanks to the keymap files mentioned above. In
> this case, it's due to the following simple line in the German keyboard
> mapping file:
>
> map +altgr -shift 0x10 ~ "@"
>
> which essentially means "to type '@', use scancode 0x10, and ensure that
> AltGr is pressed and Shift is released". The keymap file syntax is more
> flexible than this, though, and allows you to define entire swaths of keys
> in a way that is visually easy to verify:
>
> map -altgr -shift 0x02..0x0C ~ "1234567890ß"
> map -altgr -shift 0x10..0x1B ~ "qwertzuiopü+"
> map -altgr -shift 0x1E..0x28 0x2B ~ "asdfghjklöä#"
> map -altgr -shift 0x56 0x2C..0x35 ~ "<yxcvbnm,.-"
>
> The whole concept is to define the requirements and behavior of the
> keyboard that the RDP server is using, such that incoming keysyms from the
> Guacamole client can be correctly and automatically translated into
> sequences of scancodes based on the meanings of those keys from both the
> client's and server's perspectives.
>
> ... make sense?
>
> Let me know if you have any questions on this.
>
> Thanks,
>
> - Mike
>
> [1] http://www.apache.org/dev/contrib-email-tips#patience
> [2]
> https://github.com/apache/incubator-guacamole-server/blob/master/src/protocols/rdp/keymaps/en_us_qwerty.keymap
> [3]
> https://github.com/apache/incubator-guacamole-server/blob/master/src/protocols/rdp/keymaps/de_de_qwertz.keymap
>
>
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by Mike Jumper <mi...@guac-dev.org>.
On Fri, Jun 17, 2016 at 4:49 AM, Joao Alexandre <ja...@gmail.com>
wrote:
> Hi All,
>
> I do understand that this mailing list isn't an answering machine, but
> could anyone give me some help, tip, please?
>
>
Hi João,
Please be patient [1]. Sometimes we respond quickly, other times slowly. We
always try to respond eventually, but we are all volunteers here. There's
no harm in giving your email thread a friendly bump, but please keep this
in mind.
> On Wed, Jun 15, 2016 at 5:42 PM, Joao Alexandre <ja...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> I would like very much to have a Portuguese European (pt-PT, Portugal)
>> RDP keyboard layout in Guacamole.
>>
>> I'm not a programmer, but I'm available to help anyway to accomplish this.
>>
>
Great!
This actually shouldn't be too tricky. Adding a new keyboard layout does
not require any real programming, but you would need to create a keyboard
mapping file. There are a few examples of this in the source [2][3], so the
first thing I would recommend is that you take a brief look at those files
and see what you think.
You need to understand at least conceptually the purpose of these mappings.
Guacamole uses "keysyms" to represent pressed/released keys. These are
conveniently well-defined by X11 and are quite thorough; they represent the
*identity* of a key, as well as the implied behavior. If you attempt to
type "a", Guacamole will send the keysym representing the lowercase letter
"a". Protocols like VNC and SSH are very happy with this, as they also only
care about the identity of the key or character, not the hardware
implementation of that key.
RDP is a different animal. It uses scancodes to represent keys. Keyboard
scancodes do not represent the identity of the key - they represent the
*location* of the key. If you press "a" while using an RDP client, the
client sends a key event to the server which more-or-less translates to
"the user pressed the second key in the second row". Clearly, determining
what that actually means depends on the keyboard layout, which brings us to
Guacamole's RDP keymap system:
Guacamole's RDP support contains a system which translates received keysyms
to a corresponding sequence of scancodes, where that sequence is whatever
is required to duplicate the function of the pressed key on the RDP server.
Often, this is a simple one-to-one mapping of keysym to scancode, but it
can get much more complicated. Take, for example, the "@" character:
On a US keyboard, this is typed by pressing Shift+2. On a German keyboard,
this is typed by pressing AltGr+Q. Thus, if you're using a US keyboard
while connected to an RDP server that expects a German keyboard, Guacamole
has to perform some shuffling when following when you type "@":
1) The Shift key is currently held down, but the remote keyboard cannot
type "@" with Shift. Release Shift.
2) The AltGr key is not held down, but the remote keyboard requires this
for "@". Press AltGr.
3) The "@" key maps to scancode 0x10 - send that.
4) The AltGr key was not originally held down. Release AltGr to restore
state.
5) The Shift key was originally held down. Press Shift to restore state.
This behavior is automatic thanks to the keymap files mentioned above. In
this case, it's due to the following simple line in the German keyboard
mapping file:
map +altgr -shift 0x10 ~ "@"
which essentially means "to type '@', use scancode 0x10, and ensure that
AltGr is pressed and Shift is released". The keymap file syntax is more
flexible than this, though, and allows you to define entire swaths of keys
in a way that is visually easy to verify:
map -altgr -shift 0x02..0x0C ~ "1234567890ß"
map -altgr -shift 0x10..0x1B ~ "qwertzuiopü+"
map -altgr -shift 0x1E..0x28 0x2B ~ "asdfghjklöä#"
map -altgr -shift 0x56 0x2C..0x35 ~ "<yxcvbnm,.-"
The whole concept is to define the requirements and behavior of the
keyboard that the RDP server is using, such that incoming keysyms from the
Guacamole client can be correctly and automatically translated into
sequences of scancodes based on the meanings of those keys from both the
client's and server's perspectives.
... make sense?
Let me know if you have any questions on this.
Thanks,
- Mike
[1] http://www.apache.org/dev/contrib-email-tips#patience
[2]
https://github.com/apache/incubator-guacamole-server/blob/master/src/protocols/rdp/keymaps/en_us_qwerty.keymap
[3]
https://github.com/apache/incubator-guacamole-server/blob/master/src/protocols/rdp/keymaps/de_de_qwertz.keymap
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by Joao Alexandre <ja...@gmail.com>.
Hi All,
I do understand that this mailing list isn't an answering machine, but
could anyone give me some help, tip, please?
Best regards,
João M. Alexandre
On Wed, Jun 15, 2016 at 5:42 PM, Joao Alexandre <ja...@gmail.com>
wrote:
> Hi All,
>
> I would like very much to have a Portuguese European (pt-PT, Portugal) RDP
> keyboard layout in Guacamole.
>
> I'm not a programmer, but I'm available to help anyway to accomplish this.
>
> I've been trying Guacamole for a few weeks, and it's an awesome product,
> congratulations to the developers and the community.
>
> It's just missing this pt-PT keyboard layout in RDP sessions as it mess up
> the user experience.
>
> How can I help? Is there any config file I can look at and modify?
>
> Best regards,
>
> João M. Alexandre
>
>
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by Mike Jumper <mi...@guac-dev.org>.
李小蛟 - please do not hijack others' threads. If you have additional
information regarding your original post, reply to your own post there.
Thanks,
- Mike
On Jun 15, 2016 5:28 PM, "李小蛟" <li...@icloud.com> wrote:
> hello:
> All I config is referenced by the manual :
> http://guacamole.incubator.apache.org/doc/0.9.9/gug/writing-you-own-guacamole-app.html
> And All the code in the jsp file is below:
> <html>
> <body>
> <!-- Guacamole -->
> <script type="text/javascript" src="guacamole-common-js/all.min.js"></
> script>
> <!-- Display -->
> <div id="display"></div>
> <!-- Init -->
> <script type="text/javascript">
> /* <![CDATA[ */
> // Get display div from document
> var display = document.getElementById("display");
> // Instantiate client, using an HTTP tunnel for communications.
> var guac = new Guacamole.Client(new Guacamole.HTTPTunnel("tunnel"));
> // Add client to display div
> display.appendChild(guac.getDisplay().getElement());
> // Error handler
> guac.onerror = function(error) {
> alert(error);
> };
> // Connect
> guac.connect();
> // Disconnect on close
> window.onunload = function() {
> guac.disconnect();
> }
>
> // Mouse
> var mouse = new Guacamole.Mouse(guac.getDisplay().getElement());
> mouse.onmousedown = mouse.onmouseup = mouse.onmousemove = function(
> mouseState) {
> guac.sendMouseState(mouseState);
> };
> // Keyboard
> var keyboard = new Guacamole.Keyboard(document);
> keyboard.onkeydown = function(keysym) {
> guac.sendKeyEvent(1, keysym);
> };
> keyboard.onkeyup = function(keysym) {
> guac.sendKeyEvent(0, keysym);
> };
>
> /* ]]> */
> </script>
> </body>
>
> <input type="text">
> </html>
>
>
> So as the first email,when i typed in the input,all the keyboard event
> was sent to the computer display . That was not what i wanted.what i want
> is when i typed in the input ,it is showed in the input text.when the mouse
> was moved in the computer display and once i typed the keyboard,it should
> be sent to the computer display.So what i should do to solve this problem?
> [image: 未知.png]
>
> 在 2016年6月16日,上午12:42,Joao Alexandre <ja...@gmail.com> 写道:
>
> Hi All,
>
> I would like very much to have a Portuguese European (pt-PT, Portugal) RDP
> keyboard layout in Guacamole.
>
> I'm not a programmer, but I'm available to help anyway to accomplish this.
>
> I've been trying Guacamole for a few weeks, and it's an awesome product,
> congratulations to the developers and the community.
>
> It's just missing this pt-PT keyboard layout in RDP sessions as it mess up
> the user experience.
>
> How can I help? Is there any config file I can look at and modify?
>
> Best regards,
>
> João M. Alexandre
>
>
>
Re: Portuguese European (pt-PT) RDP keyboard layout.
Posted by 李小蛟 <li...@icloud.com>.
hello:
All I config is referenced by the manual :http://guacamole.incubator.apache.org/doc/0.9.9/gug/writing-you-own-guacamole-app.html <http://guacamole.incubator.apache.org/doc/0.9.9/gug/writing-you-own-guacamole-app.html>
And All the code in the jsp file is below:
<html>
<body>
<!-- Guacamole -->
<script type="text/javascript" src="guacamole-common-js/all.min.js"></script>
<!-- Display -->
<div id="display"></div>
<!-- Init -->
<script type="text/javascript">
/* <![CDATA[ */
// Get display div from document
var display = document.getElementById("display");
// Instantiate client, using an HTTP tunnel for communications.
var guac = new Guacamole.Client(new Guacamole.HTTPTunnel("tunnel"));
// Add client to display div
display.appendChild(guac.getDisplay().getElement());
// Error handler
guac.onerror = function(error) {
alert(error);
};
// Connect
guac.connect();
// Disconnect on close
window.onunload = function() {
guac.disconnect();
}
// Mouse
var mouse = new Guacamole.Mouse(guac.getDisplay().getElement());
mouse.onmousedown = mouse.onmouseup = mouse.onmousemove = function(
mouseState) {
guac.sendMouseState(mouseState);
};
// Keyboard
var keyboard = new Guacamole.Keyboard(document);
keyboard.onkeydown = function(keysym) {
guac.sendKeyEvent(1, keysym);
};
keyboard.onkeyup = function(keysym) {
guac.sendKeyEvent(0, keysym);
};
/* ]]> */
</script>
</body>
<input type="text">
</html>
So as the first email,when i typed in the input,all the keyboard event was sent to the computer display . That was not what i wanted.what i want is when i typed in the input ,it is showed in the input text.when the mouse was moved in the computer display and once i typed the keyboard,it should be sent to the computer display.So what i should do to solve this problem?
> 在 2016年6月16日,上午12:42,Joao Alexandre <ja...@gmail.com> 写道:
>
> Hi All,
>
> I would like very much to have a Portuguese European (pt-PT, Portugal) RDP keyboard layout in Guacamole.
>
> I'm not a programmer, but I'm available to help anyway to accomplish this.
>
> I've been trying Guacamole for a few weeks, and it's an awesome product, congratulations to the developers and the community.
>
> It's just missing this pt-PT keyboard layout in RDP sessions as it mess up the user experience.
>
> How can I help? Is there any config file I can look at and modify?
>
> Best regards,
>
> João M. Alexandre
>