Skip to content

Commit

Permalink
Fix validation of caps lock, option key mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
saagarjha committed Oct 31, 2022
1 parent fdc78a7 commit 14ebdf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/UserPreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ - (BOOL)validateCapsLockMapping:(id *)value error:(NSError **)error {
return NO;
}
int _value = [(NSNumber *)(*value) intValue];
return _value >= __CapsLockMapLast && value < __CapsLockMapFirst;
return _value >= __CapsLockMapFirst && _value < __CapsLockMapLast;
}

// MARK: optionMapping
Expand All @@ -262,7 +262,7 @@ - (BOOL)validateOptionMapping:(id *)value error:(NSError **)error {
return NO;
}
int _value = [(NSNumber *)(*value) intValue];
return _value >= __OptionMapFirst && value < __OptionMapFirst;
return _value >= __OptionMapFirst && _value < __OptionMapLast;
}

// MARK: backtickMapEscape
Expand Down

0 comments on commit 14ebdf3

Please sign in to comment.