Clear Filters
Clear Filters

Issue with capturing "tab" key using the available KeyPressFcn callbacks in AppDesigner

3 views (last 30 days)
I'm working on a GUI using App Designer, and I'm facing difficulties capturing the "tab" key within an editable DropDown list to enable text autocompletion based on user input. Despite multiple attempts, I haven't been successful in achieving the desired functionality. I'm reaching out to the community to seek assistance or solutions for this particular challenge. Here's some additional context:
Background:
  • UIFigure components like DropDown lists currently lack a built-in "KeyPressFcn" property to capture key events while focused.
  • Existing callbacks like "UIFigureWindowKeyPress" don't trigger the “tab” key when the focus is within the DropDown list and the Dropdown list is open, limiting interaction options.
Observations:
  • Attempts to define "KeyPressFcn" programmatically in App Designer code throw errors like "Unrecognized property 'KeyPressFcn' for class 'matlab.ui.control.DropDown.'"
  • Implementing a generic "UIFigureKeyPress" callback doesn't address the root cause as the focus remains within the DropDown list, preventing key capture.
Expected Behavior:
  • In order to illustrate the situation, I added an example of this functionality using MS Excel. As shown in the attached GIF, ideally, users should be able to capture key presses even when focusing on UIFigure components like DropDown lists. This allows for richer application interactions and user experiences.
If anyone has encountered and resolved a similar issue, I would greatly appreciate it if you could share your solution. Alternatively, I'd like to propose the following approach:
  • I propose the addition of a "KeyPressFcn" property to DropDown lists and other relevant UIFigure components.
  • Alternatively, implementing the ability to add custom callbacks to any component would offer greater flexibility for capturing user interaction beyond existing predefined callbacks.
Thank you in advance,
Juan
  2 Comments
Juan Ruiz Osorio
Juan Ruiz Osorio on 19 Jan 2024
I forgot to add that at the moment the expected behavior can be achieved in App Designer using the "Enter" key when an item of the DropDownList is selected, but the purpose of this question is to achieve this functionality using the "tab" key which in my opinion is widely used for this purpose in other software.
Tiffany
Tiffany on 5 Apr 2024
Hi Juan,
I would like to apologize for the inconvienece you face when attempting to add this functionality into the "tab" key. I've made our development team aware of your proposed enhancements, so they can consider implementing these features in future releases.

Sign in to comment.

Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!