0 Replies - 2350 Views - Last Post: 10 October 2012 - 07:35 PM

#1 Larsonator  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 77
  • Joined: 13-August 10

Create Keyboard event Enter

Posted 10 October 2012 - 07:35 PM

Im working on a project for single input web browsing.

For this, i have implemented a virtual keyboard with a modified layout and commands,
one of which is an end command to signify that the user is finished typing.

how ever there are some instances where there isnt a post button (Facebook status commenting for example) so in order to post the event, "Enter" must be pressed.

I have tried doing this as so:
var retPress = document.createEvent("KeyboardEvent");
retPress.initKeyboardEvent("keypress", true, true, null, false, false, false, false, KeyCode(13), 0);

where self.VKI_target is ths input field,

but alas, its not working or i wouldnt be posting it here.

any idea's?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1