Application Keyboard Shortcuts - macos

For a fun winterbreak project, I'm trying to write a tool for mac that, depending on whichever application is currently in focus, will show all the appropriate Keyboard shortcuts. I'm still thinking about how it might work, as well as still looking around for info. But, I'm of course wondering whether or not there is even a streamlined format for defining keyboard shortcuts on mac. Does anyone have any light to shed here? I'm looking for plist's on my computer, but nothing is coming up, so I'm not sure that that is the proper solution.
Any ideas?
Thank you in advance, even for downvotes(:

Related

Configuring multiple keyboards for windows

This may seem on the surface to be a very basic question but its something I've never been able to do. And I'm wondering if someone can help as its really impacting my scripting!
I'm a Brit living in Japan, my computer keyboard is a Japanese model with all the icons in the Japanese place but my setup on windows is to think the keyboard is British- I'm just so used to everything been in its proper place and don't have to look at the keyboard to type.
For most purposes this is great.
However, I can't seem to be able to do a back slash. Where it should be in the bottom left is on a Japanese keyboard an extra big tab, back slash is instead over on the bottom right, near forward slash, a key which does nothing on my setup.
Does anyone know a way to configure windows 7 so that when I alt and shift to switch my typing language (something easy to do. Don't need help there) it also switches the type of keyboard it thinks I have. Or, even better, customise the layout of my keyboard.
Hope this doesn't get closed as many other config questions seem to have been as my being able to script depends upon this!

How to disable the Help key and context sensitive help mode in OSX, especially with Qt

I have a cross platform Qt application that's running into some trouble in OSX. There's a feature that OSX has that I didn't even know existed - the 'Help' key. My MBP doesn't have one, and neither does my Apple wired keyboard purchased a year ago. It seems that this is mostly something that older Macs have. Apparently it generates the same scan code as the Insert key on PC keyboards.
Anyways, when the Help key is pressed, the cursor over our application (or any application that receives the Help key event) turns into a little question mark. This seems to be part of what's called 'context-sensitive help mode', as documented in the NSHelpManager's setContextHelpModeActive: method and in the NSApplication's activateContextHelpMode: method docs. From the docs:
In this mode, the cursor becomes a question mark, and help appears for any user interface item the user clicks.
Most applications don’t use this method. Instead, applications enter
context-sensitive mode when the user presses the Help key.
Applications exit context-sensitive help mode upon the first event
after a help window is displayed.
How many Cocoa developers actually know about this? I'm assuming that clicking on something in the application with this question mark cursor should do something like bring up a help message, but I haven't found a single Cocoa application where it actually does anything at all - not even Apple's apps do anything. In fact, it even seems to put a lot of applications into a strange mode where the cursor text selection is enabled.
The problem is that when we change the application cursor programmatically in Qt when we're in this help-question-cursor-mode, bad things happen. Specifically, our application actually crashes. The crash happens deep inside Cocoa in the NSApplication's NSHelpManager. I'd like to find out why we're seeing this crash, but I'm actually more interested in how we can suppress this 'help' mode. There's nothing in Qt or Cocoa that I can see that would stop it, other than perhaps intercepting and squashing an event, which I haven't tried yet.
Does anyone know any more about this?

How to make Flash On Screen Keyboard work with windows?

I know flash I am making a (SWF)Flash Virtual On Screen Keyboard, I want to use it the same way windows on-screen keyboard is used. But I dont know how to go out of the scope of the flash environment and interact with system elements like windows screen keyboard (osk.exe) does. If anyone knows how i can make that possible do help out.
I am pretty sure there is a file extension that allows you to override system EXE's, I think it may be called mod, so save your file as OSK.exe and rename it to OSK.mod and copy it to the same folder as the system version and it should override it, this may be wrong because I have not done windows programming for quite a while.
You could always modify the registry like: http://geekswithblogs.net/ssimakov/archive/2005/03/22/26930.aspx

Possible to override Dock settings with app?

I'm a total rookie when it comes to Objective-C so please bear with me...
Been thinking of learning the basics and trying out creating some software of my own. One thing that's bothering me (and never seem to show up as an alternative in any updates) is the ability to require a double-click in order to start an app in the Dock. I always seem to manage to click at the wrong place when switching between apps...
Yes, I am very well aware of Cmd+Tab thank you :) I really want this feature and it shouldn't be too hard to set up as long as overriding the default functionality of the Dock is possible. Thoughts/suggestions? Perhaps just a Terminal command is enough...

OS X - App doesn't show up in force quit. How do I fix that?

I'm writing a Cocoa application that installs itself as an menulet in the menu bar (i.e. like the volume or battery icons). When the program crashes, it isn't possible to use the Force-Quit dialog, because it doesn't show up in the list. Of course, I can still kill it using the command-line, but my users don't know how to do that. Is there any way to fix this, say by making the program show up in the Force-Quit dialog?
(Note: the app is Leopard only).
To be honest, the proper solution is to make sure your app never hangs or crashes for users. This should be your #1 priority, rather than figuring out how to let users deal with crashes and hangs. Obviously it isn't always possible to make sure your app never breaks in these ways, but it should definitely be the exception rather than the rule.
On another note, MenuExtras is a private API which I hope you aren't using to create your "menulet". Rather, the public class NSStatusItem (part of Cocoa) is the Apple-approved, recommended way to install icons into your menu bar.
Not really an answer, but hopefully helpful still ...
I think that most people who know how to force quit also know they can kill a process in the activity monitor. Just make sure it's not named '93AZkZ' or something.
You could provide a PreferencePane for your application that can send the proper signal to it, if you want to allow users an easy way to shut it down or restart it. This is the pattern that MySQL uses on OS X.

Resources