You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by flangelo <gi...@git.apache.org> on 2017/11/13 22:45:23 UTC

[GitHub] incubator-guacamole-server pull request #123: GUACAMOLE-273: Add Brazillian ...

GitHub user flangelo opened a pull request:

    https://github.com/apache/incubator-guacamole-server/pull/123

    GUACAMOLE-273: Add Brazillian ABNT2 keymap for RDP.

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/flangelo/incubator-guacamole-server pt-br_keyboard

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-guacamole-server/pull/123.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #123
    
----

----


---

[GitHub] incubator-guacamole-server pull request #123: GUACAMOLE-273: Add Brazillian ...

Posted by flangelo <gi...@git.apache.org>.
Github user flangelo commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-server/pull/123#discussion_r150946767
  
    --- Diff: src/protocols/rdp/keymaps/pt_br_qwerty.keymap ---
    @@ -0,0 +1,58 @@
    +#
    +# 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-br-qwerty"
    +freerdp "KBD_PORTUGUESE_BRAZILIAN_ABNT2"
    +
    +#
    +# Basic keys
    +#
    +
    +map -altgr -shift 0x29 0x02..0x0D      ~ "'1234567890-="
    +map -altgr -shift      0x10..0x19 0x1B ~ "qwertyuiop["
    +map -altgr -shift      0x1E..0x27 0x2B ~ "asdfghjklç]"
    +map -altgr -shift 0x56 0x2C..0x36      ~ "\zxcvbnm,.;/"
    +
    +map -altgr +shift 0x29 0x02..0x06 0x08..0x0D ~ ""!@#$%&*()_+"
    +map -altgr +shift      0x10..0x19 0x1B       ~ "QWERTYUIOP{"
    +map -altgr +shift      0x1E..0x27 0x2B       ~ "ASDFGHJKLÇ}"
    +map -altgr +shift 0x56 0x2C..0x36            ~ "|ZXCVBNM<>:?"
    +
    +#
    +# Keys requiring AltGr
    +#
    +
    +map +altgr -shift 0x02..0x07 0x0D ~ "¹²³£¢¬§"
    +map +altgr -shift 0x10..0x11 ~ "/?"
    +map +altgr -shift 0x12 ~ "°"
    +map +altgr -shift 0x12 ~ "€" # map € to ° so Mac behaves the same as PC
    --- End diff --
    
    Removing this line behaves fine; Mac users can type the Euro symbol on the Mac ABNT2 keyboard. They should also be able to type degree via Alt/Opt + \ as per Mac ABNT2 layout.


---

[GitHub] incubator-guacamole-server pull request #123: GUACAMOLE-273: Add Brazillian ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-guacamole-server/pull/123


---

[GitHub] incubator-guacamole-server pull request #123: GUACAMOLE-273: Add Brazillian ...

Posted by flangelo <gi...@git.apache.org>.
Github user flangelo commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-server/pull/123#discussion_r150935771
  
    --- Diff: src/protocols/rdp/keymaps/pt_br_qwerty.keymap ---
    @@ -0,0 +1,58 @@
    +#
    +# 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-br-qwerty"
    +freerdp "KBD_PORTUGUESE_BRAZILIAN_ABNT2"
    +
    +#
    +# Basic keys
    +#
    +
    +map -altgr -shift 0x29 0x02..0x0D      ~ "'1234567890-="
    +map -altgr -shift      0x10..0x19 0x1B ~ "qwertyuiop["
    +map -altgr -shift      0x1E..0x27 0x2B ~ "asdfghjklç]"
    +map -altgr -shift 0x56 0x2C..0x36      ~ "\zxcvbnm,.;/"
    +
    +map -altgr +shift 0x29 0x02..0x06 0x08..0x0D ~ ""!@#$%&*()_+"
    +map -altgr +shift      0x10..0x19 0x1B       ~ "QWERTYUIOP{"
    +map -altgr +shift      0x1E..0x27 0x2B       ~ "ASDFGHJKLÇ}"
    +map -altgr +shift 0x56 0x2C..0x36            ~ "|ZXCVBNM<>:?"
    +
    +#
    +# Keys requiring AltGr
    +#
    +
    +map +altgr -shift 0x02..0x07 0x0D ~ "¹²³£¢¬§"
    +map +altgr -shift 0x10..0x11 ~ "/?"
    +map +altgr -shift 0x12 ~ "°"
    +map +altgr -shift 0x12 ~ "€" # map € to ° so Mac behaves the same as PC
    --- End diff --
    
    Right... The Mac ABNT2 keyboard flavor isn't laid out like the standard ABNT2 keyboard and produces the Euro symbol in the location the standard ABNT2 keyboard produces the degree symbol. 
    In other use-cases, we chose to "normalize" this to standard PC behavior. It was also believed to be less likely someone in Brazil typing Euro character.


