Commit graph

73 commits

Author SHA1 Message Date
Marc Durdin
55f302d929
Merge pull request #7322 from keymanapp/chore/merge-master-to-feature-ldml
chore: merge master into feature-ldml 🙀
2022-09-20 13:42:40 +10:00
Eberhard Beilharz
af6c6db49a
chore(linux): Remove unused IBusLookupTable 2022-09-15 18:53:44 +02:00
Marc Durdin
655c872dc8 chore: Merge branch 'master' into chore/merge-master-feature-ldml 2022-08-30 06:31:04 +10:00
Eberhard Beilharz
7169723d54
fix(linux): Remove wrong ok_for_single_backspace method
The implementation of `ok_for_single_backspace` checked the current
action_item multiple times. However, we already know that that
item is `KM_KBP_IT_BACK` because the only place this method gets
called is from the `process_backspace_action` method. So basically
this method always returns `FALSE`. "Fixing" this method to check
the next action_items makes things fail.

Removing this method since it doesn't do anything except burn
processing cycles...

Fixes #5614.
2022-08-25 18:38:06 +02:00
Steven R. Loomis
e8dff5cf4e feat(core): add event_flags to process_event #7046
- use a constant, KM_KBP_EVENT_FLAG_DEFAULT for 0
- update pascal and python
- update linux and windows
2022-08-12 09:58:58 -05:00
Eberhard Beilharz
aa7537730a
feat(linux): Allow to run ibus tests on Wayland
This change modifies the `run-tests.sh` script so that tests
run on both Wayland (if supported) and X11 unless
`--no-wayland` or `--no-x11` is specified.

This change also adds the new argument `--wayland` to the
`ibus-keyman-tests` executable which runs the tests under
Wayland.

Note that running Wayland tests is only possible in Ubuntu 21.10+
because it requires a version of `mutter` that supports the
headless option which got added in mutter 40.
2022-03-31 17:52:50 +02:00
Eberhard Beilharz
d9e4ad7899
feat(linux): add support for Wayland
This allows to use Keyman with the Wayland display server.
One thing that doesn't yet work completely with this change is
caps-lock.

Partially implements #4273.
2022-01-20 19:21:57 +01:00
Eberhard Beilharz
cdee19e953
chore(linux): Add integration tests for ibus-keyman
This change adds integration/regression tests for ibus-keyman. It
re-uses the unit tests that we have for core.

Also modifies one test so that the context doesn't use characters
used in the keyboard. This makes it easier to setup in ibus-keyman
tests.
2021-11-04 09:22:28 +01:00
Eberhard Beilharz
db5b9db23b
refactor(linux): Remove unused variables 2021-11-03 19:05:43 +01:00
Eberhard Beilharz
29451ac5e8
chore(linux): Extract keycode_to_vk[] to separate header file
This will allow to use the array in unit tests.

# Keyman Conventional Commit suggestions:
# - Consider appending the text ". Fixes #5613" to your commit message.
2021-10-29 18:22:56 +02:00
Eberhard Beilharz
f0c3280517
fix(linux): Fix lost context after pressing K_SHIFT
This fixes typing `n>` with sil_ipa keyboard which no longer output
the expected `ŋ` because pressing the shift key reset the context.

For modifier key presses we now exit `KMX_ProcessEvent::ProcessEvent`
early.

This change also removes a redundant line from engine.c. Clearing
the context happens in `reset_context()` again if necessary.

Fixes #5591.
2021-08-18 19:26:45 +02:00
Eberhard Beilharz
c9497fd494
feat(common/core): Implement shiftFreesCaps and capsOnOnly 2021-08-06 16:13:58 +02:00
Eberhard Beilharz
cfeb9e820e
chore(linux): Implement Linux side of caps-lock action processing 2021-08-06 12:20:23 +02:00
Eberhard Beilharz
77d0d96480
refactor(linux): Reformat keycode_to_vk table
Also update comment where these values come from.
2021-08-04 12:00:36 +02:00
Marc Durdin
5a94012f01
Merge branch 'chore/common/core/debug-additional-tests' into chore/common/core/5488-delete-markers-reliably 2021-07-27 08:23:24 +10:00
Marc Durdin
796a2d4c85 chore(common/core): handle deletion of markers in actions
Fixes #5488.

