qmk_firmware icon indicating copy to clipboard operation
qmk_firmware copied to clipboard

New keymap for ryanbaekr/rb87

Open ryanbaekr opened this issue 1 year ago • 16 comments

Description

Added a new keymap for ryanbaekr/rb87 that will ship on some boards

Types of Changes

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

Issues Fixed or Closed by This PR

Checklist

  • [x] My code follows the code style of this project: C, Python
  • [x] 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.
  • [x] 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).

ryanbaekr avatar May 13 '24 23:05 ryanbaekr

Added a new keymap for ryanbaekr/rb87 that emulates my most used emacs shortcuts

Sounds like a personal keymap to me.

fauxpark avatar May 14 '24 01:05 fauxpark

Added a new keymap for ryanbaekr/rb87 that emulates my most used emacs shortcuts

Sounds like a personal keymap to me.

So the criteria is based on sound and not whether or not it's from the vendor? That feels wrong but it's not my call

ryanbaekr avatar May 16 '24 03:05 ryanbaekr

It's neither. A "vendor" keymap is a/the keymap that ships with the board, which may not necessarily be the same as the default keymap.

fauxpark avatar May 16 '24 03:05 fauxpark

It's neither. A "vendor" keymap is a/the keymap that ships with the board, which may not necessarily be the same as the default keymap.

That's what this is

ryanbaekr avatar May 16 '24 17:05 ryanbaekr

Then it needs to be renamed to via_ryanbaekr, as per the PR checklist. Also, the unused combo feature should be removed, as well as empty layouts.

tzarc avatar May 16 '24 17:05 tzarc

Then it needs to be renamed to via_ryanbaekr, as per the PR checklist. Also, the unused combo feature should be removed, as well as empty layouts.

Will do on the name

Combos must be enabled for repeat key. This is well documented here

Add it to your keymap

If you are new to QMK macros, see my macro buttons post for an intro.

Step 1: Repeat Key requires that Combos are enabled. If you aren’t using Combos already, set in rules.mk:

COMBO_ENABLE = yes

It is not required that you use combos for anything in your keymap. But at a minimum, you need to define an empty key_combos array by adding the following in keymap.c:

combo_t key_combos[] = {}; uint16_t COMBO_LEN = 0;

Step 2: In your keymap.c, add a custom keycode for the Repeat Key and use the new keycode in your layout. I’ll name it REPEAT, but you can call it anything you like.

enum custom_keycodes { REPEAT = SAFE_RANGE, // Other custom keys... };

It used to be the case that via keymaps had to have 4 layers. I see that is no longer the case, will do

ryanbaekr avatar May 16 '24 17:05 ryanbaekr

Compiles fine without combos enabled. Also, there's no mention on the QMK documentation of requiring combos. Perhaps the documentation you're referring to should be considered historical?

tzarc avatar May 17 '24 06:05 tzarc

Your docs:

An essential piece to making this work is that we set the desired alternate keycode in the keyrecord_t’s .keycode field, and this field is only present when Combos are enabled.

QMK Code:

typedef struct {
    keyevent_t event;
#ifndef NO_ACTION_TAPPING
    tap_t tap;
#endif
#if defined(COMBO_ENABLE) || defined(REPEAT_KEY_ENABLE)
    uint16_t keycode;
#endif
} keyrecord_t;

Seems like combos aren't required.

tzarc avatar May 17 '24 07:05 tzarc

Compiles fine without combos enabled. Also, there's no mention on the QMK documentation of requiring combos. Perhaps the documentation you're referring to should be considered historical?

It compiles fine but the feature does not work on the board when flashed

To clarify, QK_REP works, get_last_keycode() does not

ryanbaekr avatar May 17 '24 13:05 ryanbaekr

To clarify, QK_REP works, get_last_keycode() does not

Can't reproduce this I'm afraid. Implemented your repeat keycodes identically and it works fine without any combos.

        case TZ_REP_2 ... TZ_REP_5:
            if (record->event.pressed) {
                for (int i = TZ_REP_2 - 1; i <= keycode; i++) {
                    tap_code16(get_last_keycode());
                }
            }
            return false;

...where TZ_REP_2 would be the equivalent of your M2, etc.

tzarc avatar May 18 '24 02:05 tzarc

I believe the last commit addresses your concerns

ryanbaekr avatar May 30 '24 22:05 ryanbaekr

I believe the last commit addresses your concerns

@tzarc

ryanbaekr avatar Jun 04 '24 18:06 ryanbaekr

I believe the last commit addresses your concerns

@tzarc

@tzarc @fauxpark

ryanbaekr avatar Jun 10 '24 13:06 ryanbaekr

QMK is an open-source project run by volunteers. This is a low-priority item. It can wait its turn.

To gain some perspective, please have a read of these links: GitHub Etiquette Don't be that open-source user, don't be me Open Source Maintainers Owe You Nothing Entitlement in Open Source

tzarc avatar Jun 11 '24 10:06 tzarc

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

github-actions[bot] avatar Aug 17 '24 01:08 github-actions[bot]

Thank you for your contribution! This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready. For maintainers: Please label with bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

Responding so this is not automatically closed

ryanbaekr avatar Aug 20 '24 17:08 ryanbaekr

Is there anything you need from me?

ryanbaekr avatar Sep 25 '24 21:09 ryanbaekr

@tzarc @fauxpark did the transition you mentioned (https://docs.qmk.fm/ChangeLog/20240526#migration-of-via-keymaps-to-via-team-control) happen?

ryanbaekr avatar Nov 25 '24 22:11 ryanbaekr

Yes. #24322 the-via/qmk_userspace

waffle87 avatar Nov 25 '24 23:11 waffle87