Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
revolter opened this issue Jul 28, 2019 · 5 comments · May be fixed by #305
Open

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

revolter opened this issue Jul 28, 2019 · 5 comments · May be fixed by #305

Comments

@revolter
Copy link
Contributor

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.

@NSExceptional
Copy link
Collaborator

Keyboard shortcuts are intended to work for the simulator alone, for whatever reason. They don't work on iOS with a bluetooth keyboard or anything

@revolter
Copy link
Contributor Author

revolter commented Aug 3, 2019

But don't you agree that they should also work when debugging a macOS app?

@NSExceptional
Copy link
Collaborator

I guess so, yeah 🤔 Thanks for bringing this to our attention! Gonna label this Help Wanted until I can get to it

@revolter
Copy link
Contributor Author

revolter commented Aug 5, 2019

I'll try it myself too as I really need it

@revolter
Copy link
Contributor Author

I think they would also work on an iPad, but I don't have a keyboard for mine to test with, nor do I know what macro I need to use to target iPads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants