Winit: Clarification on dead keys

Created on 5 Nov 2017  路  3Comments  路  Source: rust-windowing/winit

I did some reasearch based on https://github.com/tomaka/winit/issues/263 using a simple macOS app that just logs keyDown events. With my layout(based on Swedish Pro) ^, 篓, ~ don't work correctly since they are dead keys. Handling dead keys involves quite a bit more work that needs to be done in winit. I'm curious if handling dead keys is considered in scope for winit or if that's something that you expect applications themselves to deal with.

Also see https://github.com/jwilm/alacritty/issues/682

macOS api platform parity

Most helpful comment

What @vberger described is what should happen IMO. That's also currently the behaviour on Windows.

All 3 comments

For comparison, the wayland platforms automatically handles dead keys. By that I mean that for example:

  • User presses ^ key (which is a dead key on my azerty keyboard)
  • winit generates a KeyPressed event for key ^ but no ReceivedCharacter event
  • User then presses e key
  • winit generates a KeyPressed event for key e, then a ReceivedCharacted('锚')

So we have a discrepancy between backends, time to decide what to converge to.

What @vberger described is what should happen IMO. That's also currently the behaviour on Windows.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felixrabe picture felixrabe  路  4Comments

mistodon picture mistodon  路  4Comments

francesca64 picture francesca64  路  4Comments

swiftcoder picture swiftcoder  路  3Comments

tomaka picture tomaka  路  3Comments