227 Commits

Author SHA1 Message Date
mojyack
21045044ba fix seat_handle_capabilities
seat_handle_capabilities may be called more than once with different caps.
In the current implementation, wl_{pointer,touch}_add_listener can be
called multiple times for the same seat, causing the buttons to be pressed
more than once in a single tap.
This commit implements seat_handle_capabilities correctly and
avoids setting duplicate handlers, and also handles the removal of capabilities.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2023-09-06 23:19:31 +02:00
Zach DeCook
9e03e120c3 switch layers: fix crash
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2023-09-06 23:14:30 +02:00
Willow Barraco
24e354ce9e
Add popup to display pressed keys 2023-09-06 15:29:07 +02:00
Willow Barraco
b1890848d5
Remove surface commits where it is unecessary and wrong 2023-09-06 14:25:40 +02:00
Willow Barraco
8bdc761d9b
Bump protocols 2023-09-06 11:35:34 +02:00
Willow Barraco
fa659b4584
Remove black boxes
This isn't a good way to solve this, and cause restrictions and
breakages.

We should find a better way to enforce text inside of keys, probably
using a second buffer to write into.
2023-09-01 08:11:31 +02:00
Willow Barraco
3752d0e392
Fix remaining too long text cases 2023-08-31 22:25:11 +02:00
Willow Barraco
4444c6e664
Prevent writing outside of key without ellipsize 2023-08-31 22:03:51 +02:00
Willow Barraco
8f7142b171
Remove ellipsize now that we crop text outside of keys 2023-08-31 21:27:02 +02:00
Willow Barraco
975bd2ec32
Fix Ctrl feedback while being clicked 2023-08-31 18:41:41 +02:00
Willow Barraco
47a45d557b
Fix black box on Shift press
Drawing key will redraw the bg at the right side. As we already
propagated the surface damage, this cause a rewrite of the right side of
the layout.
2023-08-31 18:37:58 +02:00
Willow Barraco
c45446a794
Do not write texts outside of keys
This is a bit hacky. The main problem is that there is no way to tell
cairo to limit the width. It will wrap text accordingly to width and
height, it will add ellipsizes if it overlow the box, but if a word
width is larger than the box width, it will write it.

To avoid that, I make sure we don't go too much to the left, and I
redraw the background at the right of the keys. This is not visible
cause we damage track correctly the updated buffer coordinates.

I also moved the damage tracking from do_rectangle and draw_text to
higher draw_key and draw_layout.
2023-08-31 18:04:26 +02:00
Maarten van Gompel
73130886cc fixup: use narrow no-break-space and changed the key label 2023-08-31 13:27:54 +02:00
Willow Barraco
67ef1d40f3
Add non-breaking space to compose punctuation 2023-08-31 12:38:35 +02:00
Willow Barraco
50c40863b8
Add . from compose punctuation now that we removed the bottom bar 2023-08-31 12:07:21 +02:00
Willow Barraco
d75d42aaa1
Add back ctrl on bracket layout 2023-08-31 12:04:08 +02:00
Maarten van Gompel
84020a9151 compose + , on simple layout open bracket/quote layout
This deviates from the rest a bit but we need an ability to trigger this
layout. compose + -  is still available for the 'math' layout.
2023-08-31 12:03:59 +02:00
Willow Barraco
3504f83ca6
Cleanup bracked compose layout 2023-08-31 12:00:22 +02:00
Maarten van Gompel
fda7007955 updated screenshots 2023-08-31 11:59:17 +02:00
Willow Barraco
9687d839f9
Drop simple grid 2023-08-31 11:41:20 +02:00
Willow Barraco
dc7ee664f0
No transparency by default
The virtual keyboard can't cover other surface. Only the wallpaper could
eventually go through it, or conky. Let's make a fancy default now that
--alpha exists for users that want the old transparency.
2023-08-31 11:41:20 +02:00
Willow Barraco
db44029d87
Add --alpha to configure all alpha color values 2023-08-31 11:41:20 +02:00
Willow Barraco
4ed89188d6
Do not override user config.h 2023-08-31 11:41:19 +02:00
Maarten van Gompel
a573be707c version bump 2023-08-31 11:41:01 +02:00
Willow Barraco
dcca9e48c7 Fix compose , from Simple to move to punctuations
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2023-08-31 11:39:17 +02:00
Willow Barraco
ca9b028795 Cleaning up remaining compose layouts
This strip everything that isn't the key we come for, Shift and Abc.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2023-08-31 11:39:17 +02:00
Maarten van Gompel
29e32edf5c shift + space = tab
This is implemented not in the keymap but as a hack in wvkbd itself,
the keymap would output shift + tab otherwise.
2023-08-31 11:39:17 +02:00
Maarten van Gompel
17863cdabc removed/revised bottom row on compose layouts
most compose layouts are more minimalistic don't have space/backspace/enter anymore, pressing
a key will close the layout anyway. All layouts retain an Abc button
, even though tapping any non-key will close the layout just as well.

