Project

General

Profile

Actions

Feature #1113

closed

Write Keyboard widget and test app

Added by Hammel about 1 month ago. Updated 22 days ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Libraries
Target version:
Start date:
22 Mar 2024
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

This needs to use json to describe keys.
  • Number of rows
  • Number of columns
  • Key
    • Position: row,column
    • Label: Characters to display
    • Keysym: GTK keysyms (gdk/gdkkeysyms.h)
    • Icon: BG Icon
    • Color: mutually exclusive to Icon (if icon, ignore color)

Widget should not get focus - it should be touchscreen enabled only and focus stays in other Gtk widget.
Might need to review matchbox-keyboard for how they handle the focus issue.
Or maybe just install a callback that takes the key action/key from the widget (like updating a GtkEntry).

See
Actions #1

Updated by Hammel about 1 month ago

  • Description updated (diff)
Actions #2

Updated by Hammel about 1 month ago

  • Description updated (diff)
Actions #3

Updated by Hammel about 1 month ago

  • Description updated (diff)
Actions #4

Updated by Hammel 23 days ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

The keyboard widget has been written along with a test app called pigtk. Both are now in the pigtk repo. The widget is fairly simplistic and requires the app to handle the keys returned (or not returned if there is no key specified). There are few checks on the keyboard.json file either. The goal here is KISS, though better error handling is warranted.

There is only one sample keyboard. Custom keyboard configs will need to be introduced by apps that use the keyboard.

To go with this keyboard widget I want to port pidialer's entry field widget. This is because, in GTK+2 there is no way to disable the cursor (at least not that I can see). so the first character is always partly covered by the cursor. pidialer's entry field is not an entry field, per se, be a display only field. But it is useful in pidialer and I suspect in other cases. Again, it's KISS.

Once this is ported I will integrate the library build into PiBox/Xeon base builds. This is needed to allow pidialer to be updated and cross compiled using the staging tree.

Actions #5

Updated by Hammel 23 days ago

  • % Done changed from 50 to 70

Textline widget is ported and basically working. However there are two bugs.

  1. The textline widget doesn't resize to the full width when the window is resized.
  2. The keyboard doesn't fill the fill width because the last column should take up the "mod(width/cols)".
Actions #6

Updated by Hammel 22 days ago

  • % Done changed from 70 to 90

Both keyboard and textline widgets are implemented and tested. The former still needs to address the last cell padding when resizing.

Actions #7

Updated by Hammel 22 days ago

  • % Done changed from 90 to 100

Fixed the pad issue. Code tested on build system only.
Code committed and pushed.
Code will be tested on Xeon after integration with Buildroot.

Closing issue.

Actions #8

Updated by Hammel 22 days ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF