Tag: keyboard

Programmatically Disable Mouse & keyboard

I would like to programmatically disable mouse & keyboard input temporarily on a mac (using Objective C/C/Unix) & then reenable them.

Keyboard doesn't dismiss even when a UIResponder object resigns it's first-responder status

I managed to customize the UIAlertView putting two UITextFields as subviews inside of it but in doing so somehow the keyboard broke. When I try to dismiss it resigning the first responder it doesn’t do anything just stays there. Here’s my code, well, only relevant parts (this is what I put in a UIAlertView subclass): […]

How to get keyboard state in Objective-C without referring to NSEvent

Is it possible to get the keyboard state in Objective-C without referring to NSEvent? In general I can’t use NSResponder methods like -[NSResponder flagsChanged:] but I need to know if the Command key is currently pressed.

keyDown not being called

I have a custom NSView called SurfaceView. It is the contentView of a NSWindow and it handles basic events like mouse click and drawing. But don’t matters what I do, it does not handle the keyDown function. I’ve already override the acceptsFirstResponder but nothing happens. If it matters, I run the application using a custom […]

how to remove prev next button from virtual keyboard IOS

i have use a UIWebview in IOS 5. I try to set contenteditable=”true” to make uiwebview editable. The screenshoot of my app is similar to an image in this link How do you remove the Next and Prev buttons from virtual keyboard in Sencha Touch / Phonegap application, my problem is i want to remove […]

iPhone keyboard, Done button and resignFirstResponder

This is probably a dumb question, but I can’t find the answer in the docs. Did the “Done” button on the pop-up keyboard always cause the keyboard to disappear? I see a lot of code around the web like this: – (BOOL)textFieldShouldReturn:(UITextField *)theTextField { [theTextField resignFirstResponder]; return YES; } When I press the “Done” button, […]

iOS 7 – Keyboard animation

I’m trying to understand the new keyboard animation in iOS 7.0 on the iPhone 5 Simulator. I want to resize my UITableView when the keyboard appears, but I can’t get the right animation details. I’m using the information from the NSNotification object, when the keyboard appears or disappears. Here is my log: Move keyboard from […]

How to dismiss keyboard for UITextView with return key?

In IB’s library, the introduction tells us that when the return key is pressed, the keyboard for UITextView will disappear. But actually the return key can only act as ‘\n’. I can add a button and use [txtView resignFirstResponder] to hide the keyboard. But is there a way to add the action for the return […]

Customkeyboard Implemention with UISearchBar?

I try to implement customkeyboard with UISearchBar .first of all my mainclass.h where i use UISearchBar is look like this #import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> @class PashtoKeyboard; @class SearchBar; @interface MainViewController : UIViewController<UISearchBarDelegate > { IBOutlet SearchBar *searchBar; PashtoKeyboard *pashtoKeyboard; } @property(nonatomic,retain) PashtoKeyboard *pashtoKeyboard; @property (nonatomic,retain) SearchBar *searchBar; @end Now my mainclass.m #import “MainViewController.h” #import “PashtoKeyboard.h” […]

Cursor is blinking in UITextField but keyboard doesn't appear

I got a simple detail view with a textfield. In detail’s viewController I wrote this code: – (void) viewDidAppear:(BOOL)animated{ [self.textField becomeFirstResponder]; NSLog(@”is textField 1st responder %d”, [self.textField isFirstResponder]); } When I push the detail into a navigation controller, I see “is textField 1st responder 0” in my log. The keyboard doesn’t appear. But the textfield […]