File tree 2 files changed +19
-2
lines changed
src/components/configure/keycap
2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ export type KeycapStateType = ReturnType<typeof mapStateToProps>;
21
21
22
22
const mapDispatchToProps = ( _dispatch : any ) => {
23
23
return {
24
- updateKeydiff : (
24
+ onClickEncoderToggle : (
25
+ pos : string ,
26
+ encoderId : number | null ,
27
+ keySwitchOperation : IKeySwitchOperation ,
25
28
isSelectedKey : boolean ,
26
29
orgKey : Key ,
27
30
dstKey : Key | null
@@ -34,6 +37,13 @@ const mapDispatchToProps = (_dispatch: any) => {
34
37
// clear diff display
35
38
_dispatch ( KeydiffActions . clearKeydiff ( ) ) ;
36
39
}
40
+ _dispatch (
41
+ KeymapActions . updateSelectedKeyPosition (
42
+ pos ,
43
+ encoderId ,
44
+ keySwitchOperation
45
+ )
46
+ ) ;
37
47
}
38
48
} ,
39
49
onClickKeycap : (
Original file line number Diff line number Diff line change @@ -126,7 +126,14 @@ export default class Keycap extends React.Component<
126
126
? genKey ( remap , this . props . labelLang ! )
127
127
: null ;
128
128
129
- this . props . updateKeydiff ! ( this . props . focus ! , orgKey , dstKey ) ;
129
+ this . props . onClickEncoderToggle ! (
130
+ this . props . model . pos ,
131
+ this . props . model . encoderId ,
132
+ nextKeySwitchOperation ,
133
+ this . props . focus ! ,
134
+ orgKey ,
135
+ dstKey
136
+ ) ;
130
137
}
131
138
132
139
private getTargetKeymap (
You can’t perform that action at this time.
0 commit comments