This updates Keyman Core, corresponding tests, and Keyman Engine for
Linux to support deletion of markers through an action, ensuring that
the action queue does not desynchronize with the context.
2021-07-26 15:23:20 +10:00
Eberhard Beilharz
0eca43d4ea
feat(common/core): Implement capsAlwaysOff system store
This change implements the core part in a way that makes the tests
pass. This still needs corresponding changes in the engine.
2021-07-23 10:25:28 +02:00
Eberhard Beilharz
ec03190f89
refactor(linux): reformat code 2021-07-20 10:07:42 +02:00
Eberhard Beilharz
de1d345408
refactor(linux): Re-add lost keys 2021-07-09 16:18:28 +02:00
Eberhard Beilharz
cda195390b
refactor(linux): Refactor processing actions in separate methods 2021-07-08 18:30:16 +02:00
Eberhard Beilharz
c401640c8a
chore(linux): Fix warnings 2021-06-14 17:39:05 +02:00
Eberhard Beilharz
01a9c36d53
fix(linux): Fix Caps Lock
Closes #4542.
2021-05-11 17:51:01 +02:00
Eberhard Beilharz
044e53198a
fix(linux): Fix switching to keyboard in middle of line (#4678)
Don't re-set context if it changed because the cursor location was
wrong. When the user switches to the EuroLatin keyboard in the
middle of the line, we're getting a wrong cursor location. This will
be fixed with the next keypress, but it leads to the context string
suddenly having more characters added to the front. If we re-set the
context because it's different now we will loose the information we
previously added to the context.

We now compare the end of the string. If the new context string ends
with the old context string we assume that the cursor position got
updated and don't re-set the context.

This fixes #4678.
2021-03-18 17:29:21 +01:00
Darcy Wong
a148463dca feat(linux): Save new options into DConf 2020-02-01 17:04:09 +07:00
Darcy
12a6d5e95c feat(linux): Start refactoring the dconf utilities 2020-01-31 17:35:49 +07:00
Darcy Wong
c83b390601 feat(linux): Add ability to configure keyboard options 2020-01-31 11:43:58 +07:00
glasseyes
bc2ae0201e fix forwarding backspace 2018-12-19 15:05:53 +07:00
glasseyes
4a80289d80 km_kbp_cp_dispose gone so cast and g_free instead 2018-12-19 13:23:17 +07:00
glasseyes
c7dc14bb13 baselayout kbdus.dll and alt en-US for now 2018-12-18 16:56:42 +07:00
glasseyes
1c1ca42301 baselayout only en-US for now 2018-12-18 15:51:37 +07:00
glasseyes
f2b6b9cf5c default platform and baselayout for linux
baselayout is LANG changed to xx-CC format

also move linux code workspace
2018-12-18 15:49:56 +07:00
glasseyes
b8a199607f wait until END to do EMIT_KEYSTROKE
in case there are other actions like INVALIDATE_CONTEXT after it
2018-12-18 09:10:43 +07:00
glasseyes
4547ed2e49 remove hasonlymarker 2018-12-17 21:44:34 +07:00
glasseyes
fc023c8cf1 missing part of merge 2018-12-17 21:05:26 +07:00
glasseyes
2ca84cbda3 remember to unset hasonlymarker on next CHAR
BACK from buffer if available
2018-12-17 10:13:27 +07:00
glasseyes
de498bd80a Merge branch 'master' into linux-backspace 2018-12-17 10:00:20 +07:00
glasseyes
e82f8006d3 [linux] backspace 2018-12-17 09:47:49 +07:00
glasseyes
092db46071 rename marker to hasonlymarker
also reset hasonlymarker after committing char buffer
2018-12-17 09:46:57 +07:00
glasseyes
14639133d9 change marker from bool to char 2018-12-17 09:46:57 +07:00
glasseyes
e19c8c2c33 clear context in non-surroundingtext reset 2018-12-17 09:46:57 +07:00
glasseyes
528bb80121 check if context has changed before setting it
use a buffer for multiple CHAR events
2018-12-17 09:46:57 +07:00
glasseyes
eeabae4b58 keep track of marker state
BACK clears marker state instead of deleting char if has it
2018-12-17 09:46:57 +07:00
glasseyes
c4127d4457 get a max of MAXCONTEXT_ITEMS(128) of context 2018-12-17 09:46:57 +07:00
glasseyes
f06b25ef3f initialising zeroed utf8 2018-12-17 09:46:57 +07:00
glasseyes
76f2345a1d use XkbBell for ALERT for now 2018-12-17 09:46:57 +07:00
glasseyes
f5b14c4dd8 detect modifier key releases 2018-12-15 08:59:17 +07:00
glasseyes
b63575b465 [linux] remove X11 dependency from ibus-keyman
use gdk_display_beep instead of X11 beep
alternative strategy for detecting right mod keys
forward keycode instead of keysym
2018-12-14 14:09:23 +07:00
glasseyes
a8a960f0ee handle surrogate pairs coming from CHAR actions 2018-12-13 13:14:41 +07:00
glasseyes
9acc7ef52d use set-surrounding-text signal to refresh context 2018-12-13 13:14:41 +07:00
glasseyes
b790ee338f separate Lalt/ctrl from Ralt/ctrl 2018-12-13 13:14:40 +07:00