FLEXTool/FLEX

Keyboard shortcuts don't work when using UIKit for Mac (Project Catalyst)

Open

#297 建立於 2019年7月28日

在 GitHub 查看
 (5 留言) (0 反應) (0 負責人)Objective-C (1,777 fork)batch import
help wanted

倉庫指標

Star
 (14,597 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I successfully added the f shortcut in my app by adding:

- (NSArray<UIKeyCommand *> *)keyCommands {

	UIKeyCommand *flexToggleCommand = [UIKeyCommand keyCommandWithInput:@"f" modifierFlags:kNilOptions action:@selector(onFLEXToggleCommandTrigger)];

	return @[flexToggleCommand];
}

- (void)onFLEXToggleCommandTrigger {

	[[FLEXManager sharedManager] toggleExplorer];
}

in AppDelegate.m, but I don't know how to add all of them directly in FLEX, hence I created an issue instead of a PR.

貢獻者指南