Commit graph

407 commits

Author SHA1 Message Date
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
6c0d65298c Made IM test target copy OCMocks to Frameworks folder of test bundle. 2018-02-05 09:58:02 -05:00
Tom Bogle
5a6533525d Reverted some previous changes now unnecessary
This might fix the build problem on TeamCity
2018-02-02 13:51:20 -05:00
Tom Bogle
bcc527f696 Fixed up all the plumbing issues with unit tests for Keyman4MacIM 2018-02-02 13:35:42 -05:00
Tom Bogle
a41286a051 Changed test target to manual signing. 2018-01-31 12:08:16 -05:00
Tom Bogle
59b38a418e Use Carthage to pull OCMocks framework and added KMX file for testing 2018-01-30 12:19:29 -05:00
Tom Bogle
5f83ddeed6 [WIP] Added changes to use OCMocks to make unit test meaningful
This commit breaks compilation because it does not include the code to pull and build the OCMocks framework.
2018-01-29 22:24:43 -05:00
Tom Bogle
0cf3cee56b Removed call to [sender length] and debug call to [sender markedRange]
Turns out that length is not really a supported method/property on IMKTextInput, and it returns unreliable information. (It appears that perhaps this was actually causing Word to work incorrectly.) The diagnostic call to markedRange was pointless since Keyman keyboards to not compose text in this way.
2018-01-29 22:21:04 -05:00
Tom Bogle
8b0687d177 Added guards around all headers to prevent duplicate imports 2018-01-29 14:01:33 -05:00
Tom Bogle
c2d7d3a8d0 Removed duplicate import that was causing linker failure. 2018-01-29 10:44:27 -05:00
Tom Bogle
eb7cab176f Added plumbing for unit testing IM.
This also slightly simplifies the logic in build.sh and even opens the possiblity of unit tests for the test app if that were ever to be desirable.
2018-01-26 12:31:38 -05:00
Tom Bogle
db9475e0c6 Solved the chirality problem on Mac (#178)
Also made the Scheme for the IM build shared in preparation for adding unit tests to thta project.
2018-01-25 00:00:44 -05:00
Tom Bogle
d9ef95f02b WIP: Implement chirality using CGEvent
Doesn't build
2018-01-24 09:26:17 -05:00
Tom Bogle
c3a6b1415f Set debugMode back to NO. 2018-01-18 14:09:50 -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
78be3af7d3 Fixed Chrome bug: MS Word sometimes treated like Google Docs 2018-01-12 09:30:09 -05:00
Tom Bogle
595b866038 Fixed Chrome bug from previous refactoring step
Check for special "insert characters individually" logic was backwards.
2018-01-11 13:21:52 -05:00
Tom Bogle
72cef42d25 Broke up long methods
Major refactoring to break long methods up by factoring out into meaningful sub-methods. Also removed small amount of unused code left over from previous refactoring step.
2018-01-11 12:58:52 -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
0f091f9705 Commented out code for firefox
Added (and then commented out) code to have Firefox pretend not to change selection without reporting. Ths code improves some things but makes other things worse. I need to compare it to behavior before refactoring.
2018-01-08 22:22:57 -05:00
Tom Bogle
3ef48599f6 Cmd-A in Safari, insert chars individually in Chrome
Added logic to correct bug in Safari Google Docs introduced a few months back to clear selection after replacement. Refactored code and fixed bug to correctly handle Chrome's need to replace characters individually.
2018-01-08 21:35:28 -05:00
Tom Bogle
e716f42038 Google Chrome pending chars logic -> BrowserClientEventHandler.
Moved special logic for dealing with pending character buffer in Google Chrome into the BrowserClientEventHandler.
2018-01-08 15:12:39 -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
d95599631e Added files to hold input method event handler class 2017-11-29 23:43:44 -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
Gabriel Wong
b0ff277b8a Use new way of showing config window in about 2017-11-20 14:36:47 +07:00
Gabriel Wong
1202c1929b Make sure the config window doesn't hide 2017-11-20 14:36:27 +07:00
Gabriel Wong
4f2f9bc658 Remove invalid attributes 2017-11-20 14:22:36 +07:00
Tom Bogle
02502f6f38 Fixed typo 2017-11-20 00:04:16 -05: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
650f168fd4 Added some comments and diagnostic code. 2017-11-09 12:04:36 -05:00
Tom Bogle
55f451df68 Merge branch 'mac-use10dot7-compatible-methods' into mac-compatibility-with-legacy-apps 2017-11-09 11:43:50 -05:00
Tom Bogle
5831d3d4b4 Replaced try-catch with calls to respondsToSelector to make the check more explicit. 2017-11-09 11:37:59 -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
Tom Bogle
5f4dce6a0d Solved Mail compatibility problems using regex to ensure that "preChar" starts with a base character. Added MS Word as a "legacy" product to make it work correctly. 2017-11-01 22:11:24 -04:00
Tom Bogle
ddf1320960 Merge branch 'master' into mac-compatibility-with-legacy-apps 2017-10-31 22:22:49 -04:00
Tom Bogle
db8712bae8 Added fallback code to convert percent-escapes in URL for downloaded keyboard for version of OS where stringByRemovingPercentEncoding is not available. 2017-10-31 22:17:44 -04:00
Tom Bogle
7423d1a1ab WIP: Replaced calls to NSColor colorWithRed:green:blue:alpha with calls to colorWithSRGBRed:green:blue:alpha because the former was not available until OS version 10.9 2017-10-30 22:43:59 -04:00
Tom Bogle
21411263ad WIP: Work to deal with handling a Q_BACK that tries to insert a combining mark instead of a base character (along with its combining marks). This causes compatibility problems in some apps (e.g., Mail) 2017-10-30 22:33:19 -04:00
Tom Bogle
629cbd8c58 Cherry picked a few small changes from "mac compatibility" branch to fix bug whereby command keys were sometimes causing characters to be output. 2017-10-23 22:44:57 -04:00
Tom Bogle
f6114811ff Tried adding Oxygen XML editor as a "legacy" app, but it's problems were more severe, so I commented it out. 2017-10-23 22:30:11 -04:00
Tom Bogle
892c4c7e42 Added code to prevent sending an extra delete-back in Google Chrome when it inaccurately reports a text selection. 2017-10-20 07:28:56 -04:00
Tom Bogle
30386abd6e Prevented processing of Command keys. Fixed timing related problems when repsonding to actions that require us to get the context again. In Safari Google Docs, fixed problem when typing replaces selected text (once we've managed to detect we're in Google Docs). Added Xcode to the list of apps that don't let KM know about arrow keys and/or mouse clicks that might affect the context. 2017-10-19 13:53:24 -04:00