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

Add KeyUp command behavior to Toolkit #446

Open
eriklimakc opened this issue Jan 13, 2023 · 2 comments · May be fixed by #463
Open

Add KeyUp command behavior to Toolkit #446

eriklimakc opened this issue Jan 13, 2023 · 2 comments · May be fixed by #463
Assignees
Labels
control/extensions-helpers-markup Related to attached properties, helper classes, or markup extensions without a finer tag kind/enhancement New feature or request.

Comments

@eriklimakc
Copy link
Contributor

eriklimakc commented Jan 13, 2023

The first idea was to move KeyboardBehavior from SimpleCalc to Toolkit, so we can add keyboard support to SimpleCalc.

What is needed is a way to fire a command when a key is released on a physical keyboard to have a VirtualKey inputed.

Current usage on SimpleCalc:

<Page ... xmlns:keyboard="using:SimpleCalculator.Keyboard" keyboard:KeyboardBehavior.KeyUpCommand="{Binding InputVirtualKey}">

For reference of the command see: InputVirtualKey

The behavior would make sense also to support generic keyboard input without adding a button for each char in the UI.

@kazo0
Copy link
Contributor

kazo0 commented Jan 13, 2023

Looks similar to what we are doing for EnterCommand. This would probably affect both CommandExtensions and InputExtensions

@Xiaoy312 any thoughts on how this should be imported? Something like a new KeyUpCommand property in InputExtensions?

@Xiaoy312
Copy link
Contributor

We went over this. Just add it as in into InputExtensions, but dont try to mix it into existing handler as it is already 4-5things.
I would rather keep this key-up impl separated.

@eriklimakc eriklimakc self-assigned this Jan 20, 2023
@eriklimakc eriklimakc linked a pull request Jan 30, 2023 that will close this issue
7 tasks
@Xiaoy312 Xiaoy312 added kind/enhancement New feature or request. control/extensions-helpers-markup Related to attached properties, helper classes, or markup extensions without a finer tag labels Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
control/extensions-helpers-markup Related to attached properties, helper classes, or markup extensions without a finer tag kind/enhancement New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants