EzDevInfo.com

keyboard interview questions

Top keyboard frequently asked interview questions

Close/hide the Android Soft Keyboard

I have an EditText and a Button in my layout. After writing in the edit field and clicking on the Button, I want to hide the virtual keyboard. I assume that there's a simple, one or two-liner to make this happen. Where can I find an example of it?


Source: (StackOverflow)

Android: How do I prevent the soft keyboard from pushing my view up?

I have a vertical sliding drawer at the bottom of my app. When the soft keyboard opens, it pushes the tab for the drawer up, so it sits atop the keyboard. I actually want it to remain at the bottom of the screen, becoming hidden when the keyboard is shown.

Anyone else run into this issue? Know how to fix it?


Source: (StackOverflow)

Advertisements

How do I show the number keyboard on an EditText in android?

I just basically want to switch to the number pad mode as soon a certain EditText has the focus.


Source: (StackOverflow)

Automatic popping up keyboard on start Activity

I got a relative simple question. I have an activity with a lot of EditText's in them. When I open the activity it automatically focusses to the first EditText and displays the virtual keyboard.

How can I prevent this?


Source: (StackOverflow)

How to show soft-keyboard when edittext is focused

I want to automatically show the soft-keyboard when an EditText is focused (if the device does not have a physical keyboard) and I have two problems:

  1. When my Activity is displayed, my EditText is focused but the keyboard is not displayed, I need to click again on it to show the keyboard (it should be displayed when my Activity is displayed).

  2. And when I click done on the keyboard, the keyboard is dissmissed but the EditText stays focused and y don't want (because my edit is done).

To resume, my problem is to have something more like on the iPhone: which keep the keyboard sync with my EditText state (focused / not focused) and of course does not present a soft-keyboard if there is a physical one.


Source: (StackOverflow)

Run javascript function when user finishes typing instead of on key up?

I want to trigger an ajax request when the user has finished typing in a text box. I don't want it to run the function on every time the user types a letter because that would result in A LOT of ajax requests, however I don't want them to have to hit the enter button either.

Is there a way so I can detect when the user has finished typing and then do the ajax request?

Using jQuery here! Dave


Source: (StackOverflow)

Making a UITableView scroll when text field is selected

After a lot of trial and error, I'm giving up and asking the question. I've seen a lot of people with similar problems but can't get all the answers to work right.

I have a UITableView which is composed of custom cells. The cells are made of 5 text fields next to each other (sort of like a grid).

When I try to scroll and edit the cells at the bottom of the UITableView, I can't manage to get my cells properly positioned above the keyboard.

I have seen many answers talking about changing view sizes,etc... but none of them has worked nicely so far.

Could anybody clarify the "right" way to do this with a concrete code example?


Source: (StackOverflow)

How do you tell if caps lock is on using JavaScript?

How do you tell if caps lock is on using JavaScript?

One caveat though: I did google it and the best solution I could find was to attach an onkeypress event to every input, then check each time if the letter pressed was uppercase, and if it was, then check if shift was also held down. If it wasn't, therefore caps lock must be on. This feels really dirty and just... wasteful - surely there's a better way than this?


Source: (StackOverflow)

iPhone Keyboard Covers UITextField

I have an app where, in Interface Builder, I set up a UIView that has a text field near the bottom of the view. When I run the app and try to enter text into that field, the keyboard slides up overtop of the field so I can't see what I'm typing until I hide the keyboard again.

Has anyone else run into this problem and found a good way to solve it without either making the parent view scrollable or moving the text field farther up the screen?


Source: (StackOverflow)

Binding arrow keys in JS/jQuery

How do I go about binding a function to left and right arrow keys in Javascript and/or jQuery? I looked at the js-hotkey plugin for jQuery (wraps the built-in bind function to add an argument to recognize specific keys), but it doesn't seem to support arrow keys.


Source: (StackOverflow)

How do I dismiss the iOS keyboard?

I have a UITextfield that i'd like to dismiss the keyboard for. I can't seem to make the keyboard go away no matter what code i use.


Source: (StackOverflow)

Super slow lag/delay on initial keyboard animation of UITextField

Alright, this problem has been driving me nuts.

It takes roughly 3-4 seconds for the keyboard to pop up after I touch my UITextField. This only occurs on the first time the keyboard pops up since the app launched, afterwards the animation starts instantly.

At first I thought it was problem of loading too many images, or my UITableView, but I just created a brand new project with only a UITextField, and I still experience this problem. I'm using ios5, xcode ver 4.2, and running on an iphone 4s.

This is my code:

#import "ViewController.h"

@implementation ViewController

- (void)viewDidLoad {
  [super viewDidLoad];

  UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(20, 20, 280, 30)];
  textField.borderStyle = UITextBorderStyleRoundedRect;
  textField.delegate = self;
  [self.view addSubview:textField];
}

@end

Is this a common problem for all apps?

Right now, the only way I can make it somewhat better is by having the textField become/resign first responder in viewDidAppear, but that doesn't solve the problem entirely - it just loads the delay onto when the view loads instead. If I click on the textField immediately when the view loads I still get the problem; if I wait 3-4 seconds after the view loads before touching the textField, I don't get the delay.


Source: (StackOverflow)

How to develop a soft keyboard for Android? [closed]

I would like to play around with some ideas and develop a soft keyboard for Android to replace the default one.

  • Is there any general information about soft keyboard development for Android out there? Any best practices or guidelines?

  • Can I do with my keyboard application pretty much anything I could do with a normal Android application?

  • Can I do HTTP connections to synchronize keyboard data with a cloud DB and other phones I have?

  • Can I open other windows/screens from a key press, e.g. to display a custom input interface different to a normal QWERTY one. If that doesn't work, can I use a pop-up dialog instead?


Source: (StackOverflow)

How to detect the currently pressed key?

In Windows Forms, you can know, at any time, the current position of the cursor thanks to the Cursors class.

The same thing doesn't seem to be available for the keyboard. Is it possible to know if, for example, the Shift key is pressed?

Is it absolutely necessary to track down every keyboard notification (KeyDown and KeyUp events)?


Source: (StackOverflow)

really weird eclipse keyboard behavior/bug?

I am using Helios on Mac Snow Leopard. I don't know why but all of a sudden my arrow keys and delete button start not working only on Eclipse(so Eclipse ignores them) but the rest of the buttons works just fine. There is no exception/error thrown anywhere on the screen. I don't exactly know how to reproduce this malfunctioning.

All I can say, I am having exactly the same problem with this guy down here. Bad thing about it, the post sent in year 2002:s

Is there any one of you having the same issue? Any suggestions?

Edit:

Please mark "me too" on this bug report hoping that it will be fixed soon.


Source: (StackOverflow)