Skip to content

Commit

Permalink
Fix mac
Browse files Browse the repository at this point in the history
  • Loading branch information
CardealRusso committed Oct 18, 2024
1 parent 48b2823 commit 08c0cfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/fenster/fenster_mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ FENSTER_API int fenster_loop(struct fenster *f) {
NSUInteger k = msg(NSUInteger, ev, "keyCode");
f->keys[k < 127 ? FENSTER_KEYCODES[k] : 0] = evtype == 10;
NSUInteger mod = msg(NSUInteger, ev, "modifierFlags") >> 17;
f->mod[0] = (mod & 1) ? 1 : 0; // Shift
f->mod[1] = (mod & 2) ? 1 : 0; // Control
f->mod[2] = (mod & 4) ? 1 : 0; // Alt/Option
f->mod[3] = (mod & 8) ? 1 : 0; // Command
f->modkeys[0] = (mod & 1) ? 1 : 0; // Shift
f->modkeys[1] = (mod & 2) ? 1 : 0; // Control
f->modkeys[2] = (mod & 4) ? 1 : 0; // Alt/Option
f->modkeys[3] = (mod & 8) ? 1 : 0; // Command
return 0;
}
}
Expand Down

0 comments on commit 08c0cfc

Please sign in to comment.