FLEXKeyboardShortcutManager.h 1.2 KB

123456789101112131415161718192021222324252627282930
  1. //
  2. // FLEXKeyboardShortcutManager.h
  3. // FLEX
  4. //
  5. // Created by Ryan Olson on 9/19/15.
  6. // Copyright © 2020 FLEX Team. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface FLEXKeyboardShortcutManager : NSObject
  10. @property (nonatomic, readonly, class) FLEXKeyboardShortcutManager *sharedManager;
  11. /// @param key A single character string matching a key on the keyboard
  12. /// @param modifiers Modifier keys such as shift, command, or alt/option
  13. /// @param action The block to run on the main thread when the key & modifier combination is recognized.
  14. /// @param description Shown the the keyboard shortcut help menu, which is accessed via the '?' key.
  15. /// @param allowOverride Allow registering even if there's an existing action associated with that key/modifier.
  16. - (void)registerSimulatorShortcutWithKey:(NSString *)key
  17. modifiers:(UIKeyModifierFlags)modifiers
  18. action:(dispatch_block_t)action
  19. description:(NSString *)description
  20. allowOverride:(BOOL)allowOverride;
  21. @property (nonatomic, getter=isEnabled) BOOL enabled;
  22. @property (nonatomic, readonly) NSString *keyboardShortcutsDescription;
  23. @end