webOS Nation Forums >  Homebrew >  webOS Patches > [Patch request]enable SYM key in enyo on webOS <3.x
[Patch request]enable SYM key in enyo on webOS <3.x
  Reply
Like Tree7Likes

 
Thread Tools Display Modes
Old 12/16/2011, 10:51 AM   #1 (permalink)
pivotCE Developer
 
Posts: 2,191
SYM key does not work on enyo apps using webOS 2.x (perhaps 1.x).

confirmed by ben @ hp...
Twitter
Quote:
@unwiredben Ben Combee
@DataJog This is true. Sym key was handled by Mojo framework, not WebKit. Enyo would need patching to also handle it.
and:
https://developer.palm.com/distribut...864d8f6#p97498

Is there a way anyone could patch this?

It's most annoying for Pre2 (2.1) users in countries using special characters like germany where the often used umlauts can't be entered SYM+aous, this changed for Pre3 (or perhaps it's cause of 2.2) where the Umlauts are entered by OPT+auos

Shouldn't it be possible to press SYM in all apps and get the whole symbols menu to choose from?

Last edited by gizmo21; 01/12/2013 at 03:01 PM.
gizmo21 is offline   Reply With Quote
Old 12/16/2011, 01:40 PM   #2 (permalink)
webOS Enthusiast
 
Abyssul's Avatar
 
Posts: 2,119
Doesn't work in 2.2.4 either. I just tested.
__________________


If I helped you or you have downloaded one of my files,
then least you could do is click the "Thanks" button.
Abyssul is offline   Reply With Quote
Old 12/17/2011, 09:46 AM   #3 (permalink)
pivotCE Developer
 
Posts: 2,191
Twitter
Quote:
@unwiredben Ben Combee:
@ahel76 @webosinternals The workaround is porting the Sym-handling code from Mojo to Enyo and providing a patch to the added-to-ROM version.
Sounds not that easy... HP fix this....
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?
gizmo21 is offline   Reply With Quote
Old 02/22/2012, 07:28 AM   #4 (permalink)
pivotCE Developer
 
Posts: 2,191
anybody on this?
enyo is opensourced now, can anybody patch version 1.0 and enable SYM handling via patch?
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?
gizmo21 is offline   Reply With Quote
Old 02/22/2012, 10:32 AM   #5 (permalink)
Homebrew Developer

 
Posts: 2,406
Quote:
Originally Posted by gizmo21 View Post
Twitter


Sounds not that easy... HP fix this....
Should not be THAT difficult. I'll have a look when I got time
Herrie is offline   Reply With Quote
Old 02/22/2012, 12:03 PM   #6 (permalink)
Member
 
Grabber5.0's Avatar
 
Posts: 3,990
There's a bit more to it. There's a topic on the webOS developer forums where it's discussed in some detail.

-- Sent from my TouchPad using Communities
__________________
Matt Williams
*How to install .patch files on your device*
Developer of: SMS Auto Forward/Reply, GPS Viewer,
Keyring converters for CSV, eWallet, & CodeWallet
Touchpad patches:Keyring HD,ClassicNote HD, YouTube HD (for 2.1 app), Show email recipient addresses for contacts
Phone patches: Forums fixes and enhancements patch, Weather Channel fix
All-device patches: Update GlobalSign certs, Google Sync https fix, Yahoo contact sync fix

Grabber5.0 is online now   Reply With Quote
Old 12/27/2012, 01:56 AM   #7 (permalink)
pivotCE Developer
 
Posts: 2,191
so what about enyo2 and openwebos?

any progress there?

Forums webOS • View topic - Will HP fix the Enyo problems on webOS phones? - https://developer.palm.com/distribut...?f=109&t=19611
gizmo21 is offline   Reply With Quote
Old 12/27/2012, 03:00 AM   #8 (permalink)
Homebrew Developer

 
Posts: 2,406
Quote:
so what about enyo2 and openwebos?

any progress there?

Forums webOS • View topic - Will HP fix the Enyo problems on webOS phones? - https://developer.palm.com/distribut...?f=109&t=19611
Seems like a workaround/solution is given there to make it work on Enyo? Did anyone try that?


-- Sent from my TouchPad using Communities
__________________
HP Veer (daily driver), HP Pre 3, HP Touchpad Proper 4G/LTE (Sierra MC7710), HP Touchpad 32GB WiFi, Palm Pre 2
Herrie is offline   Reply With Quote
Old 01/04/2013, 10:49 PM   #9 (permalink)
pivotCE Developer
 
Posts: 2,191
Anyone tried to enter our favorites phone real name Prē into an ENYO app on phones? Or any other symbol not reachable via OPT-key? Not possible? Oh it is

Just put the file symenyo.js (in this post) into the root of an enyo app and add
Quote:
"symenyo.js",
to the depends.js in that directory
Luna restart could be needed.

Then you get i nice lil Symbol window where you can choose your favourite Umlauts...

Works with ENYO1 apps.

Works nearly(check here) on ENYO2 apps :
remove this in front of the code (we know we have a Phone on webos2)
var hacks_deviceInfo = enyo.fetchDeviceInfo();
var hacks_isPhone = hacks_deviceInfo.platformVersionMajor <= 2;
And remove the If (hacks_isPhone) { and the closing }

You'll get a popping up sym dialog on ENYO2 Memos.
Only pasting the symbols does not work on Enyo2 as it seems a Mojo function is called.
But that should be taken care of more advanced enyo hackers.


All of the heavy lift work was already done and there on ALL webos 2 phones.
The code here is just a cool hack by yeye77 and pc-world to adress those functions easily.

Come on Palm you could have at least given this to us with HP Maps (btw. is working too).

Some draw backs on this hack solution (which could have been fixed by Palm):
https://github.com/enyojs/enyo-1.0/pull/12
like:
-The symbol keyboard that pops up by calling "showAltChar" on a service is not nearly as mature as the Mojo one was. I.e. you can't press keys to jump to a section or to immediately write e.g. umlauts.
-When pressing the key combination for screenshots (opt+sym+P), the symbol keyboard pops up

Ah well fileupload suæ via webos so here is a pastebin of symenyo.js (one to build them all):
[JavaScript] symenyo.js - Pastebin.com
or
[JavaScript] symenyo.js 2 - Pastebin.com
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?

Last edited by gizmo21; 03/14/2013 at 07:12 AM.
gizmo21 is offline   Reply With Quote
Liked by Rnp, jcmarcos, Vistaus and 1 others like this.
Thanked by DataJog, jcmarcos, Remy X, Rnp, Vistaus
Old 01/04/2013, 11:19 PM   #10 (permalink)
pivotCE Developer
 
Posts: 2,191



Enyo2:




HP Maps, not that any uses it now after 72ka's google maps

__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?
gizmo21 is offline   Reply With Quote
Old 01/04/2013, 11:36 PM   #11 (permalink)
pivotCE Developer
 
Posts: 2,191
Btw. i tried at first to fix the whole framework on phone by entering code into enyo-build.js but i failed., So I kicked that idea before wrecking the core OS.

As no one knows the sideeffects of that code, it could be better to have devs or users implement those small fixes for themselfs.

Any dev willing to try it on their Enyo-apps?

Last edited by gizmo21; 01/05/2013 at 11:17 AM.
gizmo21 is offline   Reply With Quote
Old 01/05/2013, 01:32 PM   #12 (permalink)
Homebrew Developer
 
DataJog's Avatar
 
Posts: 119
Thanks for this gizmo! Will get it into DataJog.
__________________
DataJog - Ingeniously Moving Data From Your Desktop to ANY webOS or Android Device

123 Trace - ** NEW APP ** Teaches kids the 123's
ABC Trace - Teaches kids the ABC's
DataJog is offline   Reply With Quote
Old 01/12/2013, 01:53 PM   #13 (permalink)
Homebrew Developer
 
Posts: 700
As gizmo21 asked me to look into getting this working on Enyo 2 (I'm the one who put the Enyo 1 hack together), here is a working script for Enyo 2:

Code:
document.addEventListener("keydown", function(event) {
	if (event.keyCode === 17) {
		window.hacks_symKeyTarget = event.target;
		new PalmServiceBridge().call("palm://com.palm.applicationManager/launch", "{\"id\": \"com.palm.systemui\", \"params\": {\"action\": \"showAltChar\"}}");
	}
});
window.hacks_sendFakeKey = function(type, charCode) {
	var e = document.createEvent("Events");
	e.initEvent(type, true, true);

	e.keyCode = charCode;
	e.charCode = charCode;
	e.which = charCode;

	window.hacks_symKeyTarget.dispatchEvent(e);
	return e;
};

if (!window.Mojo)
	window.Mojo = {};
window.Mojo.relaunch = function(event) {
	var altCharSelected = JSON.parse(PalmSystem.launchParams).altCharSelected;
	if (!altCharSelected) {
		return false;
	}

	var selection, newEvent, charCode;
	// Put the text into the editable element
	selection = window.getSelection();
	// make sure there are any available range to index as
	// getRangeAt does not protect against that
	if (selection && selection.rangeCount > 0 && selection.getRangeAt(0)) {
		document.execCommand("insertText", true, altCharSelected);
	}

	// Fire off our fake events
	charCode = altCharSelected.charCodeAt(0);
	window.hacks_sendFakeKey("keydown", charCode);
	window.hacks_sendFakeKey("keypress", charCode);
	window.hacks_sendFakeKey("keyup", charCode);
	//Event.stop(event);
};
Note that you should include this code only for webOS devices.

Quote:
Originally Posted by gizmo21 View Post
Come on Palm you could have at least given this to us with HP Maps (btw. is working too).
Enyo already shipped on webOS 2.2.4 devices before the Enyo maps app for phones was released.

Quote:
Originally Posted by gizmo21 View Post
Btw. i tried at first to fix the whole framework on phone by entering code into enyo-build.js but i failed., So I kicked that idea before wrecking the core OS.
Adding this code to the minified Enyo script should work as a patch.

Quote:
Originally Posted by gizmo21 View Post
Any dev willing to try it on their Enyo-apps?
I've been using this hack for 9 months now in my app QuickChat.
__________________
Apps (they're all free now): Explorer for Dropbox – a Dropbox app for webOS that actually works (TP+phones), 3-panel-interface
File Explorer – fast and simple file manager (root support on webOS 3)
QuickChat for Facebook – real-time Facebook chat
Archive Manager – extract and create archives (zip, rar, 7z, …)
FTPit! – full-featured FTP client for webOS
Twitter: @pcworldSoftware; e-mail (contact, support) – if you like what I'm doing, feel free to (alternatively in USD)

Last edited by pcworld; 01/15/2013 at 03:07 PM.
pcworld is offline   Reply With Quote
Old 01/12/2013, 02:32 PM   #14 (permalink)
pivotCE Developer
 
Posts: 2,191
Quote:
Originally Posted by pcworld View Post
As gizmo21 asked me to look into getting this working on Enyo 2 (I'm the one who put the Enyo 1 hack together), here is a working script for Enyo 2:

Note that you should include this code only for webOS devices.


I've been using this hack for 9 months now in my app QuickChat.
Great thanks a lot pcworld. And good to know it is tested a long time.

I already tried the new one in TravelCost V2 Pro (Enyo2 app in AppCatalog) and it's working

gizmo21 is offline   Reply With Quote
Old 01/12/2013, 02:58 PM   #15 (permalink)
pivotCE Developer
 
Posts: 2,191
So if an enyo 1/2 does nothing when you press SYM-key on webOS phones you can fix this app on your phone by
1. copying the appropriate .js-file (files attached) to the root of the app into
/media/cryptofs/apps/usr/palm/applications/<app-id>/

2. link to the correct .js in one of the following files by opening with Internals Pro (set to unix linebreaks):

ENYO1-app: /media/cryptofs/apps/usr/palm/applications/<app-id>/depends.js
Code:
enyo.depends {
...
"symenyo.js",
...
};

ENYO2-app: /media/cryptofs/apps/usr/palm/applications/<app-id>/index.html
Code:
...
<head>
...


<script src="symenyo2.js"></script>
</head>
...
If you are a cross-plattform app developer, think about implenting the code with an if condition for os/device/webosversion in front of it, so only webos phone will activate that code. View the whole thread for more info, screenshots and sources. Enyo2 devs can also use the new https://github.com/webOS-ports/webos-lib

NOTE:
symenyo.js is for Enyo1 apps

symenyo2.js is for Enyo2 apps
Attached Files
File Type: zip SymEnyo.zip (2.1 KB, 23 views) Email Attachment
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?

Last edited by gizmo21; 04/09/2013 at 02:07 PM. Reason: Corrected paths sry
gizmo21 is offline   Reply With Quote
Liked by ZehHa likes this.
Thanked by cbosdell, ZehHa
Old 01/13/2013, 05:28 AM   #16 (permalink)
Legend
 
Jason Robitaille's Avatar
 
Posts: 3,855
Sweet, thx pcworld. Hope ya don't mind if I add this to an upcoming build of webOSExt
__________________
If you've liked my software, please consider to towards future development.

Developer of many apps such as: WebOS Quick Install, WebOS Theme Builder, Ipk Packager, Unified Diff Creator, Internalz Pro, ComicShelf HD, LED Torch, over 70 patches and more.

@JayCanuck @CanuckCoding Facebook
Jason Robitaille is offline   Reply With Quote
Old 01/13/2013, 05:33 AM   #17 (permalink)
Homebrew Developer

 
Posts: 2,406
Quote:
Sweet, thx pcworld. Hope ya don't mind if I add this to an upcoming build of webOSExt
That would be great, so it's at a central location!


-- Sent from my TouchPad using Communities
__________________
HP Veer (daily driver), HP Pre 3, HP Touchpad Proper 4G/LTE (Sierra MC7710), HP Touchpad 32GB WiFi, Palm Pre 2
Herrie is offline   Reply With Quote
Thanked By: Jason Robitaille
Old 01/13/2013, 09:26 AM   #18 (permalink)
Member
 
Posts: 270
Tested it with Maps, and seems to work very well. But not actually using Maps because of HB Google Maps there Sym-key working out of the box!
michel_ng is offline   Reply With Quote
Old 01/14/2013, 06:17 AM   #19 (permalink)
pivotCE Developer
 
Posts: 2,191
App-List:

Quick Chat for Facebook - available (pcworld: "I've been using this hack for 9 months now in my app")
DataJog - "upcoming version" (DataJog: "Will get it into DataJog")
Travel Cost Pro V2 - "upcoming version" (st@eding: "Is added, works good")
__________________
Patch Enhancing vCard Export -|- Your own cloud with Zarafa (EAS sync) -|-
Tasks-app of 2.x on 3.x incl.EAS sync -|- SYM key in Enyo on phones -|- My hidden webOS Tips and Tricks - like it ?

Last edited by gizmo21; 03/14/2013 at 06:41 AM.
gizmo21 is offline   Reply With Quote
Old 01/14/2013, 08:52 AM   #20 (permalink)
Member
 
pretoo's Avatar
 
Posts: 85
Quote:
Originally Posted by gizmo21 View Post
So if an enyo 1/2 does nothing when you press SYM-key you can fix this app on your phone by
1. copying the appropriate .js-file (files attached) to the root of the app into
/media/cryptofs/app/urs/applications/<app-id>/

2. link to the correct .js in one of the following files by opening with Internals Pro (set to unix linebreaks):

ENYO1-app: /media/cryptofs/app/urs/applications/<app-id>/depends.js
Code:
enyo.depends {
...
"symenyo.js",
...
};

ENYO2-app: /media/cryptofs/app/urs/applications/<app-id>/index.html
Code:
...
<head>
...


<script src="symenyo2.js"></script>
</head>
...


NOTE:
symenyo.js is for Enyo1 apps

symenyo2.js is for Enyo2 apps
Hi there!
I'm not really familiar with this thread (I'm at work right now, so I have to avoid getting cought on reading forum)but I'm familiar with the NEED of SYM Key functionality.

I have a few questions:
1. The path:

(/media/cryptofs/app/urs/applications/<app-id>/depends.js)
for me the path is similar up to /media/cryptofs/ then there is no app/ but apps/
If I need to track down <app-id> I have to go to
/media/cryptofs/apps/usr/palm/applications/

Am I missing something obvious?
Maybe I need to create dirs/files where needed?
Some hint would be great.

2.What if there's no 'depends.js' or 'index.html' file?

I was trying to make SYM Key work for 'Picsel Smart Office' as alternate characters are crucial in my native lenguage.
I failed 'couse: 1. the path is different, 2. there's no file ('depends.js' or 'index.html')to edit.
Is there a way to patch PSO to work with SYM Key?

Best regards
-pretoo-

EDIT:
I have found that something in my memory is ringing a bell.
Now I remember:
"PSO is a PDK app (i.e is written in C/C++). The SYM key works only in SDK apps (i.e. written in JS using Mojo or Mojo 2)." as isagar2004 was pointing in this thread -> Custom Special Characters
This is not going to solve my problem, but answers at least one of my questions.
Oh, well.
-p-
__________________
Pre3 (UK, QWERTY, Unlocked)
webOS 2.2.4 (Build 3175), with UberKernel
UK App Catalog via Impostah
Orange [PL]

Last edited by pretoo; 01/14/2013 at 09:19 AM. Reason: I Find an answer for at least one question
pretoo is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0