-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 inking support to calculator for basic calculations/conversions or other math needs #24
Comments
Arcadio, this is great! We are still in the process of transitioning into the open, so I don't think anyone was expecting contributions so soon. Adding ink support into Calculator is definitely on our feature backlog. I think the next step here is to bring our PM into the conversation so we can refine our vision for how this feature should appear in the app. |
Indeed, thanks so much, Arcadio! This looks very cool (and useful). I know we did some investigation into pen-based input a couple times in the past, along with (I think) some user research. We're going to find the work that was previously done in this area to help inform us of how to best move forward with you on this. |
This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it. |
This is so cool, I would love this feature. |
Love this feature. |
This would be great! |
I really hope that it can support some complex operation rules. If only some simple operations are supported, because the accuracy of keyboard input is far greater than that of recognition, users will choose keyboard input. Handwritten recognition is required only when the user is not easy to input the keyboard content. However, recognition of complex rules is still not good enough. |
@lizhimins My proposal here would be to leverage the preexisting logic for pasting operations. If by complex rules you are thinking about things like fractions and roots that would require additional work to make the ink to text parser understand them since that is not provided by the UWP APIs. My intent here wasn't to make keyboard users switch to pen input, just provide a good alternative for keyboardless devices or people that prefer using the pen. |
@arcadiogarcia When you get the chance, can you update your idea with more details following the feature pitch template from our New Feedback Process? |
Sure! This would be the feature pitch: Problem StatementThe calculator app currently supports different input mechanisms (keyboard, mouse, touch, pen), and while the app interface has been tailored in some way for for the rest of them, pen input has received less attention: the pen is treated like a regular mouse pointer with no special consideration. This is less than ideal when trying to input long numbers in a device where pen is one of the primaty input methods (e.g. Surface Studio in canvas mode, Surface Go with no keyboard attached), where many users would find easier to just write down the numbers. Evidence or User InsightsMany Windows surfaces have benefited lately from tighter ink integration, from the new inline text input canvas to the integration of ink in apps like the Mail client, the Office suite and Microsoft To-Do. Users of pen enabled devices have come to expect more intuitive ways to interact with their computer, with the pen allowing rich ink input rather than just behaving like a simple pointer. The community response to this suggestion has been very positive suggesting that at least high-confidence users would find it a welcome addition (no pun intended). ProposalThe proposal is to allow user to enter calculations in handwriten form, which will be recognized, parsed and calculated as any other user input. Goals
Non-goals
Low-Fidelity Concept:See the .gif above 😊 |
This is great, thanks! I am going to update your original comment with these new details. |
We reviewed the pitch and would love to explore this idea further! The pitch is a great start, but there are still some open questions. Moving this into planning to iron out some of those details. A human will follow up with some feedback on your pitch shortly. Keep in mind that not all ideas that make it into the planning phase are guaranteed to make it to release. For more information on next steps, check out our spec workflow. |
@arcadiogarcia We love the idea of adding inking support to Calculator, and I think your sample is a great proof-of-concept! We have prototyped some inking integrations in the past, but we ran into a couple roadblocks mostly around error detection/correction. I'll try to dig up some more details on what we have tried. Before submitting a PR, we'll want to work through some of those open issues as well as figure out the right UX approach (e.g., should any calculator input support ink? should it be a separate mode? etc.). Also, while inking can be a really cool way to interact with an app, we would like to think through some of the user scenarios where a user chooses ink over other input methods, so we can ensure we are optimizing for those scenarios. I created calculator-specs/ink to track progress. |
Great! What is the best place to discuss those open issues, this thread or opening a PR with a draft of the spec and iterating there? |
Would this not be covered by using the Handwriting TextBox control? https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/text-handwriting-view |
Currently the Calculator app doesn't launch the Handwriting TextBox control when tapped with a pen. An alternative approach would indeed be to just pop up the handwriting control, but it is optimized for text input and it doesn't support adding our own recognition logic. With the raw InkCanvas approach we can easily filter the candidates that aren't valid arithmetic expressions to improve accuracy, while I believe the Handwriting view doesn't give us a list of the candidates, only the closest match. |
Ultimately, everything should be documented in the spec, so it would be good to have a draft spec drafted to start from. If the open questions are blocking that from being created, then we should have those conversations here first. |
Maybe you would be interested in this: https://www.myscript.com/interactive-ink/ (it would be nice if we could integrate interactive-ink SDK in the calculator) |
* change CalcViewModel into a WindowsRuntimeComponent project (#5) * change CalcViewModel into a WindowsRuntimeComponent project * remove the old UI codebase (#6) * initially migrated C# codebase by tian (#7) * initial migrated C# codebase by tian * format the codebase * resolve comments * undo: modifications on UI test project * Remove the blocks that have more than 1 empty line. * Register DP using keyword 'nameof' * C# Migration: Initially migrated C# codebase by Han (#8) * C# Migration: Initially migrated C# codebase by Han * Resolved comments and misssing asset * Added three files to Calculator project * Added TODO comment and updated Object * NavCategory: temporary resolution of the hang issue (#9) * Updated CalcViewModel and missing files (#10) * Updated CalcViewModel and WinMeta * Added Calculator.rc * Resolved comment for InitializeLocalizationSettings * add: views/unitconverter.xaml (#11) * add: views/unitconverter.xaml * format the code * remove the extra empty line * add an empty line * check null before invoking event handlers (#12) * fix problems of the migration of OBSERVABLE_PROPERTY_RW (#13) * fixes crash in MathRichEditBox.ctor() (#14) * fixes crash in MathRichEditBox.ctor() * typo * Update azure-pipelines.ci.yaml for Azure Pipelines * Added a link copy of CalcViewModel to temporarily pass Unit Tests (#16) * Updated CalcViewModelCopyForUT configuration (#17) * changes output path of the UI project to align with other projects (#15) * fixes EETypeLoadException issue: export class DelegateCommand (#18) * fixes EETypeLoadException issue: export class DelegateCommand * weak-reference in C++/CX * WeakRef in C# codebase * UTF-8-BOM * spaces in macro * resolve some comments from the offline review * format * rename file * fixes the memory list issue (#20) * fixes a wrongly migrated property * UTF-8-BOM * fixes up the crash of type casting (#21) * Update localized strings 2021-01-04 (#1458) (#23) (cherry picked from commit cdcb956) Co-authored-by: Matt Cooley <[email protected]> * Fixup tests (#1429) (#24) - Removed unneeded "ToString" calls - Fixed typos - Renamed "fEButtonState" to "FEButtonState" (cherry picked from commit 66ad328) Co-authored-by: N <[email protected]> * Update graph internal engine verseion (#1466) (#25) (cherry picked from commit 0048dcb) Co-authored-by: Quentin Al-Timimi <[email protected]> * Turn off DFS file shares in internal build system (#1470) (#26) (cherry picked from commit 885fa23) Co-authored-by: Matt Cooley <[email protected]> * Improve clarity of math expressions in history for Standard Calculator (feature #138) (#1453) (#27) * Implemented feature & added unit tests * Fixed more unit/ui tests * Refactored tests * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp (cherry picked from commit 565e3e2) Co-authored-by: Wei (Waley) Zhang <[email protected]> * Adds unit-test cases for NarratorAnnouncement after fixing issue #1386 (#1469) (#28) * fix bug: No confirmation is announced by the narrator after activating 'Remove equation' button #1386 * Unit Test: Add NarratorAnnouncementUnitTests Co-authored-by: tain <[email protected]> (cherry picked from commit 9d8e2ad) Co-authored-by: Tian L <[email protected]> * Move localization pipeline sync schedule to the YAML file (#1478) (#30) (cherry picked from commit 007eccd) Co-authored-by: Matt Cooley <[email protected]> * remove the strong reference carried from delegate (#32) * Remove the finalizer of ControlSizeTrigger (#31) * Normalize the namespace of CalcViewModel (#33) * ViewMode: arrange namespaces * UI build pass * run release * UT build pass * pass build * resolve comment: make the diff results cleaner * resolve comment: make the diff results cleaner (2) * resolve comment: make the diff results cleaner (3) * resolve comment: move impl into a namespace * update: spaces * update: CalculatorButtonUser.h * UTF-8 to UTF-8-BOM * remove ViewState.h/.cpp from CalcViewModel path * revert changes for NavCategory.cpp * remove extra space * remove UCM * remove BOM * Fixed a graphing calculator "permissions" bug caused by PR #1426 (#1471) (#34) - The PR #1426 can cause a crash when no users are returned via `User::FindAllAsync(UserType::LocalUser)` when subsequently trying to access the first user. The existing code also does not guarantee that the returned user is the currently active user. - This fix retrieves the user that opened the app and passes this user into a function to check if this user has the proper permissions to access the graphing mode. This makes sense since the active user is indistinguishable (at least from the app's perspective) to the user who opened the app. This user's permissions are then propagated downwards to properly set up the navigation menu of the app. - Implementation detail worth pointing out: `s_categoryManifest` is what is used to populate the navigation menu of the app, but this variable is static by design, so a separate function was written to override the appropriate `isEnabled` value in `s_categoryManifest`. This function is called by `onLaunched`. - Manual testing Co-authored-by: Wei (Waley) Zhang <[email protected]> * fixes up a bug (#35) * fix csproj (#37) Co-authored-by: hanzhang54 <[email protected]> Co-authored-by: Matt Cooley <[email protected]> Co-authored-by: N <[email protected]> Co-authored-by: Quentin Al-Timimi <[email protected]> Co-authored-by: Wei (Waley) Zhang <[email protected]> Co-authored-by: Tian L <[email protected]>
* Hello C# - Going to an official feature branch (#1544) * change CalcViewModel into a WindowsRuntimeComponent project (#5) * change CalcViewModel into a WindowsRuntimeComponent project * remove the old UI codebase (#6) * initially migrated C# codebase by tian (#7) * initial migrated C# codebase by tian * format the codebase * resolve comments * undo: modifications on UI test project * Remove the blocks that have more than 1 empty line. * Register DP using keyword 'nameof' * C# Migration: Initially migrated C# codebase by Han (#8) * C# Migration: Initially migrated C# codebase by Han * Resolved comments and misssing asset * Added three files to Calculator project * Added TODO comment and updated Object * NavCategory: temporary resolution of the hang issue (#9) * Updated CalcViewModel and missing files (#10) * Updated CalcViewModel and WinMeta * Added Calculator.rc * Resolved comment for InitializeLocalizationSettings * add: views/unitconverter.xaml (#11) * add: views/unitconverter.xaml * format the code * remove the extra empty line * add an empty line * check null before invoking event handlers (#12) * fix problems of the migration of OBSERVABLE_PROPERTY_RW (#13) * fixes crash in MathRichEditBox.ctor() (#14) * fixes crash in MathRichEditBox.ctor() * typo * Update azure-pipelines.ci.yaml for Azure Pipelines * Added a link copy of CalcViewModel to temporarily pass Unit Tests (#16) * Updated CalcViewModelCopyForUT configuration (#17) * changes output path of the UI project to align with other projects (#15) * fixes EETypeLoadException issue: export class DelegateCommand (#18) * fixes EETypeLoadException issue: export class DelegateCommand * weak-reference in C++/CX * WeakRef in C# codebase * UTF-8-BOM * spaces in macro * resolve some comments from the offline review * format * rename file * fixes the memory list issue (#20) * fixes a wrongly migrated property * UTF-8-BOM * fixes up the crash of type casting (#21) * Update localized strings 2021-01-04 (#1458) (#23) (cherry picked from commit cdcb956) Co-authored-by: Matt Cooley <[email protected]> * Fixup tests (#1429) (#24) - Removed unneeded "ToString" calls - Fixed typos - Renamed "fEButtonState" to "FEButtonState" (cherry picked from commit 66ad328) Co-authored-by: N <[email protected]> * Update graph internal engine verseion (#1466) (#25) (cherry picked from commit 0048dcb) Co-authored-by: Quentin Al-Timimi <[email protected]> * Turn off DFS file shares in internal build system (#1470) (#26) (cherry picked from commit 885fa23) Co-authored-by: Matt Cooley <[email protected]> * Improve clarity of math expressions in history for Standard Calculator (feature #138) (#1453) (#27) * Implemented feature & added unit tests * Fixed more unit/ui tests * Refactored tests * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp * Update HistoryTests.cpp (cherry picked from commit 565e3e2) Co-authored-by: Wei (Waley) Zhang <[email protected]> * Adds unit-test cases for NarratorAnnouncement after fixing issue #1386 (#1469) (#28) * fix bug: No confirmation is announced by the narrator after activating 'Remove equation' button #1386 * Unit Test: Add NarratorAnnouncementUnitTests Co-authored-by: tain <[email protected]> (cherry picked from commit 9d8e2ad) Co-authored-by: Tian L <[email protected]> * Move localization pipeline sync schedule to the YAML file (#1478) (#30) (cherry picked from commit 007eccd) Co-authored-by: Matt Cooley <[email protected]> * remove the strong reference carried from delegate (#32) * Remove the finalizer of ControlSizeTrigger (#31) * Normalize the namespace of CalcViewModel (#33) * ViewMode: arrange namespaces * UI build pass * run release * UT build pass * pass build * resolve comment: make the diff results cleaner * resolve comment: make the diff results cleaner (2) * resolve comment: make the diff results cleaner (3) * resolve comment: move impl into a namespace * update: spaces * update: CalculatorButtonUser.h * UTF-8 to UTF-8-BOM * remove ViewState.h/.cpp from CalcViewModel path * revert changes for NavCategory.cpp * remove extra space * remove UCM * remove BOM * Fixed a graphing calculator "permissions" bug caused by PR #1426 (#1471) (#34) - The PR #1426 can cause a crash when no users are returned via `User::FindAllAsync(UserType::LocalUser)` when subsequently trying to access the first user. The existing code also does not guarantee that the returned user is the currently active user. - This fix retrieves the user that opened the app and passes this user into a function to check if this user has the proper permissions to access the graphing mode. This makes sense since the active user is indistinguishable (at least from the app's perspective) to the user who opened the app. This user's permissions are then propagated downwards to properly set up the navigation menu of the app. - Implementation detail worth pointing out: `s_categoryManifest` is what is used to populate the navigation menu of the app, but this variable is static by design, so a separate function was written to override the appropriate `isEnabled` value in `s_categoryManifest`. This function is called by `onLaunched`. - Manual testing Co-authored-by: Wei (Waley) Zhang <[email protected]> * fixes up a bug (#35) * fix csproj (#37) Co-authored-by: hanzhang54 <[email protected]> Co-authored-by: Matt Cooley <[email protected]> Co-authored-by: N <[email protected]> Co-authored-by: Quentin Al-Timimi <[email protected]> Co-authored-by: Wei (Waley) Zhang <[email protected]> Co-authored-by: Tian L <[email protected]> * **BYPASS_SECRET_SCANNING** (#1546) * Fixes a bug about the UI of expression tokens (#1547) * fix * [FeatureBranch] Fixes x86/ARM/ARM64 builds for the CI-Pipeline (#1550) * **BYPASS_SECRET_SCANNING** * fix * fixes x86/ARM/ARM64 builds for CI-Pipeline * Add headers missing for compilation with GCC (#1468) (#1551) Things that required such update included: * `wstringstream` * `setprecision` * `SCODE_CODE`, `E_BOUNDS` * Various SAL macros Co-authored-by: Michał Janiszewski <[email protected]> * Update nuget.config file (#1486) (#1552) Co-authored-by: Matt Cooley <[email protected]> * Fixes up some simple miscellaneous TODO items (#1556) * #DEBUG is a known C# preprocessor directive * So far, we haven't observed the problem described in the comment from C# async * fixes misc TODO items * resolve some warnings (#1564) * Add internal CI pipeline (#1553) (#1565) * Add CI-internal pipeline * No ARM64, to match release Co-authored-by: Matt Cooley <[email protected]> * Temporarily disable PGO NuGet package (#1510) (#1566) Co-authored-by: Matt Cooley <[email protected]> * [C# Calc]Removes WinMeta.cs (#1567) * remove WinMeta.cs * undo a trivial change * UTF-8 BOM * [C# Calc] Reverts some changes for Currency constants (#1570) * Update2108release - experimental (#1572) * adjusts Calculator.csproj (#1571) * fixes BinSkim problems (#1573) * fixes an issue around line style (#1575) * fixes the missed NULLs (#1576) (#1578) * Fix the Missing Part in Unit Converter Constructor (#1579) * fixes: calculator doesn't remember its previous mode (#1580) * Fixes: GraphingNumber doesn't work correctly (#1585) * fixes: GraphingNumber doesn't work correctly * Avoid crashing * fixes binding (#1586) * resolve TODO items (#1589) * Improving keyboard support in VariableValueSlider (#1559) (#1595) Co-authored-by: Dave Grochocki <[email protected]> * [C# Calc] Fixes: Keep the value away from getting rounded in Graphing Mode (#1596) * keep the value away from getting rounded * set the display precision to 6 to align with C++ impl * fixes the button-light-up time (#1597) * fixes up merging flaws * Update2108release * fixes (#1599) * keep master for ci pipeline * remove the Resources filter from CalcViewModel project * removes `that` since `this` can be captured automatically * AppxBundlePlatforms * StampAssemblyInfo * removes PreferredToolArchitecture * Change the arg AppVersion into Version * Change the arg AppVersion into Version * from Calculator.rc to AssemblyInfo.cs * Adds assembly-info Co-authored-by: hanzhang54 <[email protected]> Co-authored-by: Matt Cooley <[email protected]> Co-authored-by: N <[email protected]> Co-authored-by: Quentin Al-Timimi <[email protected]> Co-authored-by: Wei (Waley) Zhang <[email protected]> Co-authored-by: Tian L <[email protected]> Co-authored-by: Michał Janiszewski <[email protected]> Co-authored-by: Dave Grochocki <[email protected]>
This is a really helpful feature for users like me who primarily work with their pen. What is the status on this issue? |
Problem Statement
The calculator app currently supports different input mechanisms (keyboard, mouse, touch, pen), and while the app interface has been tailored in some way for for the rest of them, pen input has received less attention: the pen is treated like a regular mouse pointer with no special consideration. This is less than ideal when trying to input long numbers in a device where pen is one of the primaty input methods (e.g. Surface Studio in canvas mode, Surface Go with no keyboard attached), where many users would find easier to just write down the numbers.
Evidence or User Insights
Many Windows surfaces have benefited lately from tighter ink integration, from the new inline text input canvas to the integration of ink in apps like the Mail client, the Office suite and Microsoft To-Do. Users of pen enabled devices have come to expect more intuitive ways to interact with their computer, with the pen allowing rich ink input rather than just behaving like a simple pointer. The community response to this suggestion has been very positive suggesting that at least high-confidence users would find it a welcome addition (no pun intended).
Proposal
The proposal is to allow user to enter calculations in handwriten form, which will be recognized, parsed and calculated as any other user input.
Goals
Non-goals
Low-Fidelity Concept:
I was playing around with the code and I added support for entering expressions using ink:
It works by overlaying a InkCanvas on top of the calculation result, and leveraging the existing OnPaste method to process the recognized string.
Is this a feature you would be interested in adding? If you do I can polish it and send a PR 😊
The text was updated successfully, but these errors were encountered: