Commit graph

60 commits

Author SHA1 Message Date
sgschantz
ca2fec729c fix(mac): comment changes 2025-01-31 09:44:08 +07:00
sgschantz
a69426f2f5 fix(mac): properly manage lifecycle
moves handling of all KMInputMethodLifeCycle notifications to
KMInputMethodAppDelegate and out of KMInputController
because KMInputController instances are being cached
by the OS and swapped in when the input method changes
state

Fixes: #12997
2025-01-23 16:28:48 +07:00
sgschantz
76d0d69e6b chore(mac): add KMSentryHelper class, and new tags and breadcrumbs 2025-01-16 15:26:03 +07:00
sgschantz
8e833c8314 chore(mac): reworked sentry testing
can now force crashes or send messages by typing a
single character when sentry testing is enabled
in the UserDefaults
2025-01-13 14:08:22 +07:00
sgschantz
24830f4bc6 change(mac): improved comments and increased delay to 0.25 2024-09-16 10:55:21 +07:00
Shawn Schantz
a99ca4f120 change(mac): overhauled logic for determining input method state
uses Carbon APIs to determine current input source
This, combined with text input client is used to determine
whether Keyman is truly active or not.
Removed all code executing on delays and immediately
checks state and shows/hides OSK and
enables/disables eventTap.
2024-09-12 19:57:10 +07:00
sgschantz
b8cbf04ff7 change(mac): added KMInputMethodLifecycle
clearly manages the state of the input method and notifies
any observers of changes

Fixes: #12342
2024-09-10 16:06:33 +07:00
sgschantz
78fd4ee19b change(mac): renaming, use client map instead of servers array 2024-09-06 16:41:07 +07:00
sgschantz
a032f80230 change(mac): read and write new osk window state
persists state whenever user opens or closes OSK
also records location and size

