I am trying to find out what keyboard functionalities Mathematica has. Would appreciate anyone to give some help. Specifically, I want to:
1) How to implement something like "press any key to continue..." behavior
2) How to accept user input?
Many thanks.
First, you'll want to look at Input and ChoiceDialog for something simple.
If you want to build your own interface, you can use the dynamic interactivity components with CreateDialog to construct a custom notebook dialog window to accept and return whatever kind of input you'd like.
You might find the Introduction to Control Objects and Generalized Input tutorials useful as well.
Related
I want the user to enter text in a text box (such as a login text box on some site).
I tried to search in text() bibliography and other similar functions.
This guy seems to have figured it out: http://www.sojamo.de/libraries/controlP5/. Look for the textArea control.
If you don't like this, I read that the g4p library had something like an inputbox. Otherwise you will have to draw it yourself (which would be a nice exercise) using keyboard inputs and the like.
What you're describing is called a graphical user interface, or GUI. There are many ways to approach this problem:
Code it yourself. Use something like the rect() function to draw a text box, and the keyPressed() function to detect key presses.
Use a library. The Processing libraries page lists several GUI libraries. Try each of them out and see which one you like best.
Use a more general GUI library. If you're deploying as Java, then you might use Swing or JavaFX. If you're deploying as JavaScript, then you might use HTML elements.
Any of the above might work, and which approach you choose depends more on you, your context, and your preferences. We can't tell you which is best, because it's all up to what you prefer.
I am trying to build an applescript dialog that helps me keep track of the things I am working on. To make it really effective I'd like to have it look up items from my todo list and suggest them as I type a la google suggest or other javascript autocomplete functionality.
I was thinking it would be fairly simple if I just captured the input of the # key, which I wanted to use to denote project or the # key for tasks and at that point started matching the input to my list of tasks or projects. For example, lets say I type:
"Worked on feature for #"
At this point the input of the # would start capturing keyboard input and try to suggest one of the projects on my todo list. This is where I am stuck. It seems like I should be able to attach a listener or something to my input box but I can't seem to find any examples or reference to such functionality.
You can't do this with applescript. You need to build your own window in a cocoa application and then hook into the NSTextField's methods to do this. It's not too difficult but it requires a whole different set of skills than applescript.
I have the following issue, concerning the way to fine control Japanese input in an iOS app. To make things clear I include an image to this post (see below).
As one can see I have typed や in the input text field and a bunch of choices (や 役 矢 訳 ヤ 屋 焼き …) appear above the keyboard for possible conversions.
Here is what I would like to know:
The choices presented in the picture make no sense for my particular app. I would like to be able to set myself the possible conversions offered to the user.
In this case it would be (山形県 山口県 山梨県). Does anyone know how I can achieve this?
In other words I am trying to find out how handle the set of data appearing above the keyboard.
Thanks in advance for any relevant information.
I want to create a new keymapping on macosx, so I can create advanced multi-key commands.
Basically, I want to create a a keymapping for transforming a normal keyboard into a chorded keyboard, optimized for writing code in c-like languages.
What I am wondering, is it possible to create that general keymaps, or is it possible to create a layer in the OS, intercepting the keyboard input at a low level and implementing the transform there.
If not, does anybody know where I can find sourcecode for a driver for a general HID-keyboard, that I can use as a base for a keyboard driver doing this?
I think this is where you want to start:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/HandlingKeyEvents.html
I'm interested in trying out the same thing actually, I really dislike most of the chorded keyboards I see and would prefer to prototype w/o building the h/w.
Heloo there? Is there any way to change the color [back and forecolor] of a Messagebox? Iam using VB6.0... Thanks in advance!
To the best of my knowledge, there is no way to do this. There is, however, a typical workaround.
The most common method for creating custom "message boxes" in VB6 is to create a new form in your project that acts specifically as a message box. You Show it when you need it, and then Hide or Unload it when the user clicks "OK" or "Cancel" or whatever. You can size the form the same as (or differently from) a MsgBox, create the buttons you want, make the colors as you choose, etc. Whenever you would have a message box pop up to tell the user something, you will instead call this form and change the text/color/other variables to whatever you need them to be.
This may seem annoying at first, but once you've done it once, it's very easy to see how useful a tool this new form template can become. It's code you might find yourself frequently reusing between various applications.
If you need any help with forms or form events, this is a pretty good basic tutorial which should tell you most of what you need to make this work:
http://www.vb6.us/tutorials/understanding-forms-vb6-tutorial
Good luck!