Skip to content

Commit

Permalink
OpenCanopy: Added partial hotkey support (e.g. Ctrl+Enter)
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed May 10, 2020
1 parent c04980f commit bd0cc2f
Show file tree
Hide file tree
Showing 13 changed files with 351 additions and 257 deletions.
3 changes: 2 additions & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ OpenCore Changelog

#### v0.5.9
- Added full HiDPI support in OpenCanopy
- Improved font rendering by using CoreText
- Improved OpenCanopy font rendering by using CoreText
- Fixed light and custom background font rendering
- Added `Boot####` options support in boot entry listing
- Removed `HideSelf` by pattern recognising `BOOTx64.efi`
Expand All @@ -18,6 +18,7 @@ OpenCore Changelog
- Fixed `ReconnectOnResChange` reconnecting even without res change
- Fixed OpenCanopy showing internal icons for external drives
- Fixed OpenCanopy launching Shell with text over it
- Added partial hotkey support to OpenCanopy (e.g. Ctrl+Enter)

#### v0.5.8
- Fixed invalid CPU object reference in SSDT-PLUG
Expand Down
21 changes: 19 additions & 2 deletions Include/Library/OcBootManagementLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -916,15 +916,33 @@ OcLoadPickerHotKeys (
#define OC_INPUT_BOTTOM -10 ///< Move to bottom
#define OC_INPUT_MORE -11 ///< Show more entries (press space)
#define OC_INPUT_VOICE_OVER -12 ///< Toggle VoiceOver (press CMD+F5)
#define OC_INPUT_INTERNAL -13 ///< Accepted internal hotkey (e.g. Apple)
#define OC_INPUT_FUNCTIONAL(x) (-20 - (x)) ///< Functional hotkeys

/**
Obtains key index from user input.
@param[in,out] Context Picker context.
@param[in] KeyMap Apple Key Map Aggregator protocol.
@param[out] SetDefault Set boot option as default, optional.
@returns key index [0, OC_INPUT_MAX) or OC_INPUT_* value.
@returns OC_INPUT_TIMEOUT when no key is pressed.
@returns OC_INPUT_INVALID when unknown key is pressed.
**/
INTN
OcGetAppleKeyIndex (
IN OUT OC_PICKER_CONTEXT *Context,
IN APPLE_KEY_MAP_AGGREGATOR_PROTOCOL *KeyMap,
OUT BOOLEAN *SetDefault OPTIONAL
);

/**
Waits for key index from user input.
@param[in,out] Context Picker context.
@param[in] KeyMap Apple Key Map Aggregator protocol.
@param[in] Timeout Timeout to wait for in milliseconds.
@param[in] PollHotkeys Poll key combinations.
@param[out] SetDefault Set boot option as default, optional.
@returns key index [0, OC_INPUT_MAX) or OC_INPUT_* value.
Expand All @@ -934,7 +952,6 @@ OcWaitForAppleKeyIndex (
IN OUT OC_PICKER_CONTEXT *Context,
IN APPLE_KEY_MAP_AGGREGATOR_PROTOCOL *KeyMap,
IN UINTN Timeout,
IN BOOLEAN PollHotkeys,
OUT BOOLEAN *SetDefault OPTIONAL
);

Expand Down
Loading

0 comments on commit bd0cc2f

Please sign in to comment.