Some compose layouts have added modifiers (ctrl, alt, super) in the
bottom row
2023-08-31 11:39:17 +02:00
Maarten van Gompel
8c6baa800b revised keyboard switch icons to also work on small keys 2023-08-31 11:39:17 +02:00
Maarten van Gompel
81e5c01a22 added a full wide layout and revised the layout index
This is basically the same as the old 'full' layout, the new 'full'
layout removed some keys to reduce width. But on bigger devices like
tablets the old full layout was fine.
2023-08-31 11:39:17 +02:00
Maarten van Gompel
bfcd3527dd scroll wheel switches layers (as opposed to crashing as it did before) 2023-08-31 11:39:17 +02:00
Maarten van Gompel
0ca0409400 refactoring: function for layer switching 2023-08-31 11:39:17 +02:00
Maarten van Gompel
f402af96fa added dedicated symbols layout for landscape mode 2023-08-31 11:39:17 +02:00
Maarten van Gompel
74695835ad minimal default layers
No need to have all layouts in the layers anymore, all layouts can be
accessed through Cmp + space / Cmp + layout switch button. Users are
encouraged to set `-l` and/or `--landscape-layers` to set their own
preference.
2023-08-31 11:39:17 +02:00
Maarten van Gompel
46f4515477 fixes and safety checks in layer switching 2023-08-31 11:39:17 +02:00
Maarten van Gompel
6101db15b9 fix: reordered layouts 2023-08-31 11:39:17 +02:00
Maarten van Gompel
848e836713 added hebrew layout (based on initial work by Schimon Jehudah) 2023-08-31 11:39:17 +02:00
Maarten van Gompel
8bffc1adc3 added tab key to common compose layouts 2023-08-31 11:39:17 +02:00
Maarten van Gompel
68ea69944d changed default font to sans instead of mono.
This conserves some space on certain keycaps and has better(/bigger)
icons than the default monospace font on sxmo
2023-08-31 11:39:17 +02:00
Maarten van Gompel
9134b0e8f6 expanded README with section about compose button behaviour 2023-08-31 11:39:17 +02:00
Maarten van Gompel
f52345aaef more consistent compose behaviour across layouts
* compose + "." opens up punctuation layout
* compose + ","/"-" opens up math layout
* compose + "'"/0/9 opens up bracket layout
2023-08-31 11:39:17 +02:00
Maarten van Gompel
048e25d660 revising landscape keyboard to be more consistent with the other layouts 2023-08-31 11:39:17 +02:00
Maarten van Gompel
2e476c6548 Made 'full' and 'simple' layouts less prone to mistyping and improved layout switching
- The full layout now squashes less keys in a row, to accomplish this
  the semicolon/colon, equal/plus and alt keys had to be sacrificed
  from the full layout (they're on the special/symbols layout still).
- The half-keys in the simple layout are removed, giving a bit more
  space.
- The default total keyboard height has been slightly enlarged (10px)
- The compose key moved down, it was too close to the 'a' (accidental
  presses). The tab key moved to the top-right.
- The spacing between the buttons is slightly larger (aesthetic only)
- The key for layer switching is now labelled more consistently with an icon, and indicates direction of switching with an arrow
- An extra "index" layout was added that can be activated by pressing
  Compose + the next/prev layout button. It has a key for each layout,
  even those not specified at start. This special layout does not appear
  in the normal layer cycling.
- The "Abc" key on secondary layers returns to the last alphabetical layout
- The compose layouts automatically hide when the user presses the space
  where there are no keys, no need to explicitly press the "Abc" key.
2023-08-31 11:39:17 +02:00
Maarten van Gompel
b6ec34fe3a fix scaling problem from "support multiple outputs" 2023-08-27 12:12:03 +02:00
mojyack
79797fc837 support multiple outputs 2023-08-26 12:48:45 +02:00
Maarten van Gompel
83edf203a7 fix incorrect keymap size and trailing 0 bytes when setting keymap
Ref: https://github.com/jjsullivan5196/wvkbd/issues/35
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-05-08 20:08:16 -07:00
Zach DeCook
98e6c43d54 specialpad: a new 4x10 layout like a numpad
More compact than 'special',
made to complement 'simple'.

Works well for both 'nav' and 'dialer' uses.

Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-04-29 23:40:17 -07:00
Zach DeCook
2d84f0e241 simple: add comma
Signed-off-by: Anjandev Momi <anjan@momi.ca>
2023-04-29 23:40:17 -07:00
CrafterSvK
a2b5b78051 Switched mismatched position of 'ľ' and 'Ľ'
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
v0.13
2023-02-03 20:52:20 +01:00
ArenM
b32509163d layout: fix open parenthesis on landscape layout
This key had the wrong type, which was preventing it from sending a
character.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
2022-11-26 00:08:18 +01:00