Skip to content

Commit

Permalink
keyboard_up.c fix ON key value
Browse files Browse the repository at this point in the history
make the ON key just like other keys
  • Loading branch information
Dreagonmon authored Feb 23, 2023
1 parent 7ff175d commit 2d5a444
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions OSLoader/HAL/keyboard_up.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,16 @@ void key_task_capt()
if(ck == KEY_ON && cp)
{
state = 1;
}else{
g_latest_key_status = kval;
}
g_latest_key_status = kval;
break;

case 1:
if((ck == KEY_ON) && !cp)
{
state = 0;
capt_ck = 0;
g_latest_key_status = (1 << 16) | KEY_ON;
g_latest_key_status = (0 << 16) | KEY_ON;
}else if(ck != KEY_ON && cp){
state = 2;
capt_ck = ck;
Expand Down

0 comments on commit 2d5a444

Please sign in to comment.