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

PoC: Swap Escape and Caps #16336

Merged
merged 2 commits into from
Jul 2, 2022
Merged

PoC: Swap Escape and Caps #16336

merged 2 commits into from
Jul 2, 2022

Conversation

osamuaoki
Copy link
Contributor

Add "Swap Escape and CapsLock" and "Unswap ..." capability dynamically via magic key.

Description

This is just a proof-of-concept patch to swap Escape and Caps

  • Adding flag in between existing bit field causes bug (BS \ swap)
  • Adding quantum code in more proper comment requires to update comment.

It worked on my QMK keyboard (handwired 4x14 ortholinear compact.) When a host PC with GNOME tweak sets to swap Escape and Caps, I had to do this to obtain in sane key location on my QMK keyboard while keeping that note PC usable with vim.

If you like this idea, I will add needed things for general consumption.

Types of Changes

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

Issues Fixed or Closed by This PR

  • NEW FEATURE added to swap Escape and Caps. (Different machine, different OS config, so it will be nice it is dynamically changed.
  • GPL2+ /GPL3+
  • Documentation is not updated yet
  • Aesthetically ugly location for qantum keycodes ... funny thin happend as I tried to insert... so this is least invasive patch as was the recent commit by others :

This patch is tested on my branch containing my handwired keyboard.

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).

Osamu Aoki [email protected]

@github-actions github-actions bot added the core label Feb 13, 2022
@osamuaoki
Copy link
Contributor Author

Swapping Grave-Esc, Caps-Ctrl is popular option with large foot print keyboard. But for small foot print keyboard with MT(MOD_LCTL, KC_TAB)-key, adding swap for ESC-Caps is a nice addition. GNOME Tweak already supports such things. (but that also cause regression on swapped mapping keyboard.)

Without this swap support, we need to do extra things to be flexible over different installation. So far this is working here.

As for the demand of this kind feature, I used google to get non-scientific research by google:

  • "swap escape caps lock" -- About 7,540,000 results (0.66 seconds)
  • "swap control caps lock" -- About 6,850,000 results (0.60 seconds)

VIM user seems to be target for both. Anyway, this is almost at the same level of interest as already included feature.

Please consider including this since this is rather small binary increment type code.

@osamuaoki
Copy link
Contributor Author

I updated pull request with a clean squashed code patch and added corresponding documentation.

@drashna drashna requested a review from a team March 7, 2022 07:05
@osamuaoki
Copy link
Contributor Author

Just updated to resolve a conflict caused by the recent commit with force push

@osamuaoki
Copy link
Contributor Author

I now updated to target "devel" branch.
 

osamuaoki added 2 commits May 20, 2022 09:52
This patch swaps Escape and Caps (swap, inswap, toggle)

This is a squashed commit with consistent sequence of keycodes.

This is popular swap option found in GNOME teaks etc.

It worked on my QMK keyboard (handwired 4x14 ortholinear compact.)

When a host PC with GNOME tweak sets to swap Escape and Caps, I had to do
this to obtain in sane key location on my QMK keyboard while keeping
that note PC usable with vim.

Properly targeting devel branch

Signed-off-by: Osamu Aoki <[email protected]>
@tzarc tzarc merged commit 871eeae into qmk:develop Jul 2, 2022
@osamuaoki
Copy link
Contributor Author

Thanks

nolanseaton pushed a commit to nolanseaton/qmk_firmware that referenced this pull request Jan 23, 2023
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.

4 participants