Skip to content

hardware keyboard text selection #314

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

Closed
pchampio opened this issue Nov 18, 2019 · 3 comments · Fixed by #338
Closed

hardware keyboard text selection #314

pchampio opened this issue Nov 18, 2019 · 3 comments · Fixed by #338
Assignees
Labels
bug Something isn't working embedder Issue concerns the embedder package enhancement New feature or request

Comments

@pchampio
Copy link
Member

pchampio commented Nov 18, 2019

The flutter team is implementing keyboard text selection movement at the framework level.
They are using the "flutter/keyevent" BasicMessageChannel as source of keyboard selection/movement events.

Currently go-flutter has implemented text selection movement at the embedder (glfw) level.
Work is duplicate (handlers in go-flutter and flutter for the same purpose), once everything is up on the framework side we should delete our handler. (textinput_{linux, windows, darwin}.go and some stuff in textinput-model.go)

Some related flutter PRs:
flutter/flutter#44130
flutter/flutter#42879
flutter/flutter#36316

BUG: Having duplicate handler for keyboard shortcut causes issue with pasting text, Ctrl-v is trigger twice, resulting in double pastes.

@pchampio pchampio added enhancement New feature or request embedder Issue concerns the embedder package labels Nov 18, 2019
@stuartmorgan-g
Copy link

FWIW this is an area of ongoing discussion; see flutter/flutter#30725 for some of it.

@pchampio

This comment has been minimized.

pchampio added a commit that referenced this issue Jan 12, 2020
A little work-around.
Waiting for #314
to have a real answer.

For now, I am a bit sceptical on how the keyboard text
selection/keyboard pasting will be handled in the flutter side.

I'm afraid it might not be suited to our need. We are sending
GLFW(linux) related event to the framework. But the framework only has
one handler, linux. This means, sending keyevent on darwin will not
support the correct keyboard layout (Ctrl -> Meta).

As those different keyboard layout are already supported in go-flutter,
this work-around ensure that we keep control of the textinput when
needed.
@pchampio pchampio self-assigned this Jan 15, 2020
@pchampio

This comment has been minimized.

james-lawrence pushed a commit to james-lawrence/go-flutter that referenced this issue Apr 3, 2020
A little work-around.
Waiting for go-flutter-desktop#314
to have a real answer.

For now, I am a bit sceptical on how the keyboard text
selection/keyboard pasting will be handled in the flutter side.

I'm afraid it might not be suited to our need. We are sending
GLFW(linux) related event to the framework. But the framework only has
one handler, linux. This means, sending keyevent on darwin will not
support the correct keyboard layout (Ctrl -> Meta).

As those different keyboard layout are already supported in go-flutter,
this work-around ensure that we keep control of the textinput when
needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working embedder Issue concerns the embedder package enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

2 participants