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

introduce support for Royal Kludge RK61 non-hotswap rgb edition (PID 0x24F) #252

Closed

Conversation

mr-july
Copy link

@mr-july mr-july commented Mar 10, 2022

This is improved version of euwbah (see https://github.com/euwbah/qmk_firmware/tree/sn32/keyboards/royal_kludge/rk61_rgb):

  • better organized directory structure
  • add support for ISO layout
  • implement a keymap, which supports Neo Layout (https://www.neo-layout.org/) layers 3 and 4

Description

Types of Changes

  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)

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

…0x24F)

This is improved version of euwbah (see https://github.com/euwbah/qmk_firmware/tree/sn32/keyboards/royal_kludge/rk61_rgb):
- better organized directory structure
- add support for ISO layout
- implement a keymap, which supports Neo Layout (https://www.neo-layout.org/) layers 3 and 4
Copy link

@vjdato21 vjdato21 left a comment

Choose a reason for hiding this comment

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

My little brother owns RK61 so I just made a little suggestion to the keymap (will update if I get to know more about RK61). I also included some comments and heads-up for some, you're free to decline those or accept.

keyboards/royal_kludge/rk61/keymaps/default/keymap.h Outdated Show resolved Hide resolved
keyboards/royal_kludge/rk61/rgb/config.h Outdated Show resolved Hide resolved
keyboards/royal_kludge/rk61/rgb/info.json Outdated Show resolved Hide resolved
keyboards/royal_kludge/rk61/rgb/readme.md Outdated Show resolved Hide resolved
keyboards/royal_kludge/rk61/rgb/rules.mk Outdated Show resolved Hide resolved
Copy link

@vjdato21 vjdato21 left a comment

Choose a reason for hiding this comment

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

Just a suggestion and a correction to readme.md. By the way, I can't get it to compile on my end.

image

I'm no expert so I can't truly rule out the cause of the problem.

keyboards/royal_kludge/rk61/rgb/readme.md Outdated Show resolved Hide resolved
![HW bootloader](imgs/enter-bootloader.jpg)
After shorting, just connect the USB cable. The keyboard started in bootloader mode and is ready to be flashed.
- Layout (after loading QMK): FN + CapsLock

Choose a reason for hiding this comment

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

Maybe try adding Sonix flasher as an easy way to get into bootloader.

Copy link
Author

Choose a reason for hiding this comment

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

As far as i know the Sonix flasher does not currently support the RK61. We need implement it first in Sonix flasher repo. (This is not a big deal, i hope). I'll look into it.

But we need testing to ensure, that the bootloader can be entered with the aid of Sonix flasher.

Copy link

@vjdato21 vjdato21 Mar 29, 2022

Choose a reason for hiding this comment

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

As far as i know the Sonix flasher does not currently support the RK61. We need implement it first in Sonix flasher repo. (This is not a big deal, i hope). I'll look into it.

But we need testing to ensure, that the bootloader can be entered with the aid of Sonix flasher.

It kinda does, RK uses HFD, and by that, the keyboard gets put into bootloader. Currently, Sonix flasher supports putting into bootloader for HFD and eVision Sonix clone chips. By the way, if QMK gets installed in the keyboard, and you put it into bootloader, it will still get detected by Sonix flasher.

P.S.
Tested Sonix flasher on my end, it works for my little brother's keyboard. (at least for the bootloader part). I haven't tested flashing though; I will update you once I've tested it.

P.P.S.S.
Tested Sonix flasher for putting keyboard into bootloader and flashing. It works fine.

Copy link
Author

Choose a reason for hiding this comment

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

Maybe try adding Sonix flasher as an easy way to get into bootloader.

I have just completed the documentation.

Copy link
Author

@mr-july mr-july Mar 31, 2022

Choose a reason for hiding this comment

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

As far as i know the Sonix flasher does not currently support the RK61.

Actually it is supported. But it is detected as "Apple Keyboard / Keychron / Flashquark Horizon Z" if the original firmware is installed. If the QMK is installed, then it will not be detected.

We need implement it first in Sonix flasher repo. (This is not a big deal, i hope). I'll look into it.

The following patch need to be applied to Sonix flasher to add support for RK61.

diff --git a/src/main/python/main.py b/src/main/python/main.py
index 586a7e3..288e137 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -41,6 +41,7 @@ DEVICE_DESC = {
     (0x0c45, 0x766b): "Kemove",
     (0x0c45, 0x7698): "Womier",
     (0x320f, 0x5013): "Akko",
+    (0x0c45, 0x024f): "Royal Kludge RK61 RGB",
     (0x0c45, 0x5004): "Redragon",
     (0x0c45, 0x5104): "Redragon",
     (0x0C45, 0x8513): "Sharkoon",

Should I create a PR for this?

Actually I'm not sure which VENDOR_ID and PRODUCT_ID need to be used for QMK. Are there any rules or guidelines?

Copy link

@vjdato21 vjdato21 Mar 31, 2022

Choose a reason for hiding this comment

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

As far as i know the Sonix flasher does not currently support the RK61.

Actually it is supported. But it is detected as "Apple Keyboard / Keychron / Flashquark Horizon Z" if the original firmware is installed. If the QMK is installed, then it will not be detected.

We need implement it first in Sonix flasher repo. (This is not a big deal, i hope). I'll look into it.

The following patch need to be applied to Sonix flasher to add support for RK61.

diff --git a/src/main/python/main.py b/src/main/python/main.py
index 586a7e3..288e137 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -41,6 +41,7 @@ DEVICE_DESC = {
     (0x0c45, 0x766b): "Kemove",
     (0x0c45, 0x7698): "Womier",
     (0x320f, 0x5013): "Akko",
+    (0x0c45, 0x024f): "Royal Kludge RK61 RGB",
     (0x0c45, 0x5004): "Redragon",
     (0x0c45, 0x5104): "Redragon",
     (0x0C45, 0x8513): "Sharkoon",

Should I create a PR for this?

Actually I'm not sure which VENDOR_ID and PRODUCT_ID need to be used for QMK. Are there any rules or guidelines?

You don't have to make a patch for Sonix Flasher though you can if you want to. Anyway, regarding the VID and PID, only the Keychron has guidelines around that. You can copy the stock firmware's PID and VID, provided that they don't mimic the Apple keyboard.

Copy link
Author

Choose a reason for hiding this comment

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

Anyway, regarding the VID and PID, only the Keychron has guidelines around that.

Could you provide me an info link, please?

You can copy the stock firmware's PID and VID, provided that they don't mimic the Apple keyboard.

But for RK61 RGB, that is just the case. Original firmware masquerades as an Apple keyboard (05ac:024f). So, it is probably not an option just to use the original PID and VID. So, we need change it. But the values currently used (0c45:024f) are unknown for the Sonix Flasher. So, after first flash (from original firmware to self compiled QMK), the second flash will not be possible with the Sonix Flasher, because the keyboard (0c45:024f) will not be identified. It is necessary to manually switch the keyboard into bootloader first, then it will be recognized (0c45:7040) and can be flashed. Is it so for other keyboards too?

Copy link

@vjdato21 vjdato21 Apr 2, 2022

Choose a reason for hiding this comment

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

Could you provide me an info link, please?

Refer to #152

But for RK61 RGB, that is just the case. Original firmware masquerades as an Apple keyboard (05ac:024f). So, it is probably not an option just to use the original PID and VID. So, we need change it. But the values currently used (0c45:024f) are unknown for the Sonix Flasher. So, after first flash (from original firmware to self compiled QMK), the second flash will not be possible with the Sonix Flasher, because the keyboard (0c45:024f) will not be identified. It is necessary to manually switch the keyboard into bootloader first, then it will be recognized (0c45:7040) and can be flashed. Is it so for other keyboards too?

If RK61 RGB doesn't mimic Apple Keyboard's PID and VID, then you don't have to change it. To address your next question too, Sonix Flasher cannot put the keyboard anyway to bootloader mode when you have already flashed QMK, so that's fine.

@mr-july
Copy link
Author

mr-july commented Mar 28, 2022

I can't reproduce this compiling issue. But i could find some tips on reddit, which hopefully can help.

@vjdato21
Copy link

I can't reproduce this compiling issue. But i could find some tips on reddit, which hopefully can help.

Hmm... What are you using when you're compiling the firmware?

@mr-july
Copy link
Author

mr-july commented Mar 28, 2022 via email

@vjdato21
Copy link

vjdato21 commented Mar 28, 2022

I have installed the Arch Linux qmk package and compile the keymap by running sh qmk compile -k royal_kludge/rk61/rgb -m default something like this...

On 28 March 2022 15:14:36 vjdato21 @.***> wrote: I can't reproduce this compiling issue. But i could find some tips on reddit, which hopefully can help. Hmm... What are you using when you're compiling the firmware? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

Hmm... I'm using QMK MSYS and I've tried make and qmk compile, seems like both don't work on my end. I'll try using it in another operating system once I get some time.

@mr-july
Copy link
Author

mr-july commented Mar 28, 2022

Sorry, it was really a problem with ´keymap.h´ (this name seems to conflict with the system one), so I have renamed the file to ´layout.h´. Now your compile problem should be fixed.

@vjdato21
Copy link

Sorry, it was really a problem with ´keymap.h´ (this name seems to conflict with the system one), so I have renamed the file to ´layout.h´. Now your compile problem should be fixed.

Yep, it compiled now. It's kinda weird that yours doesn't complain about it.

@vjdato21
Copy link

I'm looking right now for a plate file for RK61. This will be useful for making the .json file for VIA, if ever you do find one, that'll be helpful.

@vjdato21
Copy link

I'm looking right now for a plate file for RK61. This will be useful for making the .json file for VIA, if ever you do find one, that'll be helpful.

Update:
Seems to be using a standard layout. Keycaps sizes should be easily sorted out now. I'll try make a .json file later.

@rnayabed
Copy link

rnayabed commented Feb 5, 2023

any updates?

@github-actions
Copy link

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 github-actions bot added the stale label Jun 21, 2023
@github-actions
Copy link

Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
// [stale-action-closed]

@github-actions github-actions bot closed this Jul 22, 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.

3 participants