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

Added info.json for mt980 keyboard and fixes to walker keymap #5391

Merged
merged 16 commits into from
Mar 14, 2019

Conversation

walkerstop
Copy link
Contributor

Added info.json for mt980 keyboard so configurator works on this keyboard, and fix a couple issues in keymap

Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

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

Your JSON objects are in the wrong order. This will lead to QMK Configurator assigning keycodes to the wrong locations, as-is.

See the suggestions below.

keyboards/mt980/info.json Show resolved Hide resolved
keyboards/mt980/info.json Outdated Show resolved Hide resolved
keyboards/mt980/info.json Outdated Show resolved Hide resolved
keyboards/mt980/info.json Outdated Show resolved Hide resolved
keyboards/mt980/info.json Show resolved Hide resolved
keyboards/mt980/info.json Show resolved Hide resolved
keyboards/mt980/info.json Outdated Show resolved Hide resolved
noroadsleft and others added 8 commits March 13, 2019 02:59
Co-Authored-By: walkerstop <walkerstop@gmail.com>
Co-Authored-By: walkerstop <walkerstop@gmail.com>
Co-Authored-By: walkerstop <walkerstop@gmail.com>
Co-Authored-By: walkerstop <walkerstop@gmail.com>
Co-Authored-By: walkerstop <walkerstop@gmail.com>
Co-Authored-By: walkerstop <walkerstop@gmail.com>
Co-Authored-By: walkerstop <walkerstop@gmail.com>
Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

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

Looks good to me. 👍

@walkerstop walkerstop changed the title Added info.json for mt980 keyboard and minor fixes to walker keymap Added info.json for mt980 keyboard and fixes to walker keymap Mar 13, 2019
@mechmerlin
Copy link
Contributor

That's very odd. @noroadsleft I gave @walkerstop your tool to convert kbfirmware.json file over. Walker, did you use it? If you did, we might have to look at that tool again.

@walkerstop
Copy link
Contributor Author

That's very odd. @noroadsleft I gave @walkerstop your tool to convert kbfirmware.json file over. Walker, did you use it? If you did, we might have to look at that tool again.

Yep I used that tool

keyboards/mt980/mt980.c Outdated Show resolved Hide resolved
@noroadsleft
Copy link
Member

That's very odd. @noroadsleft I gave @walkerstop your tool to convert kbfirmware.json file over. Walker, did you use it? If you did, we might have to look at that tool again.

Yep I used that tool

@walkerstop, any chance you could send me the JSON you put into the tool? I could use it for debugging.

I think I already know what this issue is, but I'd need an appropriate JSON file to solve it.

@walkerstop
Copy link
Contributor Author

That's very odd. @noroadsleft I gave @walkerstop your tool to convert kbfirmware.json file over. Walker, did you use it? If you did, we might have to look at that tool again.

Yep I used that tool

@walkerstop, any chance you could send me the JSON you put into the tool? I could use it for debugging.

I think I already know what this issue is, but I'd need an appropriate JSON file to solve it.

Sure, here it is https://drive.google.com/open?id=1vfHCIwZ5Uaao3eeqXfxaPmrOfW9vGRO7

@noroadsleft
Copy link
Member

@walkerstop @mechmerlin

K, I have a partial answer for why the info.json was out of order.

The way my tool parses/generates the code right now, every unique y value is on a different line of the generated code, so in this case, the argument in the layout macro for the Up arrow isn't on the same line as the Shift keys:

#define LAYOUT( \
  K50, K52, K53, K54, K55, K57, K58, KB8, KB7, KB5, KB4, KB3, KB6, K51, KB2, KB1, KB0, K63, \
  K40, K41, K42, K43, K44, K45, K46, K47, K48, KA8, KA7, KA5, KA4, KA3, KA6, KA2, KA1, KA0, K64, \
  K30, K31, K32, K33, K34, K35, K36, K37, K38, K98, K97, K95, K94, K84, K96, K92, K91, K90, \
  K20, K21, K22, K23, K24, K25, K26, K27, K28, K88, K87, K85, K93, K86, K82, K81, K80, \
  K10, K11, K12, K13, K14, K15, K16, K17, K18, K78, K77, K75, K74, K76, K72, K71, K70, \
  K73, \
  K00, K01, K02, K06, K08, K07, K05, K62, K61, K60, \
  K04, K03, K66  \
)

K73 is the Up arrow key, and K04, K03 and K66 are the Left, Down and Right arrows. (K74 is Right Shift, and K76 is KC_P1.)

