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

Add ambergon/multipleglove #24526

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Add ambergon/multipleglove #24526

wants to merge 9 commits into from

Conversation

ambergon
Copy link

add keyboards/ambergon/multipleglove

Description

add my new keyboard map

Types of Changes

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

Issues Fixed or Closed by This PR

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

add keyboards/ambergon/multipleglove
ambergon added 4 commits October 26, 2024 01:19
DELETE PRODUCT in config.h
RENAME ./keymap/via/via.json -> ./keyboard.json
keyboard.json -> delete
info.json -> keyboard.json
keymap.c func encoder_map
keymap level enable -> ENCODER_MAP_ENABLE 	= yes
keyboards/ambergon/multipleglove/config.h Outdated Show resolved Hide resolved
keyboards/ambergon/multipleglove/rules.mk Outdated Show resolved Hide resolved
Comment on lines 3 to 9
![ambergon/MultipleGlove](imgur.com image replace me!)

*A short description of the keyboard/project*

* Keyboard Maintainer: [ATSUTO_NAKAYAMA](https://github.com/ambergon)
* Hardware Supported: *The PCBs, controllers supported*
* Hardware Availability: *Links to where you can find this hardware*
Copy link
Member

Choose a reason for hiding this comment

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

This section needs to be filled in

Comment on lines 13 to 17
make ambergon/MultipleGlove:default

Flashing example for this keyboard:

make ambergon/MultipleGlove:default:flash
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
make ambergon/MultipleGlove:default
Flashing example for this keyboard:
make ambergon/MultipleGlove:default:flash
make ambergon/multipleglove:default
Flashing example for this keyboard:
make ambergon/multipleglove:default:flash

@@ -0,0 +1,3 @@
ENCODER_ENABLE = yes
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ENCODER_ENABLE = yes

Comment on lines 5 to 8

#ifdef CONSOLE_ENABLE
#include <print.h>
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
#ifdef CONSOLE_ENABLE
#include <print.h>
#endif

Comment on lines 11 to 123
KC_Q , KC_R
),
[2] = LAYOUT(
KC_C , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[3] = LAYOUT(
KC_D , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[4] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[5] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[6] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[7] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[8] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[9] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[10] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[11] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[12] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[13] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[14] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[15] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
)
Copy link
Member

Choose a reason for hiding this comment

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

Padding out the keymap array with useless layers is not required.

Suggested change
// KC_NO : 何もしない。
[0] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[1] = LAYOUT(
KC_B , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[2] = LAYOUT(
KC_C , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[3] = LAYOUT(
KC_D , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[4] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[5] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[6] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[7] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[8] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[9] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[10] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[11] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[12] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[13] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[14] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
),
[15] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
)
[0] = LAYOUT(
KC_A , KC_B , KC_C , KC_D ,
KC_E , KC_F , KC_G , KC_H ,
KC_I , KC_J , KC_K , KC_L ,
KC_NO , KC_NO , KC_NO , KC_NO ,
KC_Q , KC_R
)

Comment on lines 125 to 153



// rules.mkで有効化された関数
// ここで各ロータリーエンコーダの挙動を指定する。
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
// レイヤー数
// エンコーダー数
// 配列の先頭のエンコーダから指定する。
// ENCODER_CCW_CW( 回転時のキー , 逆転時のキー ) ,
[0] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[1] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[2] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[3] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[4] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[5] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[6] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[7] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[8] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[9] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[10] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[11] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[12] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[13] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[14] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[15] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) }
};
#endif
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// rules.mkで有効化された関数
// ここで各ロータリーエンコーダの挙動を指定する。
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
// レイヤー数
// エンコーダー数
// 配列の先頭のエンコーダから指定する。
// ENCODER_CCW_CW( 回転時のキー , 逆転時のキー ) ,
[0] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[1] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[2] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[3] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[4] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[5] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[6] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[7] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[8] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[9] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[10] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[11] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[12] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[13] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[14] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) },
[15] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) }
};
#endif
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW( KC_P , KC_Q ) , ENCODER_CCW_CW( KC_R , KC_S ) , ENCODER_CCW_CW( KC_T , KC_U ) }
};
#endif

Comment on lines 154 to 212


/* #include <print.h> */
/* bool process_record_user(uint16_t keycode, keyrecord_t *record) { */
/* print( "test\n" ); */
/* #ifdef CONSOLE_ENABLE */
/* uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); */
/* #endif */
/* // falseならキー処理をしない。 */
/* return true; */
/* } */

static int myOldLayer = 0;
void matrix_scan_user(void) {

int myLayer= (0 << 3) | (0 << 2) | (0 << 1) | (0 << 0) ;
myLayer = ( matrix_is_on( 3 , 3 ) << 3 ) | ( matrix_is_on( 3 , 2 ) << 2 ) | ( matrix_is_on( 3 , 1 ) << 1 ) | ( matrix_is_on( 3 , 0 ) << 0 );

if ( myLayer != myOldLayer ){
layer_move( myLayer );
myOldLayer = myLayer;
}
/* uprintf("now layer myLayer %d\n" , myLayer ); */
}



































Copy link
Member

Choose a reason for hiding this comment

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

Default keymaps should be basic, and not contain this sort of logic.

Given you have a bunch of KC_NO in the layers, the suggestion would be to rework to use standard layer keycodes

Suggested change
/* #include <print.h> */
/* bool process_record_user(uint16_t keycode, keyrecord_t *record) { */
/* print( "test\n" ); */
/* #ifdef CONSOLE_ENABLE */
/* uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); */
/* #endif */
/* // falseならキー処理をしない。 */
/* return true; */
/* } */
static int myOldLayer = 0;
void matrix_scan_user(void) {
int myLayer= (0 << 3) | (0 << 2) | (0 << 1) | (0 << 0) ;
myLayer = ( matrix_is_on( 3 , 3 ) << 3 ) | ( matrix_is_on( 3 , 2 ) << 2 ) | ( matrix_is_on( 3 , 1 ) << 1 ) | ( matrix_is_on( 3 , 0 ) << 0 );
if ( myLayer != myOldLayer ){
layer_move( myLayer );
myOldLayer = myLayer;
}
/* uprintf("now layer myLayer %d\n" , myLayer ); */
}

Comment on lines 57 to 69













Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

@zvecr zvecr changed the title [add] Add ambergon/multipleglove Oct 25, 2024
ambergon and others added 2 commits November 14, 2024 23:24
DELETE ./config.h
DELETE ./rules.mk
FIX    ./readme.md
FIX    ./keymaps/default/rules.mk
    remove ENCODER ENABLE
FIX    ./keyboard.json
    add encoder true
    add layer 16
FIX    ./keymaps/default/keymap.c

thank @zvecr!
@ambergon ambergon requested a review from zvecr November 15, 2024 04:42
@zvecr
Copy link
Member

zvecr commented Nov 15, 2024

Theres not much point requesting review, when you still have outstanding requested changes.

@ambergon
Copy link
Author

First, let me apologize for not understanding the “Commit suggestion and Add suggestion to batch” feature of github, and thus not being able to incorporate it properly.

ambergon and others added 2 commits November 15, 2024 15:36
Co-authored-by: Joel Challis <git@zvecr.com>
readme hakugin lab -> shirogane lab
keyboard.json delete resolution
@ambergon
Copy link
Author

I understand the role of the “Files change tab”.
Sorry for being rude.

@ambergon
Copy link
Author

The matrix_scan_user function, which you recommended to turn off,
I would like to keep it because it is the core function of the keyboard.

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.

2 participants