File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ keypos_t unimap_translate(keypos_t key)
25
25
unimap_trans [key .row ][key .col ];
26
26
#endif
27
27
return (keypos_t ) {
28
- .row = ((unimap_pos & 0x70 ) >> 4 ),
29
- .col = (unimap_pos & 0x0F )
28
+ .row = ((unimap_pos & 0xf0 ) >> 4 ),
29
+ .col = (unimap_pos & 0x0f )
30
30
};
31
31
}
32
32
@@ -35,11 +35,13 @@ __attribute__ ((weak))
35
35
action_t action_for_key (uint8_t layer , keypos_t key )
36
36
{
37
37
keypos_t uni = unimap_translate (key );
38
- if ((uni .row << 4 | uni .col ) == UNIMAP_NO ) return (action_t )ACTION_NO ;
38
+ if ((uni .row << 4 | uni .col ) == UNIMAP_NO ) {
39
+ return (action_t )ACTION_NO ;
40
+ }
39
41
#if defined(__AVR__ )
40
- return (action_t )pgm_read_word (& actionmaps [(layer )][(uni .row )][(uni .col )]);
42
+ return (action_t )pgm_read_word (& actionmaps [(layer )][(uni .row & 0x7 )][(uni .col )]);
41
43
#else
42
- return actionmaps [(layer )][(uni .row )][(uni .col )];
44
+ return actionmaps [(layer )][(uni .row & 0x7 )][(uni .col )];
43
45
#endif
44
46
}
45
47
You can’t perform that action at this time.
0 commit comments