Large

Virtual Keyboard Interface

By GreyWyvern Last update Nov 8, 2011 — Installed 49,595 times.

open keyboard when feild selected.

in
Subscribe to open keyboard when feild selected. 8 posts, 4 voices



FESTER2001 User
FirefoxWindows

Does anyone know how i could modify this script so that as soon as soon as you click a field in a form it opens up the keyboard (without double clicking)?

Thanks.

 
GreyWyvern Script's Author
OperaWindows

If you mean the userScript version, just change the "dblclick" event handler to "focus" or "click".

elem.addEventListener('dblclick', function() { self.VKI_show(this); }, false);

to this:

elem.addEventListener('focus', function() { self.VKI_show(this); }, false);

Or use "click" instead of focus if you want it to appear for mouse click focus only.

 
FESTER2001 User
FirefoxWindows

That's exactly what i wanted, thanks Heaps!!!

 
Salman Khimani User
FirefoxWindows

When i use static version, it works fine with clicking on keyboard icon to show up keyboard. In IE, FF and CHROME.

But when i use user version if found following problems with following changes:

Without editing js:
Works in FF and Chrome but doesn't show keyboard on double click in IE.

When Edited to show on 'focus'(as mentioned above):
Shows keyboard both in FF and Chrome but when i press any key on that, it disappears without writing any key in input field.
in IE, doesn't show keyboard.
m using IE 8.

 
GreyWyvern Script's Author
OperaWindows

The userscript version is not designed to work in IE. Only the static version is IE-compatible.

 
jjohnson__vng User
FirefoxMacintosh

When I use this I get an error when I start typing on the VKI

elem.VKI_Target.focus() is not a function line 1069;

if I set listener to click or dblclick it works fine. Just when I set it to focus i get this error

Jeff

 
GreyWyvern Script's Author
OperaWindows

Yesh, for Firefox, it seems as though clicking a button causes the focus() method to be called again, which erases the contents of the VKI_target variable. You can fix this by preventing the VKI_show() method from running if the target hasn't changed.

So instead of this:

elem.addEventListener('focus', function() { self.VKI_show(this); }, false);

Use this:

elem.addEventListener('focus', function() {
  if (this != self.VKI_target) self.VKI_show(this);
}, false);

 
jjohnson__vng User
FirefoxMacintosh

WOOT Worked
Thanks

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel