Bug 256416 - keymaps: fix for ABNT2 not working as expected
Summary: keymaps: fix for ABNT2 not working as expected
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Many People
Assignee: Alfredo Dal'Ava Junior
URL:
Keywords: patch, standards, vt
Depends on:
Blocks:
 
Reported: 2021-06-04 13:30 UTC by Neebz
Modified: 2022-02-25 21:33 UTC (History)
3 users (show)

See Also:


Attachments
Keymap patch (991 bytes, text/plain)
2021-06-04 13:30 UTC, Neebz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neebz 2021-06-04 13:30:53 UTC
Created attachment 225545 [details]
Keymap patch

I've selected the Brazilian (with accent keys) keymap during the installation process and the following shortcuts aren't working properly: 

"Alt GR" + "q" to "/"
"Alt GR" + "w" to "?"
"Alt GR" + "e" to "°"
"Alt GR" + "c" to "₢"

And honestly think that the term "Brazilian (accent keys)" and "Brazilian (without accent keys)" should just be changed to "Brazilian ABNT" and "Brazilian ABNT2" if that's possible. "Accent keys" and "without accent keys" does not sound intuitive or practical to us brazilians at all.

Sorry if this is not the correct channel to inform this but please consider this change.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2021-06-05 01:05:48 UTC
^Triage: give this a more specific Summary, and add a Keyword.
Comment 2 Neebz 2021-06-05 01:41:43 UTC
(In reply to Mark Linimon from comment #1)
I'm Brazilian, I just installed FreeBSD 13 stable, when using the console and trying to use the common shortcuts for ABNT2 keyboards (tried with different keyboards and different systems and configurations) they don't work.

"Alt GR" + "q" just types "q" and not "/"
"Alt GR" + "w" just types "w" and not "?"
"Alt GR" + "e" just types "e" and not "°"
"Alt GR" + "c" just types "c" and not "₢"


During the installation process the keyboard keymap is not listed as Brazilian ABNT and Brazilian ABNT2 but Brazilian with and without accent keys. This doesn't sound common or practical. We have 2 common keymaps here: ABNT and ABNT2. "Brazilian keymap with accent keys" sounds strange, doesn't sound like something a brazilian will naturally recognize 'cause we don't use these terms over here.

I don't know if this is the right channel but I would like these shortcuts to be functional and the terms to be changed in the installation process.

English isn't my first language so I'm sorry if what I'm saying doesn't sound right or respectful, but it really made a difference for me and my colleagues.

And if it is possible also to change the rc.conf terms to keymap to "keymap=abnt" and "keymap=abnt2".
 
I don't want to sound annoying but I figured it would make a lot of difference to my college classmates.
Comment 3 Alfredo Dal'Ava Junior freebsd_committer freebsd_triage 2021-06-08 22:25:44 UTC
Neebz, thanks for your patch. These AltGR key combination are not written down on many keyboards nowaday but they are really expected to exist. 
I tested it on two ABNT2 standard keyboards (2011 Microsoft Wireless Keyboard 3000 V2.0; and 2020 DELL WK636t)
The "Alt GR" + "c" mapping is missing on the patch you posted but everything else looks good to me.

On FreeBSD "br.kbd" and "br.noacc.kbd" are actualy pretty similar and map a ABNT2 standard keyboard. The differences are only the accents/dead keys, and the commit that introduced br.noacc.kbd mentions that. So in this case we should use your patch on both files.

Regarding the map name, yes we (Brazillians) recognize immediatelly "ABNT2" based on experience with other OSs, but since the only two Brazilian keyboard entries are both ABNT2, I'm not sure about this change. Would like to get other's input.
Comment 4 Neebz 2021-06-09 04:42:33 UTC
Sorry, i didn't know that both were to ABNT2, if both are for ABNT2 i see no problem to maintain these options as long as they are described as Brazilian ABNT2+something the way it's common for US brazilians (and maybe something like br.abnt2 and br.abnt2.nodk or something for no dead keys on rc.conf).

Again, don't get me wrong please, it's not about "do it as this other system" but to make something natural for US, that we can imediately recognize and doesn't sound alien to brazilians.

I am asking for the change to help some friends who use these shortcuts and they are learning FreeBSD right now, the forum member T-Daemon is the one who deserves the credit for providing me this patch, i was just reporting the lack of this function. 

And he said: "No cruzeiro sign. Unicode hex 0x20a2 for ₢ has no effect in console, only a rectangle is printed. The cruzeiro sign is not alone, many of the currency symbols are not displayed."

Maybe there is no need for cruzeiro sign on console nowadays but i think that the "/" and "?" shorcuts can be essential for some programmers here.

Thank you for your attention and I hope this can be included and it helps those who need
Comment 5 Neebz 2021-06-11 14:38:37 UTC
patch with Cruzeiro symbol:
https://forums.freebsd.org/attachments/patch-br-kbd-cruzeiro-txt.10150/
Comment 6 Ed Maste freebsd_committer freebsd_triage 2021-10-20 00:24:29 UTC
(In reply to Alfredo Dal'Ava Junior from comment #3)

We should use whatever names will actually be meaningful to users of those keyboards, so please go ahead with whatever you feel is best.

Also it's fairly easy to add new symbols to the console font, although if these are not in common use (e.g., they're historical) then it's probably not worth doing.
Comment 7 commit-hook freebsd_committer freebsd_triage 2022-02-22 21:42:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=07625bc4b30d66be5690d65debe56153aaf648bd

commit 07625bc4b30d66be5690d65debe56153aaf648bd
Author:     Alfredo Dal'Ava Junior <alfredo@FreeBSD.org>
AuthorDate: 2022-02-23 00:35:09 +0000
Commit:     Alfredo Dal'Ava Junior <alfredo@FreeBSD.org>
CommitDate: 2022-02-23 00:42:34 +0000

    keymap: Add extra Alt Gr mapping for Brazillian Portuguese ABNT2 keyboards

    This adds missing Alt Gr mappings for the keys "q", "w", "e" an "c" to
    conform with ABNT2 standard.

    PR:     256416
    Submitted by:   Neebz <vpguyrhpjltta@logicstreak.com>
    Reviewed by:    emaste
    MFC after:      2 weeks
    Relnotes:       yes
    Differential Revision:  https://reviews.freebsd.org/D33801

 share/vt/keymaps/br.kbd       | 8 ++++----
 share/vt/keymaps/br.noacc.kbd | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-02-25 21:21:36 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=310623908c2006f19ed33938a0c2a0f337df2e0b

commit 310623908c2006f19ed33938a0c2a0f337df2e0b
Author:     Alfredo Dal'Ava Junior <alfredo@FreeBSD.org>
AuthorDate: 2022-02-23 00:35:09 +0000
Commit:     Alfredo Dal'Ava Junior <alfredo@FreeBSD.org>
CommitDate: 2022-02-26 00:21:50 +0000

    keymap: Add extra Alt Gr mapping for Brazillian Portuguese ABNT2 keyboards

    This adds missing Alt Gr mappings for the keys "q", "w", "e" an "c" to
    conform with ABNT2 standard.

    PR:     256416
    Submitted by:   Neebz <vpguyrhpjltta@logicstreak.com>
    Reviewed by:    emaste
    MFC after:      2 weeks
    Relnotes:       yes
    Differential Revision:  https://reviews.freebsd.org/D33801

    (cherry picked from commit 07625bc4b30d66be5690d65debe56153aaf648bd)

 share/vt/keymaps/br.kbd       | 8 ++++----
 share/vt/keymaps/br.noacc.kbd | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
Comment 9 Alfredo Dal'Ava Junior freebsd_committer freebsd_triage 2022-02-25 21:33:18 UTC
Neebz, you patch was is in the next release 13.1. Thank you for your contribuition.


Tested on ABNT/ABNT2 keyboard (Brazillian Portuguese) on the following USB-wireless keyboards:

- Microsoft Wireless Keyboard 3000 v2.0
- Dell WK636t

And the following Laptop:

- Microboard Ultimate U342