Fixes: #12342
2024-09-04 16:04:59 +07:00
Shawn Schantz
18e7a1e363 change(mac): remove Always show OSK option
add simple flag to indicate whether OSK is shown
2024-09-03 20:24:08 +07:00
sgschantz
ab98086003 fix(mac): adopt unified logging APIs
remove all references to NSLog
adjust log level for some calls to os_log
Fixes #10997
2024-05-23 15:50:50 +07:00
sgschantz
aff9a0e157 fix(mac): use unified logging APIS
remove logDebugMessage API which calls NSLog and call os_log instead
2024-05-22 19:32:40 +07:00
sgschantz
67148475c1 chore(mac): re-indent files for tabs equal to two spaces
phase one
2024-05-13 16:16:30 +07:00
sgschantz
07bf055edb mostly deletions of obsolete pre-core code 2024-02-28 13:25:03 +07:00
sgschantz
27b1236d90 eventTap changes, add delay to queued text event 2023-12-08 11:40:21 +07:00
Shawn Schantz
b908c30b2c
Merge branch 'feature-macos-core' into feature/core/add-core-wrapper 2023-10-26 08:41:09 +07:00
sgschantz
6871e74d3a changed keyboards menu to dynamically update in Keyman section of the Input Menu and eliminated Keyboards submenu 2023-10-19 14:55:57 +07:00
sgschantz
cbe9ef7741 added logging to learn about menu execution 2023-10-17 09:11:21 +07:00
sgschantz
2cb7458829 successfully loading setting options in core -- not behaving predictably until null terminator added 2023-08-15 14:57:30 +07:00
sgschantz
c45fbb8e48 NSNotFound is valid selection result for compatibility check 2023-06-21 16:57:48 -04:00
sgschantz
144f4e0b4f added KMActionOperation to batch text inserts and deletes; improved context updates 2023-05-23 15:34:05 +07:00
sgschantz
96c78752b5 load Keyman Package information from kmp.json file and store in new PackageInfo object rather than in existing Dictionary hierarchy 2021-11-25 17:09:01 +07:00
Marc Durdin
256ba2ef1e [mac] Support Adobe products in legacy mode (and VS Code) 2019-08-08 19:36:27 +10:00
Marc Durdin
c3376eba18 [Mac] Add notarization for 10.14.5 and later versions 2019-07-24 20:57:46 +10:00
Marc Durdin
599482b818
Merge pull request #1840 from kamholz/selection-fix
[Mac] fix out-of-date context buffer after keyboard commands
2019-07-09 06:28:41 +10:00
David Kamholz
03e6139cf0 refresh contextBuffer on flagsChanged 2019-06-21 20:20:49 -07:00
David Kamholz
93e8361800 persist save() values across sessions 2019-06-21 11:18:58 -07:00
Randy Boring
a9c5621123 make nice constant names, use them, improve comment to match logic 2019-02-16 12:59:44 -06:00
Randy Boring
26a1af6798 adds KMOSVersion.h and .m to project, uses it to test for OS versions 10.13.1-3
avoids Apple OS bug in showPreferences that kills our app in those OS versions.
fixes #1447
2019-02-14 01:53:52 -06:00
Randy Boring
b977a0b295 where available, call showPreferences, otherwise, call our workaround 2018-12-18 13:20:54 -06:00
Tom Bogle
724b50224c [Mac] Removed unneeded code for handling mouse events in IM
The low-level event tap already handles detection of mouse events that could make the context out of date.
2018-07-05 14:22:52 -04:00
Tom Bogle
c840cedef9 [Mac] Prevent permanently hiding OSK when a menu is dropped down
This *might* possibly fix #894, but not likely
2018-06-27 01:32:18 -04:00
Tom Bogle
200dc30193
Merge pull request #883 from keymanapp/mac-882-fix-crash-in-eventTapFunction
[Mac] Prevented crash in eventTapFunction processing "out of band" event
2018-05-25 12:03:53 -04:00
Tom Bogle
d2ed7fc527 Improvements to event tap code
1) Enable/disable event tap depending on whether Keyman is the active IM; 2) Made code dealing with keeping track of activating/deactivating servers thread-safe; 3) Improved clean-up when event tap cannot be re-enabled; 4) Improved and cleaned up some comments and code aesthetics.
2018-05-23 14:16:41 -04:00
Tom Bogle
953ba5d9c9 Added diagnostics and experimenting with things related to InDesign 2018-05-17 09:10:42 -04:00
Tom Bogle
4afd3c10bd Added logic to hide OSK when Keyman is no longer active IM. 2018-05-08 16:50:16 -04:00
Tom Bogle
8991d0076d Removed commented out code.
Also added a couple TODO comments not actually related to the work in this branch.
2018-02-06 22:21:04 -05:00
Tom Bogle
e42626d229 Permanently removed Chrome-specific behavior. 2018-01-12 14:34:20 -05:00
Tom Bogle
0d7a519220 Commented out Chrome-specific code (possibly temporary) 2018-01-12 11:52:44 -05:00
Tom Bogle
50cd075d03 Split browser-specific code into separate subclasses
Safari and Chrome get their own subclasses, but I need to compare performance.
2018-01-09 15:52:14 -05:00
Tom Bogle
6176310073 Broke out browser client support into subclass
There is a problem with Google Docs in Safari now - did I break something?
2018-01-05 15:51:08 -05:00
Tom Bogle
4c7b2952f2 Refactor step 1: move event handling code to new class 2018-01-05 09:52:35 -05:00
Tom Bogle
2a54e75c35 Added/enhanced comments related to showPreferences workaround. 2017-11-21 11:35:21 -05:00
Tom Bogle
ecd7008246 Merge remote-tracking branch 'origin/master' into mac-compatibility-with-legacy-apps 2017-11-21 11:21:03 -05:00
Tom Bogle
8369e9d6e1 Added comment to explain the use of the regex to find a base character to use as the start of the string inserted using the insertText method. 2017-11-21 11:14:37 -05:00
Gabriel Wong
0e688c3324 Clean up log statements 2017-11-21 10:55:49 +07:00
Tom Bogle
2c024805a5 WIP: This is what I have tried so far. The config window does NOT display when accessed via the menu. It still works (the old/right way) in Sierra when accessed via the About window. If you first try to access it via the menu and then access it via the Configuration button on the About window, it displays twice! 2017-11-19 23:55:22 -05:00
Tom Bogle
e53f0317a1 Added some comments and diagnostic code. 2017-11-09 10:56:23 -05:00
Tom Bogle
3788acaba3 Enabled Keyman to deal with selection changes resulting from keyboard navigation. Tried a solution for Word in Safari, but commented it out. Added Firefox to the list of browsers that need to try to detect whether editing is in Google Docs. 2017-11-03 16:41:34 -04:00
Tom Bogle
2b22509730 Added special logic to handle Google Docs in Chrome, where multiple characters cannot be inserted simultaneously. 2017-11-02 15:34:28 -04:00