---

[GitHub] incubator-guacamole-server pull request #123: GUACAMOLE-273: Add Brazillian ...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-server/pull/123#discussion_r150938547
  
    --- Diff: src/protocols/rdp/keymaps/pt_br_qwerty.keymap ---
    @@ -0,0 +1,58 @@
    +#
    +# 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-br-qwerty"
    +freerdp "KBD_PORTUGUESE_BRAZILIAN_ABNT2"
    +
    +#
    +# Basic keys
    +#
    +
    +map -altgr -shift 0x29 0x02..0x0D      ~ "'1234567890-="
    +map -altgr -shift      0x10..0x19 0x1B ~ "qwertyuiop["
    +map -altgr -shift      0x1E..0x27 0x2B ~ "asdfghjklç]"
    +map -altgr -shift 0x56 0x2C..0x36      ~ "\zxcvbnm,.;/"
    +
    +map -altgr +shift 0x29 0x02..0x06 0x08..0x0D ~ ""!@#$%&*()_+"
    +map -altgr +shift      0x10..0x19 0x1B       ~ "QWERTYUIOP{"
    +map -altgr +shift      0x1E..0x27 0x2B       ~ "ASDFGHJKLÇ}"
    +map -altgr +shift 0x56 0x2C..0x36            ~ "|ZXCVBNM<>:?"
    +
    +#
    +# Keys requiring AltGr
    +#
    +
    +map +altgr -shift 0x02..0x07 0x0D ~ "¹²³£¢¬§"
    +map +altgr -shift 0x10..0x11 ~ "/?"
    +map +altgr -shift 0x12 ~ "°"
    +map +altgr -shift 0x12 ~ "€" # map € to ° so Mac behaves the same as PC
    --- End diff --
    
    > Arguably - browser specific handling probably should be dealt with in the JS code.
    
    Yep. And, in fact, is. The RDP side of the keyboard mapping is for translating the already-identified key to the keystrokes specific to the RDP side of things. A Mac specific mapping would only be necessary if:
    
    1. The machine serving RDP is a Mac (in this case, we'd probably add a new keyboard layout variant, not merge both variants into one)
    2. Or the browser-side handling is failing
    
    If the browser-side mapping is not working correctly, then that needs to be addressed, but probably on the browser side and not within the keymap.
    
    Do things not work on Mac with ABNT2? You should be able to type the Euro symbol using the key combination specific to Mac, and rely on Guacamole to handle the necessary translation for the Windows machine behind RDP.


---

[GitHub] incubator-guacamole-server pull request #123: GUACAMOLE-273: Add Brazillian ...

Posted by mike-jumper <gi...@git.apache.org>.
Github user mike-jumper commented on a diff in the pull request:

    https://github.com/apache/incubator-guacamole-server/pull/123#discussion_r150928082
  
    --- Diff: src/protocols/rdp/keymaps/pt_br_qwerty.keymap ---
    @@ -0,0 +1,58 @@
    +#
    +# 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-br-qwerty"
    +freerdp "KBD_PORTUGUESE_BRAZILIAN_ABNT2"
    +
    +#
    +# Basic keys
    +#
    +
    +map -altgr -shift 0x29 0x02..0x0D      ~ "'1234567890-="
    +map -altgr -shift      0x10..0x19 0x1B ~ "qwertyuiop["
    +map -altgr -shift      0x1E..0x27 0x2B ~ "asdfghjklç]"
    +map -altgr -shift 0x56 0x2C..0x36      ~ "\zxcvbnm,.;/"
    +
    +map -altgr +shift 0x29 0x02..0x06 0x08..0x0D ~ ""!@#$%&*()_+"
    +map -altgr +shift      0x10..0x19 0x1B       ~ "QWERTYUIOP{"
    +map -altgr +shift      0x1E..0x27 0x2B       ~ "ASDFGHJKLÇ}"
    +map -altgr +shift 0x56 0x2C..0x36            ~ "|ZXCVBNM<>:?"
    +
    +#
    +# Keys requiring AltGr
    +#
    +
    +map +altgr -shift 0x02..0x07 0x0D ~ "¹²³£¢¬§"
    +map +altgr -shift 0x10..0x11 ~ "/?"
    +map +altgr -shift 0x12 ~ "°"
    +map +altgr -shift 0x12 ~ "€" # map € to ° so Mac behaves the same as PC
    --- End diff --
    
    What issue is this meant to work around with PC vs. Mac keyboards?


---