macOS: Only check the "standard" type of the system shortcuts

This commit is contained in:
pagedown 2022-01-14 10:07:38 +08:00
parent e0700d45de
commit ab5b9fb329
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -561,6 +561,8 @@ build_global_shortcuts_lookup(void) {
id v = [sc_value objectForKey:@"value"];
if (!v || ![v isKindOfClass:[NSDictionary class]]) continue;
NSDictionary *value = v;
id t = [value objectForKey:@"type"];
if (!t || ![t isKindOfClass:[NSString class]] || ![t isEqualToString:@"standard"]) continue;
id p = [value objectForKey:@"parameters"];
if (!p || ![p isKindOfClass:[NSArray class]] || [(NSArray*)p count] < 2) continue;
NSArray<NSNumber*> *parameters = p;