Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor process_unicode_common code + make keys used for UC_WINC and UC_OSX configurable #4217

Closed
wants to merge 92 commits into from

Conversation

vomindoraan
Copy link
Contributor

@vomindoraan vomindoraan commented Oct 23, 2018

Note: drashna:make_unicode_init has been merged into this as #4325 will likely be merged soon.

If you are reviewing this, click here to view the changes from that branch to this one. Those are the actual changes that this PR will introduce once #4325 is merged.

The old changes are available on vomindoraan:unicode_common_cleanup_backup.


While working on new Unicode features, I noticed some parts of process_unicode_common.* were written in a verbose and outdated way. There were also some unnecessary bits, like the unused static uint8_t input_mode in the header. This PR cleans up that code.

I've also made the key used by the WinCompose input mode configurable, as this key can be set by the user in WinCompose options. The default is KC_RALT so that existing behavior is preserved by default.

I've removed UC_OSX_RALT (which worked the same as UC_OSX, it just sent KC_RALT instead of KC_LALT) in favor of making the sent key configurable. UC_OSX_RALT wasn't being used in any keymap. The default is KC_LALT so that existing behavior is preserved by default.

The corresponding doc entries have been updated as well.

These changes should not affect existing behavior in any way.

  • Test on Windows
  • Test on Linux
  • Test on Mac (would appreciate help with this)

@drashna Please review if you can.
Thanks.

@vomindoraan vomindoraan force-pushed the unicode_common_cleanup branch from a685b70 to c9ace04 Compare October 23, 2018 08:43
@vomindoraan vomindoraan changed the title Clean up and simplify process_unicode_common code Clean up process_unicode_common code + make WinCompose key configurable Oct 23, 2018
@vomindoraan vomindoraan force-pushed the unicode_common_cleanup branch 5 times, most recently from 1ce34ce to 436c6dc Compare October 23, 2018 10:02
@vomindoraan vomindoraan changed the title Clean up process_unicode_common code + make WinCompose key configurable Clean up process_unicode_common code + make WinCompose and OS X keys configurable Oct 23, 2018
@vomindoraan vomindoraan changed the title Clean up process_unicode_common code + make WinCompose and OS X keys configurable Refactor process_unicode_common code + make keys used for UC_WINC and UC_OSX configurable Oct 23, 2018
@vomindoraan vomindoraan force-pushed the unicode_common_cleanup branch 6 times, most recently from c23fa63 to e7ca38f Compare October 23, 2018 15:31
Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from what I've flagged in the docs, looks good to me.

@vomindoraan vomindoraan force-pushed the unicode_common_cleanup branch from e7ca38f to 8e36e5a Compare October 23, 2018 15:45
@vomindoraan
Copy link
Contributor Author

I've tested this with my existing keymaps that have Unicode in them on all three platforms (many thanks to my coworkers who lent me their Macs!).

If anyone else could double-check with their own keymaps, that would be great.

@bit-shifter
Copy link

Can any of the maintainers provide an eta on when this might be merged?

A keymap that I'm putting together is heavily reliant on the exact functionality that this PR provides.

Cheers!

vomindoraan and others added 28 commits November 8, 2018 08:23
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
Co-Authored-By: drashna <[email protected]>
* case alignment

* process_record_unicode_common → process_unicode_common

* Move song arrays into function where they're used, align preprocessor directives

* Swap the order of UC_WIN and UC_BSD

* Update Unicode docs

* Reorder Unicode mode stuff to match the order of input mode constants

* Fix capitalization in doc subtitle

* Readd BSD and OSX_RALT songs

* Reword BSD note in docs

* Readd BSD keycode description

* Reword explanation of input on different platforms
Co-Authored-By: drashna <[email protected]>
@vomindoraan
Copy link
Contributor Author

vomindoraan commented Nov 25, 2018

These changes have been incorporated into #4325.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants