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

Split HHKB to ANSI and JP layouts and Add VIA support for each #8582

Merged
merged 32 commits into from
May 11, 2020
Merged

Split HHKB to ANSI and JP layouts and Add VIA support for each #8582

merged 32 commits into from
May 11, 2020

Conversation

diegomsong
Copy link
Contributor

@diegomsong diegomsong commented Mar 27, 2020

Description

  1. Split keyboards/hhkb into two separate folders keyboards/hhkb/ansi and keyboards/hhkb/jp for implementation of separate JSON files in VIA. Reasoning is that the HHKB ANSI and HHKB JP have completely different matrices (see ansi/ansi.h (KLE) and jp/jp.h (KLE)) and should be treated as two separate, different keyboards.

Sorted keymaps into the appropriate folders for ANSI and JP. Compiled all .hex files successfully after the changes with the exception of brett and cinaeco which had user errors pertaining not to the source files but their keymap files.

Relevant files that were edited were:

  • ansi.c and ansi.h; jp.c and jp.h to have appropriate #include statements
  • config.h in each subfolder
  • info.json in each subfolder
  • relevant VIA files

All other files were not tampered with. Hopefully this is not a breaking change for other people's forks.


  1. Add VIA support for the HHKB Professional 2 ANSI and HHKB Professional JP, both of which have the Hasu TMK Controller available for reprogrammability.

Flashed VIA hex to HHKB Pro 2 with Hasu USB/BT Controller and tested successfully. Was able to test VIA hex on @bakingpy's HHKB Pro JP with Hasu Controller.

PR of VIA json files to the-via/keyboards repo.

Types of Changes

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

Checklist

  • My code follows the code style of this project.
  • 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).

@diegomsong diegomsong changed the title Split HHKB to ANSI and JP layouts and VIA support for each Split HHKB to ANSI and JP layouts and Add VIA support for each Mar 27, 2020
@zvecr zvecr added keyboard breaking_change Changes that need to wait for a version increment labels Apr 7, 2020
@zvecr
Copy link
Member

zvecr commented Apr 7, 2020

https://docs.qmk.fm/#/breaking_changes_instructions

Also, this has some conflicts.

@diegomsong
Copy link
Contributor Author

https://docs.qmk.fm/#/breaking_changes_instructions

Also, this has some conflicts.

How do I resolve conflicts pertaining to moved/removed files? (namely, all of the four files listed above in those particular paths)

Aside, the keymaps under hhkb/ansi/keymaps/brett and hhkb/ansi/keymaps/cinaeco fail to compile to hex with errors that I am unsure how to fix.

Would appreciate any help to resolve issues and continue with this change.

@diegomsong
Copy link
Contributor Author

Resolved conflicts and at this point only the brett and cinaeco keymaps in hhkb/ansi fail to make, but those are user keymaps I won't troubleshoot.

@drashna drashna requested a review from a team April 28, 2020 08:41
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.

Looking this over, there's a lot of duplicated code that should be shared between the ANSI and JP versions:

  • The rn42 code should be just within keyboards/hhkb/ instead of each version having its own rn42 directory – the code for both versions is 100% identical.
  • I don't see any reason to not remove the HHKB_JP definition – the ANSI version doesn't need the code it includes, and the JP version doesn't need it because it's obvious with these changes that we're dealing with the JP version in those code branches.

@noroadsleft noroadsleft requested a review from a team May 4, 2020 20:42
@diegomsong
Copy link
Contributor Author

diegomsong commented May 5, 2020

Looking this over, there's a lot of duplicated code that should be shared between the ANSI and JP versions:

  • The rn42 code should be just within keyboards/hhkb/ instead of each version having its own rn42 directory – the code for both versions is 100% identical.
  • I don't see any reason to not remove the HHKB_JP definition – the ANSI version doesn't need the code it includes, and the JP version doesn't need it because it's obvious with these changes that we're dealing with the JP version in those code branches.

@noroadsleft Just pushed an update resolving these two things. Thanks for the feedback.

keyboards/hhkb/jp/config.h Outdated Show resolved Hide resolved
keyboards/hhkb/ansi/ansi.h Outdated Show resolved Hide resolved
keyboards/hhkb/jp/jp.h Outdated Show resolved Hide resolved
keyboards/hhkb/jp/readme.md Outdated Show resolved Hide resolved
keyboards/hhkb/ansi/config.h Outdated Show resolved Hide resolved
@diegomsong
Copy link
Contributor Author

diegomsong commented May 11, 2020

One last thing:

Can you run git fetch against QMK's future branch, then rebase feature/hhkb_via on QMK's future branch? Your PR moves a couple of keymaps that are actually edited on the future branch, so I can't actually merge your PR yet.

image

Uh oh, did I do this right?

I ran

git fetch upstream future
and
git rebase upstream/future feature/hhkb_via

and then I git pushed. It complained and asked me to git pull, so I did and retried the push.

@noroadsleft
Copy link
Member

Uh oh, did I do this right?

I ran

git fetch upstream future
and
git rebase upstream/future feature/hhkb_via

and then I git pushed. It complained and asked me to git pull, so I did and retried the push.

I actually probably screwed you up a bit when I changed the target branch to future, but no matter – we're good now! Thanks!

@noroadsleft noroadsleft merged commit e658fd2 into qmk:future May 11, 2020
noroadsleft pushed a commit that referenced this pull request May 15, 2020
* VIA Support created for HHKB Hasu Controller config.h keymap.c rules.mk

* Add VIA support for HHKB JP with Hasu controller - define distinct PRODUCT_ID and set dynamic layers to 3 to fit EEPROM

* Split HHKB into ANSI and JP. Tested VIA for ANSI and JP. Hex compilation successful

* Resolve jp.h erroneous diff from git merge from master

* Resolve ansi.h diff merge

* Define rules.mk for dynamic macro to rid of warning for ansi/keymaps/mjt/

* Moved rn42 directory up, got rid of #define HHKB_JP lines

* Update keyboards/hhkb/jp/readme.md

* Update keyboards/hhkb/jp/keymaps/via/keymap.c

* Replace with #pragma once and remove ending #endif

* Remove old style guards #define... for #pragma once

* Update keyboards/hhkb/jp/keymaps/via/rules.mk

* Update keyboards/hhkb/ansi/rules.mk

* Update keyboards/hhkb/jp/rules.mk

* Updated hhkb/ansi/readme.md compiling instructions

* VIA Support created for HHKB Hasu Controller config.h keymap.c rules.mk

* Add VIA support for HHKB JP with Hasu controller - define distinct PRODUCT_ID and set dynamic layers to 3 to fit EEPROM

* Split HHKB into ANSI and JP. Tested VIA for ANSI and JP. Hex compilation successful

* Resolve ansi.h diff merge

* Define rules.mk for dynamic macro to rid of warning for ansi/keymaps/mjt/

* Moved rn42 directory up, got rid of #define HHKB_JP lines

* Update keyboards/hhkb/jp/readme.md

* Update keyboards/hhkb/jp/keymaps/via/keymap.c

* Replace with #pragma once and remove ending #endif

* Remove old style guards #define... for #pragma once

* Update keyboards/hhkb/jp/keymaps/via/rules.mk

* Update keyboards/hhkb/ansi/rules.mk

* Update keyboards/hhkb/jp/rules.mk

* Updated hhkb/ansi/readme.md compiling instructions
noroadsleft pushed a commit to noroadsleft/qmk_firmware that referenced this pull request May 22, 2020
)

* VIA Support created for HHKB Hasu Controller config.h keymap.c rules.mk

* Add VIA support for HHKB JP with Hasu controller - define distinct PRODUCT_ID and set dynamic layers to 3 to fit EEPROM

* Split HHKB into ANSI and JP. Tested VIA for ANSI and JP. Hex compilation successful

* Resolve jp.h erroneous diff from git merge from master

* Resolve ansi.h diff merge

* Define rules.mk for dynamic macro to rid of warning for ansi/keymaps/mjt/

* Moved rn42 directory up, got rid of #define HHKB_JP lines

* Update keyboards/hhkb/jp/readme.md

* Update keyboards/hhkb/jp/keymaps/via/keymap.c

* Replace with #pragma once and remove ending #endif

* Remove old style guards #define... for #pragma once

* Update keyboards/hhkb/jp/keymaps/via/rules.mk

* Update keyboards/hhkb/ansi/rules.mk

* Update keyboards/hhkb/jp/rules.mk

* Updated hhkb/ansi/readme.md compiling instructions

* VIA Support created for HHKB Hasu Controller config.h keymap.c rules.mk

* Add VIA support for HHKB JP with Hasu controller - define distinct PRODUCT_ID and set dynamic layers to 3 to fit EEPROM

* Split HHKB into ANSI and JP. Tested VIA for ANSI and JP. Hex compilation successful

