Commit Graph

1758 Commits

Author SHA1 Message Date
09f7835eb9 Added update to cursor when string is committed 2020-10-13 23:39:27 +02:00
dd80c59aea Fixed surrounding text not getting updated 2020-10-13 22:43:36 +02:00
b8a35530af Can preedit_string get removed? 2020-10-13 22:24:54 +02:00
2f613ea4c7 Merge branch 'x11_prepare' into 'master'
Cleanups leading to Xwayland compatibility

See merge request Librem5/squeekboard!389
2020-10-12 12:45:13 +00:00
8f526bd357 tests: Check for missing return in builtin layouts except emoji 2020-10-12 10:51:23 +00:00
b77b3f7816 vkeyboard: Use a generic slice instead of a vector 2020-10-12 10:51:23 +00:00
87eb775377 keymap: Keep keymap fd management in one place
At the same time, reduce the distance between this and the Xwayland handling branch.
2020-10-12 10:50:40 +00:00
f64e5a3627 Merge branch 'multi_ke' into 'master'
Improve generation of key maps

See merge request Librem5/squeekboard!388
2020-10-12 09:13:29 +00:00
595bbccfdf Merge branch 'fix_a11y' into 'master'
debian: Insert a "breaks" for librem5-base < 24

See merge request Librem5/squeekboard!392
2020-10-12 09:03:58 +00:00
afd47ef8b4 Merge branch 'optimize-sizing' into 'master'
Optimize sizing

See merge request Librem5/squeekboard!390
2020-10-12 08:18:22 +00:00
7e38d17cb7 debian: Insert a "breaks" for librem5-base < 24
Librem5-base sets the GNOME a11y to true, which solves the invisibility of the keyboard on the phone.
2020-10-11 16:36:16 +00:00
ef7df433d8 Merge branch 'wide-keyboards' into 'master'
Add wide keyboards

See merge request Librem5/squeekboard!391
2020-10-11 14:30:35 +00:00
8e32de86a9 Merge branch 'extend-keys-to-bounding-box' into 'master'
Expand key press detection to the edges of the view's bounding box

Closes #191

See merge request Librem5/squeekboard!379
2020-10-11 14:25:03 +00:00
6871452c7b keyboards: add wide terminal layout
This is a copy of the `terminal` layout with modified key dimensions to 
fit a wide arrangement.
2020-10-10 01:40:12 +02:00
192824be39 keyboards: add wide Belgian layout
This is a copy of the `be` layout with modified key dimensions to fit a 
wide arrangement.
2020-10-10 01:38:54 +02:00
938d3c335e keyboards: add wide French layout
This is a copy of the `fr` layout with modified key dimensions to fit a 
wide arrangement.
2020-10-10 01:37:57 +02:00
9dd67ad2bc server-context-service: optimize height calculation
Even though proper size management is being worked on, this patch
proposes a simple and easily revertable solution to device-dependent
sizing issues.

First, it provides different calculations based on the display
orientation. In landscape mode, this allows us to have a sensible
keyboard size while leaving enough screen estate for apps to be able to
display useful information.

Then, it gets rid of the weird calculation for display widths between
360 and 540px. While having some continuity is a pleasant idea, in the
real world in doesn't work, as shown by port attempts to other devices:
a 480x800 display (scale 1) would show an unusable 190px-high keyboard
(about half the size of the Librem 5 on-screen keyboard on a device I
own).

Finally, this commit makes sure we never use a hardcoded size.

Tested on the PinePhone, PineTab and Librem 5.

Note: Current behavior is preserved on the L5 in portrait mode, but
keyboard is a bit smaller in landscape mode; this is deliberate, as it
was previously using too much space (causing some apps, such as chatty,
to be unusable).
2020-10-09 16:30:59 +02:00
9f4cb3c791 eek-gtk-keyboard: use virtual resolution to check arrangement kind
Using the actual monitor width in pixels can lead to unsatisfying
results, depending on the display orientation and physical size: on a
10" tablet with a 1280x800 resolution (scale 1), portrait orientation
will be using the narrow layout.

If the keyboard is sized in an optimal way (i.e. so the layout fills the
whole area, with no blanks on the sides) this would result in an
unnecessarily huge keyboard being displayed, therefore wasting screen
estate.

Using the virtual display size gives a hint about the physical size of
the device, and can be used to select wide layouts even in portrait
mode, while still preserving current behavior on HiDPI devices.

This has been tested on PineTab, PinePhone and Librem 5.
2020-10-09 16:26:10 +02:00
6ed2a47620 Merge branch 'popover-settings' into 'master'
Add settings option to popover

Closes #154

See merge request Librem5/squeekboard!385
2020-10-09 09:18:26 +00:00
4253bf1299 Add settings option to popover
Fixes #154
2020-10-09 19:29:48 +11:00
d283ced2ce Merge branch 'popover-sorting' into 'master'
Sort layouts by type before sorting by name

Closes #176

See merge request Librem5/squeekboard!384
2020-10-07 15:23:25 +00:00
776c0c5f4b Merge branch 'flags' into 'master'
build: Error on repeating declarations