From that code generation (ran walkerstop's linked file through the tool), the info.json output is valid, but only if the above code block is the physical layout macro.

walkerstop didn't use the generated <keyboard>.h output though, but used an output that was more in line with current convention (which is one of the outstanding issues with output from the KBFirmware-to-QMK tool). The info.json output, however, was used, and was not updated to match, which is where the mismatch happened. A "symptom" of this is that the label keys in info.json here don't match the argument identifiers in the existing mt980.h (my tool uses the same identifiers between these files; the label in the JSON is the same as the argument identifier in <keyboard>.h).

I do intend to solve this, but I've been stumped on this front for a while. My goal is that a user can dump a KBFirmware-format JSON file in, and get usable QMK code out that requires nothing more than saving the appropriate output to the appropriate file. I still at this point consider the tool to be very much in Beta.

@mechmerlin
Copy link
Contributor

This is good to know for future ports, thanks @noroadsleft

Copy link
Contributor

@mechmerlin mechmerlin left a comment

Choose a reason for hiding this comment

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

Approved!

@mechmerlin mechmerlin merged commit c3b4f65 into qmk:master Mar 14, 2019
Shinichi-Ohki added a commit to Shinichi-Ohki/qmk_firmware that referenced this pull request Mar 15, 2019
* 'master' of https://github.com/qmk/qmk_firmware: (48 commits)
  [Keymap] Added Boy_314's layout for half n half keyboard (qmk#5373)
  Align use of atmega32a program script (qmk#5259)
  [Keyboard] new keyboard lovelive9 (qmk#5266)
  [Keyboard] Inital port of xd96 (qmk#5401)
  Fix ascii art (qmk#5407)
  [Keyboard] Georgi Support (qmk#5384)
  fresh commit for a new fork for PR to upstream/master (qmk#5406)
  Added info.json for mt980 keyboard and fixes to walker keymap (qmk#5391)
  Add support for THE60 (qmk#5385)
  Added 1up60rgb keymap: mdyevimnav (qmk#5386)
  Fix i2c calls for HotDox keyboard (qmk#5387)
  Sleep until USB port becomes writable before running avrdude (qmk#5393)
  [Keymap] Some more improvements to keymap, currency symbols.. (qmk#5395)
  [Keymap] Add atreus, ergotravel and org60 keymaps (qmk#5381)
  archetype keymap for jj50 (qmk#5397)
  Wheat Field Peripherals mt980 (FC980M Layout) PCB Support (qmk#5374)
  Minor readme fix (qmk#5389)
  Add new keyboard Plaid and ATMEGA328p support (qmk#5379)
  Next set of split_common changes (qmk#4974)
  [Keyboard] Lily58 Add info.json file (qmk#5354)
  ...
chie4hao pushed a commit to chie4hao/qmk_firmware that referenced this pull request Mar 28, 2019
* Added info.json and minor fixes to walker keymap

* Fix url

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Fix user calling keymap functions

* cancel oneshot layer on KC_TRNS

* Fix to oneshot layer handling

* Fix oneshot handling of reset

* Move bootmagic key to Esc where it normally resides

* Remove deprecated function

* Treat shift-numlock as shift-insert in Walker layer
zer09 pushed a commit to zer09/qmk_firmware that referenced this pull request Mar 31, 2019
* Added info.json and minor fixes to walker keymap

* Fix url

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Fix user calling keymap functions

* cancel oneshot layer on KC_TRNS

* Fix to oneshot layer handling

* Fix oneshot handling of reset

* Move bootmagic key to Esc where it normally resides

* Remove deprecated function

* Treat shift-numlock as shift-insert in Walker layer
danielo515 pushed a commit to danielo515/qmk_firmware that referenced this pull request May 15, 2019
* Added info.json and minor fixes to walker keymap

* Fix url

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Fix user calling keymap functions

* cancel oneshot layer on KC_TRNS

* Fix to oneshot layer handling

* Fix oneshot handling of reset

* Move bootmagic key to Esc where it normally resides

* Remove deprecated function

* Treat shift-numlock as shift-insert in Walker layer
Timbus pushed a commit to Timbus/qmk_firmware that referenced this pull request Jun 23, 2019
* Added info.json and minor fixes to walker keymap

* Fix url

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Update keyboards/mt980/info.json

Co-Authored-By: walkerstop <walkerstop@gmail.com>

* Fix user calling keymap functions

* cancel oneshot layer on KC_TRNS

* Fix to oneshot layer handling

* Fix oneshot handling of reset

* Move bootmagic key to Esc where it normally resides

* Remove deprecated function

* Treat shift-numlock as shift-insert in Walker layer
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