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

Addition to the Apple Globe key code to QMK #24661

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from

Conversation

ChrisGVE
Copy link
Contributor

The change brings the Apple Globe Key as KC_GLOBE to QMK.

Description

The change is based mainly on @lordpixel23 QMK patch and is being discussed in depth in QMK Apple Fn Key created by @fauxpark.

Importantly, this change does not rely on VID/PID to be set on specific values.

In addition to the patch mentioned above, it introduces a new compilation flag, GLOBE_KEY_ENABLE such that:
(a) the required KEYBOARD_SHARE_EP is enabled when the Globe keycode is used
(b) keyboards or user layouts can make use of this definition for further customizations

The QMK documentation has been amended accordingly.

Certain key combinations are not yet working, though; in particular, 🌐︎+arrow or 🌐︎+FN do not work.

Thanks go to the input of many contributors, as this topic has been long discussed: @fauxpark, @HVR88, @drashna, and @lordpixel23.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@github-actions github-actions bot added core documentation dd Data Driven Changes labels Nov 30, 2024
@tzarc tzarc changed the base branch from master to develop November 30, 2024 12:51
Copy link
Member

@tzarc tzarc left a comment

Choose a reason for hiding this comment

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

I'll leave the rest of the review for the team -- they know more about the status of this stuff than what I do.

data/constants/keycodes/keycodes_0.0.4_basic.hjson Outdated Show resolved Hide resolved
docs/keycodes.md Show resolved Hide resolved
docs/keycodes_basic.md Show resolved Hide resolved
keyboards/zlant_xl/config.h.old Outdated Show resolved Hide resolved
keyboards/zlant_xl/rules.mk.old Outdated Show resolved Hide resolved
tmk_core/protocol.mk Outdated Show resolved Hide resolved
tmk_core/protocol.mk Outdated Show resolved Hide resolved
SHARE_EP_ENABLE was incorrectly set with GLOBE_KEY_ENABLE, what was
needed is to set the KEYBOARD_SHARED_EP instead. This corrects it.
data/constants/keycodes/keycodes_0.0.7_basic.hjson Outdated Show resolved Hide resolved
docs/keycodes.md Outdated Show resolved Hide resolved
docs/keycodes_basic.md Outdated Show resolved Hide resolved
ChrisGVE and others added 3 commits November 30, 2024 18:41
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
docs/keycodes.md Outdated Show resolved Hide resolved
tmk_core/protocol.mk Outdated Show resolved Hide resolved
ChrisGVE and others added 2 commits December 1, 2024 11:14
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
@fauxpark fauxpark self-assigned this Dec 2, 2024
@github-actions github-actions bot added the keymap label Dec 2, 2024
@fauxpark
Copy link
Member

fauxpark commented Dec 2, 2024

Please undo the last merge commit.

@fauxpark
Copy link
Member

fauxpark commented Dec 2, 2024

Now everything else is gone...

@ChrisGVE
Copy link
Contributor Author

ChrisGVE commented Dec 2, 2024

Ok we should be back on track, sorry about the mishap.

@@ -327,6 +327,8 @@ static inline uint16_t KEYCODE2CONSUMER(uint8_t key) {
return AC_DESKTOP_SHOW_ALL_WINDOWS;
case KC_LAUNCHPAD:
return AC_SOFT_KEY_LEFT;
case KC_GLOBE:
return AC_NEXT_KEYBOARD_LAYOUT_SELECT;
Copy link

Choose a reason for hiding this comment

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

Looks like this KC_GLOBE does exactly that, and only suitable for switching layouts, not really sending Globe codes.

Copy link
Contributor Author

@ChrisGVE ChrisGVE Dec 2, 2024

Choose a reason for hiding this comment

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

Strictly speaking, you are right, but in practice, on a Mac, it operates as a key.

  • pressed alone, it triggers the emoji picker (or what is configured in the Mac settings for the Keyboard)
  • it can be used as a "modifier" with specific keys, for instance
    • Globe+A to toggle the dock when hidden,
    • Globe+C to toggle control center,
    • Globe+F to toggle full screen,
    • Globe+H to show the desktop,
    • Globe+N to toggle Notification Center,
    • Globe+Q launch notes.

Unfortunately, there are other cases where I have yet to have success. In particular, Globe+Arrow keys combinations, but I typically use 60% keyboards, so arrow keys are hard to test with those.

Copy link
Member

Choose a reason for hiding this comment

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

If the keycode works on Windows/Linux too (but as layout select), then it would be worth having appropriate aliases too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have a pure Windows or Linux machine, but I can investigate using a virtual machine. I'll see whether I have time tomorrow to try that.

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.

5 participants