* Resolve ansi.h diff merge

* Define rules.mk for dynamic macro to rid of warning for ansi/keymaps/mjt/

* Moved rn42 directory up, got rid of #define HHKB_JP lines

* Update keyboards/hhkb/jp/readme.md

* Update keyboards/hhkb/jp/keymaps/via/keymap.c

* Replace with #pragma once and remove ending #endif

* Remove old style guards #define... for #pragma once

* Update keyboards/hhkb/jp/keymaps/via/rules.mk

* Update keyboards/hhkb/ansi/rules.mk

* Update keyboards/hhkb/jp/rules.mk

* Updated hhkb/ansi/readme.md compiling instructions
noroadsleft pushed a commit to noroadsleft/qmk_firmware that referenced this pull request May 28, 2020
)

* VIA Support created for HHKB Hasu Controller config.h keymap.c rules.mk

* Add VIA support for HHKB JP with Hasu controller - define distinct PRODUCT_ID and set dynamic layers to 3 to fit EEPROM

* Split HHKB into ANSI and JP. Tested VIA for ANSI and JP. Hex compilation successful

* Resolve jp.h erroneous diff from git merge from master

* Resolve ansi.h diff merge

* Define rules.mk for dynamic macro to rid of warning for ansi/keymaps/mjt/

* Moved rn42 directory up, got rid of #define HHKB_JP lines

* Update keyboards/hhkb/jp/readme.md

* Update keyboards/hhkb/jp/keymaps/via/keymap.c

* Replace with #pragma once and remove ending #endif

* Remove old style guards #define... for #pragma once

* Update keyboards/hhkb/jp/keymaps/via/rules.mk

* Update keyboards/hhkb/ansi/rules.mk

* Update keyboards/hhkb/jp/rules.mk

* Updated hhkb/ansi/readme.md compiling instructions

* VIA Support created for HHKB Hasu Controller config.h keymap.c rules.mk

* Add VIA support for HHKB JP with Hasu controller - define distinct PRODUCT_ID and set dynamic layers to 3 to fit EEPROM

* Split HHKB into ANSI and JP. Tested VIA for ANSI and JP. Hex compilation successful

* Resolve ansi.h diff merge

* Define rules.mk for dynamic macro to rid of warning for ansi/keymaps/mjt/

* Moved rn42 directory up, got rid of #define HHKB_JP lines

* Update keyboards/hhkb/jp/readme.md

* Update keyboards/hhkb/jp/keymaps/via/keymap.c

* Replace with #pragma once and remove ending #endif

* Remove old style guards #define... for #pragma once

* Update keyboards/hhkb/jp/keymaps/via/rules.mk

* Update keyboards/hhkb/ansi/rules.mk

* Update keyboards/hhkb/jp/rules.mk