See merge request Librem5/squeekboard!387
2020-10-06 13:35:22 +00:00
8cf6c5f948 syntax: Let older rustc understand symbolmap's lifetime 2020-10-06 10:32:07 +00:00
de3bf54dc9 data: Restore testability of action->keysym conversion 2020-10-06 10:32:07 +00:00
2219eb67e1 keymap: Generate from symbol map, not layout
Includes changes to the keymap string without which Xwayland won't work.
2020-10-06 10:31:28 +00:00
61400c9584 build: Error on repeating declarations 2020-10-06 09:54:17 +00:00
b21734bf57 Merge branch 'docs-morefixes' into 'master'
docs: Tutorial syntax cleanups, reorganization

See merge request Librem5/squeekboard!381
2020-10-06 09:14:56 +00:00
24adba44be Merge branch 'leak-fixes' into 'master'
Fix 2 leaks

Closes #148

See merge request Librem5/squeekboard!386
2020-10-03 07:38:52 +00:00
5e43a31051 Fix leak endlessly adding a resource path to the default theme 2020-10-03 16:23:13 +10:00
40850267d4 Fix leak in level_keyboard_new
xkb_keymap_get_as_string requires that the string it returns is freed by
the caller.
2020-10-03 16:07:36 +10:00
93ac94b83f Sort layouts by type before sorting by name
This makes it such that local layouts like emoji and terminal appear
below language layouts.

Fixes #176
2020-10-03 02:10:56 +10:00
ec5570a547 Merge branch 'keyboard-layout-belgian' into 'master'
proposal for belgian layout (copy of fr)

See merge request Librem5/squeekboard!382
2020-10-01 13:21:49 +00:00
Al
72bd265065 alphabetical order for src/resources.rs tests/meson.build 2020-10-01 14:54:22 +02:00
07bcaa8e2b docs: Reorganize tutorial
People still ignore adding layouts to builtins and to tests. To unbury that information, and add a sort of checklist, the more interesting info has been moved upwards nd together.
2020-10-01 11:52:53 +00:00
Al
4357052fe7 proposal for belgian layout (copy of fr) 2020-09-30 15:42:31 +02:00
c16c686592 docs: Tutorial syntax cleanups
Promoted bolded "headings" into actual headings, so that they can be linked to.
2020-09-29 13:33:37 +00:00
4b825c26a6 Merge branch 'docs-fixes' into 'master'
Expand the development documentation in the readme

Closes #227

See merge request Librem5/squeekboard!377
2020-09-26 09:00:51 +00:00
74479ff226 Expand key press detection to the edges of the view's bounding box
If you have a keyboard layout like the following:

A B C D
 E F G
H I J K

The E and G keys here should be pressed when clicking in the empty space
next to them. This is achieved by not checking the bounding boxes of
each key and instead just using the button and row offset to extend
buttons/rows to the edges of the view. Caching for the size and
position of rows is introduced to simplify implementation and possibly
improve performance.

Fixes #191
2020-09-26 01:37:23 +10:00
94bfa92c12 Expand the development documentation in the readme
Fixes #227
2020-09-26 00:34:09 +10:00
50fb124b26 Merge branch 'hacking-spelling-fixes' into 'master'
Fix spelling mistakes in doc/hacking.md

Closes #217

See merge request Librem5/squeekboard!378
2020-09-25 12:47:17 +00:00
7aa004ceff Fix spelling mistakes in doc/hacking.md
Fixes #217
2020-09-25 21:44:27 +10:00
60056dcf26 Merge branch 'honor-a11y-setting' into 'master'
Honor org.gnome.desktop.a11y.applications screen-keyboard-enabled

Closes #222

See merge request Librem5/squeekboard!370
2020-09-24 06:49:13 +00:00
5580853f31 Merge branch 'depr' into 'master'
rust: Fix deprecation warnings

See merge request Librem5/squeekboard!374
2020-09-21 17:01:51 +00:00
d93e9c2b11 rust: Fix deprecation warnings 2020-09-21 10:57:01 +00:00
4ccf11f4fd server-context-service: Don't show keyboard when disabled
If the corresponding a11y settings is disbaled don't unfold
the keyboad at all.

This helps e.g. running the same session on laptops or when
an external keyboard is attached.

Closes: #222
2020-09-14 11:34:17 +02:00
6c5df02921 Merge branch 'cleanup' into 'master'
A bunch of cleanups

See merge request Librem5/squeekboard!371
2020-09-14 09:26:20 +00:00
b137e2e3a0 Merge branch 'ukrainian-keyboard-layout' into 'master'
Add Ukrainian keyboard layout

Closes #223

See merge request Librem5/squeekboard!372
2020-09-14 07:48:03 +00:00
820a8b6ca1 Add Ukrainian keyboard layout.
Fixes https://source.puri.sm/Librem5/squeekboard/-/issues/223

Signed-off-by: Nazarii Kretovych <nazarii.kretovych@gmail.com>
2020-09-14 08:34:09 +03:00
8bdfb69dc1 server-context-service: swap signal arguments
This makes sure 'self' comes first. While at that fix the
function signatures and use ServerContextService directly
and add type checks so it's easy to notice when we messed up.
2020-09-11 20:44:36 +02:00
1e6bcef055 server-context-service: Consistenty name self argument 'self'
It's confusing when the object a method acts on is sometimes called
context and sometimes called state. So name it 'self' as we do
in other projects.
2020-09-11 20:05:49 +02:00