Need a keyboard with specific keys - objective-c

Okay, I've seen the webpage that shows you how to enter a decimal key on the number pad, but that's pretty complicated for one button, and the problem I have involves multiple buttons. See, I have a program that involves typing in functions like "x + 5". My problem right now is that the user has to go through three different keyboards just to enter that kind of function. I need to know if it's possible to set up a keyboard that will have specific keys in it. Is there a way to do this that's simpler than the decimal key method?

You'll have to create a custom keyboard if none of the apple keyboards toots your flute.
The easiest way to do this is to create a view and add lots of buttons with their own titles and background images and, most importantly, actions. You'll also need a delegate.
To be more official, there are numerous online tutorials (and lots of SO questions).

Related

VoiceOver left and right arrow keys are reserved for predefined behavior. How to override?

For VoiceOver, the left and right arrow keys seemed to be reserved for 2 things:
By default, the left and right arrow keys put focus on the letter of
whatever the focus is on.
EX:
If you turn on quick-nav (left and right arrow key), the left and
right arrow keys are used to go through the entire content of the
page, whether focusable or not.
So what is the consensus on whether specific keys should be overriden? In this example, the overriden feature does not work as expected because VoiceOver has a predefined behavior for the left and right arrow keys.
NOTE: This issue only occurs for VoiceOver + Safari. You can try it with this example of accessible tabs (which with VO and Safari is not accessible).https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html
So what is the consensus on whether specific keys should be overriden?
I am providing general advice as I do not know your use-case (you show tabs but there could be other components you are working on).
It is perfectly acceptable to over-ride keys with custom functionality that improves your website / web app (in fact it is encouraged) with a big caveat!
There needs to be an easy way to both switch shortcut keys on and off and give the user the option to change the key bindings to what they want via an options menu or similar.
Old advice used to be that there are 'safe' shortcut keys you could use, but a lot of users change their key bindings to meet there needs (it isn't just screen readers but all assistive devices you need to consider) and new screen readers are introduced that use different sets of keys, making this advice obsolete and a bad practice.
Also consider adding some guidance (if your design allows) on the shortcut keys you have implemented to make it easier for people to use certain elements of your site as you cannot assume someone will automatically know what keys to use where.

How to swap two wxWindows in two different notebooks?

Our app is build on wxWidgets and designed to work on two displays. Each display has one wxAuiNotebook which in turn have one wxGLCanvas that we're rendering to.
I'd like a hotkey to be able to switch the two wxGLCanvas windows, so the user experience is that the canvas that was on Monitor #2 is now rendering to #1 and vise versa. (There are a bunch of toolbars and widgets surrounding the canvases, but I don't want them to switch displays.)
wxGLCanvas is a subclass of wxWindow, so I'm guessing it can happen at the level. What functions calls should I be looking at to accomplish this?
Sorry about the vagueness of my question. It aligns with my level of understanding of wxWidgets.
You could indeed use Reparent(), but for two wxGLCanvases it would make much more sense to simply use pointers to them in your code and just flip them when you want to switch them because it's just their contents that matters and not the windows themselves.

NSTextField like control for entering key shortcuts - Objective-C/Cocoa

I've seen in some applications the control in these shots that is used to enter key shortcuts. I'd like to know if these are standard (available to everyone) or if these were built by the application's developer. I don't think it is the latter because I've seen this in many apps from different developers. Here are the images:
To give one example of an app try Bowtie, though I know there's more that use this.
If this control is standard, could you tell me how to use it (what class, etc)?
The first one appears to be Shortcut Recorder from Waffle Software.
Note that the use of a rounded text field for this, while somewhat established, the HIG reserves the rounded appearance for search fields.

How can I replicate a user created table?

This is a part of the iTunes smart playlist creation window; for my application I need to create something very similar to this:
The changes I'll be making would be the column that says artist would be integers (but still a pop up button), same with the second column. The third column would be text input like in the picture. I would like to keep the functionality of the "+" and "-" buttons but I don't have much use for the "..." button. Is there any easy way to recreate this? I need the user to be able to add as many or few fields as necessary.
Thanks in advance!
If you don't need to support 10.4, take a look at NSPredicateEditor. It should allow you to easily recreate iTunes' interface with the changes you describe. http://nvie.com/posts/nspredicateeditor-tutorial/ may be useful to help you get started.

Binding key combinations to your application

How can I bind a key combination to my vb.net application? I know it has SOMETHING to do with the registry, but I have no earthly idea what or how to go about doing this. I want the user to be able to hit those keys when the app is open and have it execute my function, but not while the app is closed.
Thanks for the help!
If you are using a dialog, then you can put '&' into the text for some controls (buttons, checkboxes, radio buttons, etc) and this will cause Alt plus the next character in the text to be used as an accelerator/shortcut. i.e. "&Open" would activate the Open button if you press Alt+O. "Op&en" would activate if for Alt+e.
Beyond that, as Jason Irwin said, you need to add an event handler to your Form for KeyDown or KeyPress events, and then check if the keypress is the key combination you are interested in. This will only work if the user activates your form (clicks in it to give it the input focus. If they put it behind another window, it will not react to the key presses)
If you don't want to show a form, or want to react to keypresses when you're not the input-focus application, then it gets a bit more complicated (you either need to use a hidden form or a keyboard hook)
edit
OK, it looks like you want a keyboard hook. This looks like a good article.
It depends on what you are trying to do:
If you have a gui application and you want to handle key events then you can do that in a keydown eventhandler
If you want to do more low-level stuff and have an application that will intercept all key strokes (regardless of whether or not the application has focus/is visible) then you need to use pinvoke to hit the win32 apis. I suggest you read the following:
link text
Please let us know what you are trying to do so we can provide better feedback.
Using Google, I found this Keyhook example.
I've worked with keyhooks before, in Delphi WIN32, so I am a bit familiar with them. (Just not in C#.) If you add one to a DLL, all Hell might break loose since most virus scanners will recognise this as malware behaviour. (Especially if you use them in the wrong way, causing them to be injected in each and every process that's running on your system.)
A keyhook will allow key combinations to be captured from other processes, though.
For a solution without programming requirements: Drop a shortcut for the application on your desktop. Edit it, assign a shortcut, close it. Press shortcut to test...