* Updated hhkb/ansi/readme.md compiling instructions
noroadsleft added a commit that referenced this pull request May 30, 2020
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (#8954)

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (#8957)

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (#8958)

* Migrate `ACTION_LAYER_MODS` to `LM()` (#8959)

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (#8968)

* Convert V-USB usbdrv to a submodule (#8321)

* Unify Tap Hold functions and documentation (#8348)

* Changing board names to prevent confusion (#8412)

* Move the Keyboardio Model01 to a keyboardio/ subdir (#8499)

* Move spaceman keyboards (#8830)

* Migrate miscellaneous `fn_actions` entries (#8977)

* Migrate `ACTION_MODS_KEY` to chained mod keycodes (#8979)

* Organizing my keyboards (plaid, tartan, ergoinu) (#8537)

* Refactor Lily58 to use split_common (#6260)

* Refactor zinc to use split_common (#7114)

* Add a message if bin/qmk doesn't work (#9000)

* Fix conflicting types for 'tfp_printf' (#8269)

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (#6480)

* Refactor and updates to TKC1800 code (#8472)

* Switch to qmk forks for everything (#9019)

* audio refactor: replace deprecated PLAY_NOTE_ARRAY (#8484)

* Audio enable corrections (2/3) (#8903)

* Split HHKB to ANSI and JP layouts and Add VIA support for each (#8582)

* Audio enable corrections (Part 4) (#8974)

* Fix typo from PR7114 (#9171)

* Augment future branch Changelogs (#8978)

* Revert "Branch point for 2020 May 30 Breaking Change"
turky pushed a commit to turky/qmk_firmware that referenced this pull request Jun 13, 2020
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (qmk#8954)

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (qmk#8957)

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (qmk#8958)

* Migrate `ACTION_LAYER_MODS` to `LM()` (qmk#8959)

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (qmk#8968)

* Convert V-USB usbdrv to a submodule (qmk#8321)

* Unify Tap Hold functions and documentation (qmk#8348)

* Changing board names to prevent confusion (qmk#8412)

* Move the Keyboardio Model01 to a keyboardio/ subdir (qmk#8499)

* Move spaceman keyboards (qmk#8830)

* Migrate miscellaneous `fn_actions` entries (qmk#8977)

* Migrate `ACTION_MODS_KEY` to chained mod keycodes (qmk#8979)

* Organizing my keyboards (plaid, tartan, ergoinu) (qmk#8537)

* Refactor Lily58 to use split_common (qmk#6260)

* Refactor zinc to use split_common (qmk#7114)

* Add a message if bin/qmk doesn't work (qmk#9000)

* Fix conflicting types for 'tfp_printf' (qmk#8269)

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (qmk#6480)

* Refactor and updates to TKC1800 code (qmk#8472)

* Switch to qmk forks for everything (qmk#9019)

* audio refactor: replace deprecated PLAY_NOTE_ARRAY (qmk#8484)

* Audio enable corrections (2/3) (qmk#8903)

* Split HHKB to ANSI and JP layouts and Add VIA support for each (qmk#8582)

* Audio enable corrections (Part 4) (qmk#8974)

* Fix typo from PR7114 (qmk#9171)

* Augment future branch Changelogs (qmk#8978)

* Revert "Branch point for 2020 May 30 Breaking Change"
jakobaa pushed a commit to jakobaa/qmk_firmware that referenced this pull request Jul 7, 2020
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (qmk#8954)

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (qmk#8957)

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (qmk#8958)

* Migrate `ACTION_LAYER_MODS` to `LM()` (qmk#8959)

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (qmk#8968)

* Convert V-USB usbdrv to a submodule (qmk#8321)

* Unify Tap Hold functions and documentation (qmk#8348)

* Changing board names to prevent confusion (qmk#8412)

* Move the Keyboardio Model01 to a keyboardio/ subdir (qmk#8499)

* Move spaceman keyboards (qmk#8830)

* Migrate miscellaneous `fn_actions` entries (qmk#8977)

* Migrate `ACTION_MODS_KEY` to chained mod keycodes (qmk#8979)

* Organizing my keyboards (plaid, tartan, ergoinu) (qmk#8537)

* Refactor Lily58 to use split_common (qmk#6260)

* Refactor zinc to use split_common (qmk#7114)

* Add a message if bin/qmk doesn't work (qmk#9000)

* Fix conflicting types for 'tfp_printf' (qmk#8269)

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (qmk#6480)

* Refactor and updates to TKC1800 code (qmk#8472)

* Switch to qmk forks for everything (qmk#9019)

* audio refactor: replace deprecated PLAY_NOTE_ARRAY (qmk#8484)

* Audio enable corrections (2/3) (qmk#8903)

* Split HHKB to ANSI and JP layouts and Add VIA support for each (qmk#8582)

* Audio enable corrections (Part 4) (qmk#8974)

* Fix typo from PR7114 (qmk#9171)

* Augment future branch Changelogs (qmk#8978)

* Revert "Branch point for 2020 May 30 Breaking Change"
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Aug 9, 2020
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (qmk#8954)

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (qmk#8957)

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (qmk#8958)

* Migrate `ACTION_LAYER_MODS` to `LM()` (qmk#8959)

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (qmk#8968)

* Convert V-USB usbdrv to a submodule (qmk#8321)

* Unify Tap Hold functions and documentation (qmk#8348)

* Changing board names to prevent confusion (qmk#8412)

* Move the Keyboardio Model01 to a keyboardio/ subdir (qmk#8499)

* Move spaceman keyboards (qmk#8830)

* Migrate miscellaneous `fn_actions` entries (qmk#8977)

* Migrate `ACTION_MODS_KEY` to chained mod keycodes (qmk#8979)

* Organizing my keyboards (plaid, tartan, ergoinu) (qmk#8537)

* Refactor Lily58 to use split_common (qmk#6260)

* Refactor zinc to use split_common (qmk#7114)

* Add a message if bin/qmk doesn't work (qmk#9000)

* Fix conflicting types for 'tfp_printf' (qmk#8269)

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (qmk#6480)

* Refactor and updates to TKC1800 code (qmk#8472)

* Switch to qmk forks for everything (qmk#9019)

* audio refactor: replace deprecated PLAY_NOTE_ARRAY (qmk#8484)

* Audio enable corrections (2/3) (qmk#8903)

* Split HHKB to ANSI and JP layouts and Add VIA support for each (qmk#8582)

* Audio enable corrections (Part 4) (qmk#8974)

* Fix typo from PR7114 (qmk#9171)

* Augment future branch Changelogs (qmk#8978)

* Revert "Branch point for 2020 May 30 Breaking Change"
sjmacneil pushed a commit to sjmacneil/qmk_firmware that referenced this pull request Feb 19, 2021
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (qmk#8954)

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (qmk#8957)

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (qmk#8958)

* Migrate `ACTION_LAYER_MODS` to `LM()` (qmk#8959)

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (qmk#8968)

* Convert V-USB usbdrv to a submodule (qmk#8321)

* Unify Tap Hold functions and documentation (qmk#8348)

* Changing board names to prevent confusion (qmk#8412)

* Move the Keyboardio Model01 to a keyboardio/ subdir (qmk#8499)

* Move spaceman keyboards (qmk#8830)

* Migrate miscellaneous `fn_actions` entries (qmk#8977)

* Migrate `ACTION_MODS_KEY` to chained mod keycodes (qmk#8979)

* Organizing my keyboards (plaid, tartan, ergoinu) (qmk#8537)

* Refactor Lily58 to use split_common (qmk#6260)

* Refactor zinc to use split_common (qmk#7114)

* Add a message if bin/qmk doesn't work (qmk#9000)

* Fix conflicting types for 'tfp_printf' (qmk#8269)

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (qmk#6480)

* Refactor and updates to TKC1800 code (qmk#8472)

* Switch to qmk forks for everything (qmk#9019)

* audio refactor: replace deprecated PLAY_NOTE_ARRAY (qmk#8484)

* Audio enable corrections (2/3) (qmk#8903)

* Split HHKB to ANSI and JP layouts and Add VIA support for each (qmk#8582)

* Audio enable corrections (Part 4) (qmk#8974)

* Fix typo from PR7114 (qmk#9171)

* Augment future branch Changelogs (qmk#8978)

* Revert "Branch point for 2020 May 30 Breaking Change"
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Branch point for 2020 May 30 Breaking Change

* Migrate `ACTION_LAYER_TOGGLE` to `TG()` (qmk#8954)

* Migrate `ACTION_MODS_ONESHOT` to `OSM()` (qmk#8957)

* Migrate `ACTION_DEFAULT_LAYER_SET` to `DF()` (qmk#8958)

* Migrate `ACTION_LAYER_MODS` to `LM()` (qmk#8959)

* Migrate `ACTION_MODS_TAP_KEY` to `MT()` (qmk#8968)

* Convert V-USB usbdrv to a submodule (qmk#8321)

* Unify Tap Hold functions and documentation (qmk#8348)

* Changing board names to prevent confusion (qmk#8412)

* Move the Keyboardio Model01 to a keyboardio/ subdir (qmk#8499)

* Move spaceman keyboards (qmk#8830)

* Migrate miscellaneous `fn_actions` entries (qmk#8977)

* Migrate `ACTION_MODS_KEY` to chained mod keycodes (qmk#8979)

* Organizing my keyboards (plaid, tartan, ergoinu) (qmk#8537)

* Refactor Lily58 to use split_common (qmk#6260)

* Refactor zinc to use split_common (qmk#7114)

* Add a message if bin/qmk doesn't work (qmk#9000)

* Fix conflicting types for 'tfp_printf' (qmk#8269)

* Fixed RGB_DISABLE_AFTER_TIMEOUT to be seconds based & small internals cleanup (qmk#6480)

* Refactor and updates to TKC1800 code (qmk#8472)

* Switch to qmk forks for everything (qmk#9019)

* audio refactor: replace deprecated PLAY_NOTE_ARRAY (qmk#8484)

* Audio enable corrections (2/3) (qmk#8903)

* Split HHKB to ANSI and JP layouts and Add VIA support for each (qmk#8582)

* Audio enable corrections (Part 4) (qmk#8974)

* Fix typo from PR7114 (qmk#9171)

* Augment future branch Changelogs (qmk#8978)

* Revert "Branch point for 2020 May 30 Breaking Change"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking_change Changes that need to wait for a version increment keyboard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants