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 support for more keys #230

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vojtapl
Copy link

@vojtapl vojtapl commented Sep 6, 2024

Adds support for some keys, which would be required for a standard keyboard layout. Some notes:

  • The tab and arrow keys currently use labels, but icons may be better (I used labels as I was unable to find a list of icon names), especially for the tab key.
  • My comments in src/lib/models/key.h are a bit lackluster.

@compilebunny
Copy link

I'm not a developer on this project, but this sounds like a great addition. Tons of people are trying to figure out how to get maliit to provide a keyboard that is appropriate for a terminal.

panel.activeKeypadState = "NORMAL"
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one especially, seems superfluous, as the Shift key already supports a lock state.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The caps lock key is only for completeness of a classical desktop layout.

import QtQuick 2.4

ActionKey {
label: "esc"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If these buttons are to be included (is there a point, if nothing is using them?), they will definitely need better labels and icons. While esc might fit on a single key, most of the things added here do not, and should probably have icons instead.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned, I wanted to use a icon for the tab key, but could not find any list of supported icon names. The names of page up/down keys can be shortened to pg up and pg dn. I also found out, that there exist symbols for home and end keys, but I have not seen them used yet. There would just be an issue with caps lock, as its symbol is already used with locked shift key. I am unsure how to solve this other than just having a wider key :).

@vojtapl
Copy link
Author

vojtapl commented Oct 13, 2024

I should have mentioned my motivation - I wanted to create a desktop terminal layout, but got stuck here #229. These keys seemed mature enough for a draft. I may close it, if you think I opened it too soon.

@ell1e
Copy link

ell1e commented Nov 9, 2024

For using the terminal, tab is really needed so this is promising. How does this draft look like, does anybody have a screenshot? Are the keys still large enough to have good accessibility for anybody typing impaired?

@vojtapl
Copy link
Author

vojtapl commented Nov 12, 2024

@ell1e Here is a screenshot of the keys with current symbols added to a new row (some changes may be needed for these). Only two of the arrow keys are there, as all of them did not fit nicely. Code for the new row:

Row {
      anchors.horizontalCenter: parent.horizontalCenter;
      spacing: 0
      
      DownKey {}
      RightKey {}
      CapsLockKey {}
      EscapeKey {}
      HomeKey {}
      EndKey {}
      PageUpKey {}
      PageDownKey {}
      TabKey {}
}

screenshot

@ell1e
Copy link

ell1e commented Nov 12, 2024

Thank you so much! Sadly, your screenshot confirms my fears. Given how vertically cramped the keys already are on some devices and how much space the keyboard takes up, an additional row seems to me like it's possibly a really bad idea:

100_5644

Wouldn't moving all those new keys, like escape and the arrows, to a new pane also solve that not all the arrow keys fit? I think it would make more sense to add more panes to the bottom-left special pane button to cycle through, and add the terminal keys there.

@vojtapl
Copy link
Author

vojtapl commented Nov 12, 2024

@ell1e Oh, that layout was just quickly cobbled together for that image. Here is how it can look when slightly better arranged for a larger screen :). In regards to the layout switching I think it sounds like a great idea, but I do not think I can pull it off with my current knowledge and time available.

46bbb7d6-a2b7-4c04-92a5-fcd4a4da9612

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants