找回密码
 加入我们

QQ登录

只需一步,快速开始

搜索
查看: 1807|回复: 7

[软硬件讨论] palm虚拟软键盘实现思路

[复制链接]
发表于 2009-8-12 16:18 | 显示全部楼层 |阅读模式
On Screen Keyboard
0 ?- n% s% O* zFrom WebOS Internals
6 o) K  r& c- C1 k7 v/ s. KJump to: navigation, search* U5 o- D1 f% l: K4 k3 X( u8 g
On Screen Keyboard: A path forward' w# j  B. a$ u# ^
: |9 L: P4 J+ e, R$ \$ Q) [
The Palm Pre already COMES with an on-screen keyboard. It works in portrait and landscape, in all apps, in all fields.
5 l  M% s5 ?! [- Q7 F/ s) X3 j) V3 A. f* S+ L0 D
Press the "sym" key and a scrollable 5x5 keyboard pops up full of alternate characters.
3 C3 O4 [- ], o% ~" B& a5 e% q- x! C8 y' }% A. z3 o& |0 D
This is controlled by /usr/palm/frameworks/mojo/submissions/191.15/javascripts/widget_charselector.js
( q6 o* K: d& r/ Z9 r
! `" ]6 K+ p, r' M) ]with the layout controlled by 3 files in /usr/palm/frameworks/mojo/submissions/191.15/templates/charselector3 M, m3 M. E8 i; d
  ^4 @0 T$ {2 H2 B1 k, q- W8 ?1 A( [
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
* c) q" n4 Y8 X7 |. h3 Z
+ _7 e  V$ x1 H( v$ mAt 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.  T- N' j! j: V5 j/ a/ t: U
! T: G1 S5 k0 ]$ b/ [% k
At the next level, widget_charselector.js needs to be modified to not close the keyboard after each keypress.
) l' ]5 Y. H4 b
( m- e3 F# _, s* O' U  pA more sophisticated version would require editing widget_charselector.js to make the widget wider to accomodate more characters at a time, or perhaps a qwerty layout.$ v6 h3 p, q5 s) E' k

: `# A% Q& w4 M( K3 U1 ~A further refinement would require digging into the mojo framework deeper. It would be really "neat" if you were in a text field and the keyboard "popped up" if the slider was closed. This would be "harder."' l" k# d2 {: @; I8 h- y
: k: r6 x' f. q; u) }
Still, this is a path forward which is something we haven't had before.
' Z! f  }1 I2 C' Z  Q- v4 z
6 ^" L: X& G% M# XPlease edit this page with your thoughts, and proposals.
; j* x% m  l1 x- h/ j& g2 H: M$ N$ m. v7 S+ c, X& C
Update: 8/04/09 I have been editing widget_charselector.js, and no changes have occurred, can be deleted, and still no changes occur, it does not control sym in the least bit -Joesmith
回复

使用道具 举报

发表于 2009-8-12 16:47 | 显示全部楼层
沙发。但偶不喜欢软键盘。这就是我为什么不喜欢IP的主要原因之一!
回复 支持 反对

使用道具 举报

发表于 2009-8-12 18:04 | 显示全部楼层
原帖由 yglaotu 于 2009-8-12 16:47 发表 $ \4 c  |7 v& X* ]
沙发。但偶不喜欢软键盘。这就是我为什么不喜欢IP的主要原因之一!
$ ?8 i0 a  W! u0 Z8 Z, l5 c

% W* r$ c- H7 P% }5 X% g7 m1 @同感。。。
回复 支持 反对

使用道具 举报

发表于 2009-8-12 18:53 | 显示全部楼层
原帖由 yglaotu 于 2009-8-12 16:47 发表
& ^" X6 J9 k) n3 C0 J沙发。但偶不喜欢软键盘。这就是我为什么不喜欢IP的主要原因之一!
, T. j: Z/ ], ~: ^/ n
. j& y6 G- T9 {( Y. `" i: O/ |
偶也是。。。
回复 支持 反对

使用道具 举报

发表于 2009-8-12 21:11 | 显示全部楼层
这玩意儿不是要拿来用滴,是方便开发系统中文输入法的吧
回复 支持 反对

使用道具 举报

发表于 2009-8-13 10:07 | 显示全部楼层
原帖由 yglaotu 于 2009-8-12 16:47 发表 ' N+ M- S" M1 |  Q, V7 y
沙发。但偶不喜欢软键盘。这就是我为什么不喜欢IP的主要原因之一!

! M# p, k! [8 L* S0 A& _" r
  J: j1 y/ ^8 ?: W) {. E5 Q4 g' F8 v/ T- F' O& q1 U
同感,不过PRE上有也不错,就算不用。
回复 支持 反对

使用道具 举报

发表于 2009-8-13 11:36 | 显示全部楼层
看名字还以为是软件的盘呢.
回复 支持 反对

使用道具 举报

发表于 2009-8-13 12:40 | 显示全部楼层
最起码标题里不要出现错别字吧……
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 加入我们

本版积分规则

QQ|Archiver|手机版|小黑屋|吹友吧 ( 京ICP备05078561号 )

GMT+8, 2025-2-25 05:32 , Processed in 0.303271 second(s), 15 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表