Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: Add br-abnt2 keyboard km-00010416.toml #3447

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

Zeor-Xain
Copy link

'Abnt2' variant to 'br' layout keyboard.
Work with multimídia keys 'play' and 'volume'.

Equivalent to:
setxkbmap -model pc105-inet -layout br -variant abnt2

'Abnt2' variant to 'br' layout keyboardo, with
multimídia play and volume keys.

Equivalent to:
  `setxkbmap -model pc105-inet -layout br -variant abnt2`

- Edit genkeymap/dump-keymaps.sh:
    Add line to variant 'abnt2'(10416) to layout 'br'
- Add file instfiles/km-00010416.toml:
    By running `./genkeymap/dump-keymaps.sh`
- Edit instfiles/Makefile.am:
    Add line to file 'km-00010416.toml'
@Zeor-Xain
Copy link
Author

Related #3448

@metalefty
Copy link
Member

I think this is not necessary if km-00000416.toml and km-00010416.toml are identical.

There is already a fallback to ignore the upper 16 bit of the keylayout value. So when trying to load km-00010416.toml and it doesn't exist, xrdp will try to load km-00000416.toml instead. If it doesn't work as intended, it is a xrdp bug. I'd rather fix the bug if it is a bug than do such a hack.

Copy link
Member

@metalefty metalefty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already fallback, this is not necessary.

@metalefty
Copy link
Member

Hmm.. unlike #3448, are km-00010416.toml and km-00000416.toml different layouts? Then we can accept this. Sorry for the confusion.

@@ -44,6 +44,7 @@ dist_startscript_DATA = \
km-00000414.toml \
km-00000415.toml \
km-00000416.toml \
km-00010416.toml \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0x00010416 must also be added to xrdp_keyboard.ini to have an effect.

Copy link
Member

@matt335672 matt335672 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @Zeor-Xain

There's a bit of confusion around the file format, but we should be able to sort this out I think.

@@ -84,6 +84,7 @@ kbgen 0412 "ko-KR" "$os" -model pc105 -layout kr
kbgen 0414 "nb-NO" "$os" -model pc105 -layout no
kbgen 0415 "pl-PL" "$os" -model pc104 -layout pl
kbgen 0416 "pt-BR" "$os" -model pc105 -layout br
kbgen 10416 "pt-BR" "$os" -model pc105-inet -layout br -variant abnt2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you got a link to any docs about pc105-inet? It's not something I've come across before, and I can't find any online references to it. Should we be setting it for other keyboards?

Key133=0:0
Key134=0:0
Key135=0:0
Key136=0:0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a toml file - it's an ini file.

We use the ini format for v0.10.x and earlier. toml is used for devel. What is being targetted here?

@matt335672
Copy link
Member

@Zeor-Xain - there's been a lot of work in this area, and looking at your PR I can see you could do with a few pointers as to where we currently are. I'll try my best to provide them for you.

The keyboard file format (*.ini) used up to and including xrdp v0.10.x had a number of limitations. The main ones are:-

  1. Only 'base' keyboard mappings were supported. This prevented a lot of media keys from working.
  2. The file contained an explicit dependency on a key number which was internal to xrdp.
  3. The file was extremely sensitive to the system it was produced on. Running xrdp-genkeymap on sysetms later than Ubuntu 20.04 results in a non-working numlock key, for example.

Here's an example of the ini file format.

To address these issues, we moved to a TOML compatible file which directly maps the RDP scancodes received from the client to an X11 keysym and character. Here's an example of the TOML format.

The relevant PR where the change in format was made is #3138.

The last few keyboards we've added have been done as follows:-

  1. Get the keyboard working with the devel branch.
  2. Back-port the keyboard to v0.10.x by running xrdp-genkeymap on an Ubuntu 20.04 system. This is needed to allow the numlock key to work correctly.

Examples are Czech (#3358 and #3359) and Hungarian (#3429 and #3430)

I'm more than happy to work with you on getting any problems you're experiencing with ABNT2 fixed.

It would help enormously if you're able to build xrdp from source as we can then use the process above, and we know that ABNT2 will work when the next major version of xrdp is released.

Please let me know if you have any questions or comments on the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants