Difference between revisions of "On Screen Keyboard"

From WebOS Internals
Jump to navigation Jump to search
(Moved warning to the top, sectioned the article for easier reading)
(7)
Line 3: Line 3:
  
 
=Introduction=
 
=Introduction=
The Palm Pre already COMES with an on-screen keyboard. It works in portrait and landscape, in all apps, in all fields.  
+
The Palm Pre already COMES with an on-screen keyboard. It works in portrait and landscape, in all apps, in all fields. This on screen keyboard provides a path to produce a fully functional on screen keyboard for the Pre.  
  
 
=Explanation=
 
=Explanation=
Press the "sym" key and a scrollable 5x5 keyboard pops up full of alternate characters.  
+
On an unmodified Pre if you press the "sym" key and a scrollable 5x5 keyboard pops up full of alternate characters.  
  
 
This is controlled by code incorporated into the framework.js.  The specific functions there can be seeen in '''/usr/palm/frameworks/mojo/submissions/191.15/javascripts/widget_charselector.js'''
 
This is controlled by code incorporated into the framework.js.  The specific functions there can be seeen in '''/usr/palm/frameworks/mojo/submissions/191.15/javascripts/widget_charselector.js'''
Line 14: Line 14:
 
the actual list of characters that appear on the screen is controlled by '''/usr/palm/frameworks/mojo/submissions/191.15/resources/en_us/alternatechars_table.json'''
 
the actual list of characters that appear on the screen is controlled by '''/usr/palm/frameworks/mojo/submissions/191.15/resources/en_us/alternatechars_table.json'''
  
At the simplest level then, creating an on-screen keyboard requires editing the alternate characters table json, to add the "regular" charcters to it, and then when you want a keyboard, press SYM and poof, a keyboard.  
+
At the simplest level then, creating an on-screen keyboard requires editing the alternate characters table json, to add the "regular" charcters to it, and then when you want a keyboard, press SYM and poof, a keyboard. The problem with that is, the alternatechars_table.json is "fragile"  the slightests mis-edit results in the pre entering a continuous book cycle.  
  
 
At the next level, the framework's copy of widget_charselector.js needs to be modified to not close the keyboard after each keypress.   
 
At the next level, the framework's copy of widget_charselector.js needs to be modified to not close the keyboard after each keypress.   
  
As of 12 August 2009 Webos-internals contributor egaudet announced success at patching the framework.js to accept a new function derived from the charselector widget.  This pre-alpha proof of concept on-screen keyboard is available as a patch.  
+
As of 12 August 2009 Webos-internals contributor Eric Gaudet (irc egaudet) announced success at patching the framework.js to accept a new function derived from the charselector widget.  This pre-alpha proof of concept on-screen keyboard is available as a patch.  
  
 
=Procedure=
 
=Procedure=
Line 28: Line 28:
  
 
=Issues=
 
=Issues=
as of 12 August 2009 the following issues are known:  
+
as of 13 August 2009 the following issues are known:  
  
 
* Add method to get at numbers and symbols (possibilities: sym,flick)
 
* Add method to get at numbers and symbols (possibilities: sym,flick)
 
* Modify keyboard dimensions in landscape mode to span accross width
 
* Modify keyboard dimensions in landscape mode to span accross width
 
* Do not bring up keyboard when using hard keyboard clipboard events (might have to disable the keyboard when slider is open exposing hard keyboard)
 
* Do not bring up keyboard when using hard keyboard clipboard events (might have to disable the keyboard when slider is open exposing hard keyboard)
* Enable usage to search contacts/universal search
+
* Enable usage to search contacts/universal search -- for example Name, email address, etc are ''search'' fields not text fields.
* Fix far right column
+
* Fix far right column -- '''DONE 13 Aug'''
 
* Verify auto-correct when space added.
 
* Verify auto-correct when space added.
 
* Possibly (and optionally) play sound or haptic feedback on touch
 
* Possibly (and optionally) play sound or haptic feedback on touch
Line 40: Line 40:
 
* Explore T9-type, limited-width keyboard options
 
* Explore T9-type, limited-width keyboard options
 
* Do not bring up keyboard on swipe gestures, only tap if possible
 
* Do not bring up keyboard on swipe gestures, only tap if possible
 +
* Space, enter, backspace need to work  == '''DONE 13 Aug'''

Revision as of 05:01, 14 August 2009

On Screen Keyboard.png

Warning. This is PRE ALPHA testing grade only software. It may cause your pre to melt into a puddle and dissolve while turning blue. Use at your own risk!

Introduction

The Palm Pre already COMES with an on-screen keyboard. It works in portrait and landscape, in all apps, in all fields. This on screen keyboard provides a path to produce a fully functional on screen keyboard for the Pre.

Explanation

On an unmodified Pre if you press the "sym" key and a scrollable 5x5 keyboard pops up full of alternate characters.

This is controlled by code incorporated into the framework.js. The specific functions there can be seeen in /usr/palm/frameworks/mojo/submissions/191.15/javascripts/widget_charselector.js

with the layout controlled by 3 files in /usr/palm/frameworks/mojo/submissions/191.15/templates/charselector

the actual list of characters that appear on the screen is controlled by /usr/palm/frameworks/mojo/submissions/191.15/resources/en_us/alternatechars_table.json

At the simplest level then, creating an on-screen keyboard requires editing the alternate characters table json, to add the "regular" charcters to it, and then when you want a keyboard, press SYM and poof, a keyboard. The problem with that is, the alternatechars_table.json is "fragile" the slightests mis-edit results in the pre entering a continuous book cycle.

At the next level, the framework's copy of widget_charselector.js needs to be modified to not close the keyboard after each keypress.

As of 12 August 2009 Webos-internals contributor Eric Gaudet (irc egaudet) announced success at patching the framework.js to accept a new function derived from the charselector widget. This pre-alpha proof of concept on-screen keyboard is available as a patch.

Procedure

The patch is on Gitorious, please read the following to install the patch: Applying Patches - WebOS Internals

The patch should be stored(on Pre) in: /opt/src/modifications/frameworks/add-onscreen-keyboard.patch

the 'source code' of the patch: [1]

Issues

as of 13 August 2009 the following issues are known:

  • Add method to get at numbers and symbols (possibilities: sym,flick)
  • Modify keyboard dimensions in landscape mode to span accross width
  • Do not bring up keyboard when using hard keyboard clipboard events (might have to disable the keyboard when slider is open exposing hard keyboard)
  • Enable usage to search contacts/universal search -- for example Name, email address, etc are search fields not text fields.
  • Fix far right column -- DONE 13 Aug
  • Verify auto-correct when space added.
  • Possibly (and optionally) play sound or haptic feedback on touch
  • Add clipboard capabilities
  • Explore T9-type, limited-width keyboard options
  • Do not bring up keyboard on swipe gestures, only tap if possible
  • Space, enter, backspace need to work == DONE 13 Aug