-
-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
Checking version of firmware loaded to keyboard #366
Comments
This is the best place to ask :) Not currently! We've just recently started adopting version numbers for some areas (OLKB boards). What keyboard are you dealing with? |
I have ErgoDox EZ and wanted to find out what version of firmware it came with. The reason is that I`m concerned with how dual-role keys work and wanted to make sure I have the latest version before raising issue. The problem is that for those keys to be registered as modifiers one has to wait for the timeout even after pressing some alphanumeric key almost immediately after pressing dual-role modifier. The problem is described at https://input.club/forums/topic/dual-role-keys#post-1989 :
And the answer to this is that tmk can do this https://input.club/forums/topic/dual-role-keys#post-2883 :
I've been searching for issue/pr where dual-role keys were discussed/introduced but there's no such one (https://github.com/jackhumbert/qmk_firmware/issues?utf8=%E2%9C%93&q=dual) I've found this tmk issue tmk/tmk_keyboard#49 and as qmk is a fork I wonder if you implemented this feature yourself or does it come from tmk? ps. |
@piotr-dobrogost Check #142! Correct me if I'm wrong, but based on your description I believe that's the issue you're having. |
@piotr-dobrogost - reading the firmware version isn't possible (because there are no version numbers per se). But I can tell you that #142 was never made into a PR, so the change isn't reflected in the keymap settings. Would you like to try playing with that constant yourself and seeing if it helps? Are you all set up with a build env? |
Let's move discussion about behavior of dual-role keys to #142. |
I just found a |
It's kind of an interesting idea; I imagine an implementation might look like having a key that, when pressed, reports the git commit hash of the version that you're running. |
Yeah, the latest commit hash would certainly point people in the right direction. That would be trivial to pull from git, but it would only work in copies of the firmware that were cloned (not downloaded), I believe. Commit hashes are the only real thing that would be useful in relation to the repo - you could do build numbers in-between commits, but that's pretty localised. |
Ah, wonderful! That lets me simplify my keystroke that types out "cbbrowne" :-) And yeah, the git hash only directly helps if you built out of a git repo. If you're doing your own thing out of something else, you'd need to capture some other piece of information. Actually, I'd say you need more than just the commit hash; you need to know which keymap it was, too. The point is kind of to start that conversation, figure out what is meaningful as indication of version. |
Saving the keymap file that's being compiled would be awesome! I'm sure we could store the datetime as well. Maybe that info, along with an optional git hash - very useful :) |
It'd be reasonably easy to capture the keyboard and the keymap from within the makefile, and turn it into a define, and add a git hash if in a git checkout, or a timestamp otherwise, and let keymaps make use of that information. It would also make sense to make it possible to have a separate QMK version and a keymap version - eg, a keymap can remain unchanged while QMK changes, yet, bugs can still be fixed. Likewise, QMK can remain largely unchanged, but the keymap may change incompatibly (this assumes the keymap is not in the QMK repo, mind you, otherwise the git hash would change anyway). Something like this, as the end result, would be very nice imo: #define QMK_VERSION "g25d4772754186b8ab6ef86c28049da67a460f123"
#define QMK_KEYBOARD "ergodox_ez"
#define QMK_KEYMAP "default"
#define QMK_KEYMAP_VERSION "1.4" If not in a git repo, either the build time, or the timestamp of the top-level directory could be used as a version, perhaps. |
There's the question How can I get my C code to automatically print out its Git version hash? at Stackoverflow with an answer showing how to use |
This adds the keyboard and keymap built, along with the QMK firmware's git hash (or a timestamp), to OPT_DEFS. That, in turn, allows keymaps to make use of these information, and do whatever they want with it. For example, one could print them on `LEADER v` like this: ```c SEQ_ONE_KEY (KC_V) { SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); } ``` This addresses #366. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Thanks @piotr-dobrogost! And thanks to @algernon, this has been merged with #408 :) here's the example mentioned: SEQ_ONE_KEY (KC_V) {
SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
} |
Thank you all for bringing this feature to life. I hope it will find its way to the default keymap of ErgoDox EZ. |
Reopening because I want to put this into the default firmware. |
Done! This is now in the default layout. Thank you, @piotr-dobrogost and @jackhumbert! Very awesome. |
Thanks @ezuk. Will this feature be shown on Default Firmware Keymap at https://ergodox-ez.com/pages/our-firmware ? |
@piotr-dobrogost the main issue there is that there are already thousands of keyboards out in the wild without this feature, so I don't think I'll be showing it there. It would cause confusion for all of the people who don't have it (which is why I am not modifying the default keymap very often). |
@ezuk |
@piotr-dobrogost my experience is that people who care enough about the particular version of keymap they use end up on github anyway. That is a relatively minor (if important) subset of our users. Many customers simply want a really good keyboard, and are happy to pull it out of the box, plug it in, and go. I am really trying to keep their lives simple. IMHO if I went to a website and tried figuring out how this thing works and saw a versioning note like that it might turn me off a little bit -- make it seem intimidating or complicated. |
This adds the keyboard and keymap built, along with the QMK firmware's git hash (or a timestamp), to OPT_DEFS. That, in turn, allows keymaps to make use of these information, and do whatever they want with it. For example, one could print them on `LEADER v` like this: ```c SEQ_ONE_KEY (KC_V) { SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); } ``` This addresses qmk#366. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
…ey can get trimmed (qmk#366)
* Add VIAL port for Keycapsss 3w6 RP2040 * fix code format for uid * fix EE-Hands and move more config options to json * Fix: add missing split pointing device setting --------- Co-authored-by: Ben Roe <ben@MacBook-Pro-von-Ben.local> Co-authored-by: Conor Burns <mail@conor-burns.com>
I apologize in advance if it's not the best place to ask this question but I couldn't find any qmk related forum.
Is there a way to find out what version of qmk firmware is currently loaded to keyboard?
The text was updated successfully, but these errors were encountered: