Hi all,
i would like to share with you a utility i have written to help me with my PDA.
Mainly (as the name says), with this utility different programs can be started by using the keys of the PDA.
Its like an extension of the hotkeys but without impacting the hotkey usage.
I have included one more utility which i use together with the hardkeymenu called cscommandline.
Information is included in the cscommandline-spec.txt.
This utility can turn on/off the bluetooth, set the global volume to a value, set the ringer volume to a value,
set the ringer script to a value (this enables the vibration during the alert of calls etc).
I have tested it on a TyTn with WM6 but it should work under WM5 as well.
Link for the whole package is at:
http://rapidshare.com/files/84951586/hardkeymenuv32.zip
>>>>>>>>>>>>>HARDKEYMENU
Usage
-----
Hardkeymenu extends the usage of hot keys:
Its possible now to assign any program (.exe) or registered file to be executed with a
combination of user defined key strokes.
It provides feedback (picture/sound/vibrates) of the options selected.
The program works as follows:
Once the hardkeymenu is executed, it will read the hardkeymenu.dat and wait for keystrokes.
The program if it finds within the same directory the file hardkeymenup.jpg (when in portrait)
or hardkeymenul.jpg (when in landscape) will use it as a background picture. Otherwise, it will
use the current desktop as a background picture.
If any matching sequence is found, then the relevant description (or picture if present) will be displayed.
If the user does not press any other key, then the relevant sound will be played (if present), the corresponding
program/file will be executed and hardkeymenu will terminate.
If no matching has been found, it will wait for 7 seconds and if no key is pressed it will exit.
If the nomatch.jpg picture is present then it will be displayed otherwise it will display
the key sequence.
The hardkeymenu can be assigned to a Hot-key for quick start up (usual Registry setting,
for example: HLM\SOFTWARE\Microsoft\Shell\Keys\40C7)
Setup/StartUp
---------------------
Setup
-----
The combination key sequence and command can be created by running the setup option.
This option appears when clicking anywhere on the screen while the program is running
and a popup menu will appear with the relevant 'Setup' option.
Through the Setup screens,
- the 'Description' to be displayed when the key sequence is found, can be set. If there is a file with the
same name and extension .jpg then it will be displayed instead.
- the 'Keys' (key sequence that is supposed to trigger the command that follows), can be captured by pressing the relevant
button 'Capture'.
Keys can be pressed and the program will display them for reference. To complete the capturing wait 5 seconds without
pressing any key and the capture screen will exit.
- the 'Command Line' (file to be executed) can be also selected. Pressing 'Browse' will display all files in the PDA and clicking on the
required file will fillin the command line.
- 'Command Parameters' (any optional parameters that might be required together with the command line) can be
keyed in.
- 'Sound', if checked then after selection before executing the 'Command Line', if a file with name 'Description'
and extention .wav will be played.
- 'Vib Scr.', is a script for Vibrating before executing the command. Letter L will produce a Long vibration, S will
produce a short one.
'Description', 'Keys' and 'Command Line' are required, if either is not set then the whole entry is ignored.
Navigation through the total of 20 entries is feasible with the 'Next' and 'Back' buttons.
A whole entry can be ignored by pressing 'Delete'.
Pressing 'Done' saves all the changes (No need to save one by one), 'Cancel' will ignore them all.
StartUp
------
- 'Sound', if checked then if a file with name 'waiting.wav' exists it will be played when the program starts.
- 'Vib Scr.', is a script for Vibrating as soon as the program starta. Letter L will produce a Long vibration, S will
produce a short one.
Installation Instructions
-------------------------
Copy all files provided to a directory of your choice (Including Storage Card).
All files including pictures mentioned must be located in the same directory.
Note:
if the message 'Wrong Version' appears, then delete the hardkeymenu.dat is the latest version is not
backwards compatible with the previous.
Log
----
19-01-2008:
Updated cscommandline to support ringer script.
12-01-2008: Version 3.2
- Added vibration support in the form of a script.
04-01-2008: Version 3.1
- Added Sound support as confirmation
If a file with the same name as the 'Description' and extension '.wav' exists in the directory of the hardkeymenu
the sound will be played as a confirmation while running the relevant program.
- On main screen a count down is showing the seconds left before the program exists if no key is pressed.
- Bug fix
03-01-2008: Version 3 - Added Setup option, stopped using ASCII File.
26-12-2007: Version 2 - A simpler remake of version 1
Below are some screenshots (remember that most of the pics including background can be customized).
Can you post any pics? things will goes interesting only with some screenshots hehe
Pics added,they are from the simulator using my own pics but they can be replaced with any other.
Very nice and unique.
I tied some of the directions on my dpad to some .exe's and got a certificate error? If i link to a lnk of the same .exe it works fine.
It would be awesome if a future version had a easier method of setting up the buttons to the desired path.
Good job Chrisstavrou! Thanks for sharing!
Thanks andason.
It looks like this certificate error pops up only with the first attempt to execute any program.
Is this correct ?
I am trying to figure out why this is happening but it looks that this message comes up when any program is first time executed in the PDA even from explorer.
I am adding a small setup form to help assign the keys as you mentioned.
Thanks
Chris
Version 3 is out
Included the setup option, no need to play around with the ASCII file.
Link has been updated in the first post.
If anyone has any comments etc let me know.
Cheers
Chris
Well another change as when using it, i wanted to hear a sound as a confirmation of what i had finally selected
I have included in the zip file some wav files as samples together with the pictures i am using to turn on/off bluetooth.
Have fun, any comments are welcome.
Chris
Added vibration support.
Changed cscommandline to support controlling of the ringer script
Before 1.5, I used AnyCut to edit the length of my Home shortcuts. For example, "Power Manager Pro" is too long to fit in the icon space allotted. So I'd fire up AnyCut and shorten it to "Power" or something.
But 1.5 seems to have broken this ability: instead of getting a selection of shortcuts to edit, I just see a blank screen.
I asked in the #android channel last night, and someone said they helped write Home and that these were in a SQLite database.
If so, can I change them myself using some tool like SQLite Admin? I've looked for a database where it seems logical, i.e. /data/data/com.android.home and the like, but haven't found it yet.
You can try Bettercut maybe, which is an enhanced version of anycut. Or a Home app like dxtop, you can change names and icons on any shortcut. Sorry, don't know about the technical stuff, but it will work.
why dont you just make the shortcut with anycut and once it tells you to enter the name of it just chage it to what you want......
EX: long press home screen>shortcuts>anycut>activity>power manager pro>"change the name"power>ok and your done
xm0is3sx said:
EX: long press home screen>shortcuts>anycut>activity>power manager pro>"change the name"power>ok and your done
Click to expand...
Click to collapse
I hadn't thought of it that way. So I tried, but it would only create shortcuts if I didn't change their name. When I renamed them, nothing at all was put on the screen.
The problem seems to be that Cupcake changes where (and maybe how) the Home shortcuts are stored. Which breaks certain programs, Anycut in particular. But also, MyBackup had to be updated so it could again back up Home shortcuts in Cupcake phones (same went for the browser bookmarks, I think).
These shortcuts are in /data/data/com.android.launcher/databases/launcher.db in a SQLite database. Use a SQLite admin tool to look at table "Favorites", field "Title" -- this is where the names on the icons are stored.
The problem is, editing that file. It seems to be "in use", so you can't make edits or replace it (tried, failed). I guess I could try the sqlite3 tool included on the platform. But it's CLI/text only, and pretty obscure to me so far.
I've seen miscellaneous info around on the common task of repurposing the "n" button. I'd like to see a concise rundown of ways to hack it.
The "n" button is a scancode 102 that normally gets mapped to keycode 3 with /system/usr/keylayout/gpio-keys.kl
Keycode 3 in intercepted by the interceptKeyTi method of PhoneWindowManager in /system/framework/android.policy.jar
Keycode 3 is handled directly without using any intents.
It's not easy to hack a key to give an intent. You have CALL_BUTTTON, CAMERA_BUTTON & MEDIA_BUTTON. I haven't managed to catch them. The easy one to hack is SEARCH_LONG_PRESS.
You can easily change gpio-keys.kl to key 102 SEARCH
A normal press will bring up the default Nook search. A long press will generate an intent. All you have to do is insert another intent filter in your favorite app.
Code:
<intent-filter>
<action android:name="android.intent.action.SEARCH_LONG_PRESS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
I have this running on my ADW Launcher and I uninstalled Button Savior.
Personally, I prefer hacking to installing yet another app just to do one thing. I would like to come up with a solution for a dedicated action for the "n" key.
Any thoughts?
If you use NookTouchTools this allows you to remap the buttons/quicknav etc without all the hassle.
GabrialDestruir said:
... without all the hassle.
Click to expand...
Click to collapse
Well, I'd really like to learn things, not just load another app.
So how exactly do the Tools work? Do they need to have another process just to listen for a keycode and translate it to an intent?
Renate NST said:
Well, I'd really like to learn things, not just load another app.
So how exactly do the Tools work? Do they need to have another process just to listen for a keycode and translate it to an intent?
Click to expand...
Click to collapse
It uses modification of various .jar files
XorZone said:
* Patched android.policy.jar:
*** Injected home button code from AOSP, with configuration check between goto home and b&n quicknav toggle
*** Fixed recent apps dialog with configuration check to launch recent apps dialog or configured app launch
* Patched services.jar
*** "Reading now" button check for configured launch value (possible values: Home, Back, Menu, Search, Long Search, Custom App, B&N default)
*** All quicknav buttons configurable and will load icons (once, onCreate) possible values same as above.
* ActivityPicker - B&N removed default activity (usually in Settings.apk) to serve ACTION_PICK_ACTIVITY requests, so I added it back to the app and now able to add shortcuts/edit doc shortcuts in Launcher Pro...
* Configuration - All above configurable values stored in Settings.System so both system jars and Conf app can access it.
* Clear dalvik-cache button
Click to expand...
Click to collapse
Thanks, Gabrial. I had read through this entire thread before and it had left me confused. 10 pages of talking about changing the UI and not a single screenshot? I'm still not sure how an activity picker or a recent apps dialog looks like. Heck, I'm not even sure what additional things you get in Settings. Is there even a tree list of what people should have?
Yes, I do have a penchant for doing things the hard way. I like things lean and mean. If I knew how to inject code into jars I would just have fixed android.policy.jar and left it at that. My main need was a way to globally get back to my launcher desktop without onscreen controls (like Button Savior).
Renate NST said:
Thanks, Gabrial. I had read through this entire thread before and it had left me confused. 10 pages of talking about changing the UI and not a single screenshot? I'm still not sure how an activity picker or a recent apps dialog looks like. Heck, I'm not even sure what additional things you get in Settings. Is there even a tree list of what people should have?
Yes, I do have a penchant for doing things the hard way. I like things lean and mean. If I knew how to inject code into jars I would just have fixed android.policy.jar and left it at that. My main need was a way to globally get back to my launcher desktop without onscreen controls (like Button Savior).
Click to expand...
Click to collapse
Well said
I'd try to ask Nook Color forums too...
Well, I finally learned how to hack compiled Java code.
Now, I've got a simple press the "n" and it goes directly to your desktop.
It required just a bit of editing of android.policy.jar
Why would anyone want "QuickNav"?
It's not part of Android anywhere, it's just something B&N put in.
Sometimes I use library...
brendan10211 said:
Sometimes I use library...
Click to expand...
Click to collapse
You can drag the stock Library icon onto your desktop.
You can even put the stock Home or Shop there also.
I also use it to force refresh, but XorZone just made that soo
Renate NST said:
Well, I finally learned how to hack compiled Java code.
Now, I've got a simple press the "n" and it goes directly to your desktop.
It required just a bit of editing of android.policy.jar
Why would anyone want "QuickNav"?
It's not part of Android anywhere, it's just something B&N put in.
Click to expand...
Click to collapse
Hi,
I, same as you, like to modify my Nook as little as possible. In case of a future software upgrade, I would like to know what to change back before applying it.
Of course, I know I can just save the partitions (internal disk) and restore it as needed, but I would like to not need to do this.
Right now, I modified the gpio file for Search and created my own Launcher (base on Home Sample code in Android SDK).
Still, I don't like the need for Long Press on Search.
Could you please post the links which shows how to hack the android.policy.jar?
Maybe, if I don't ask too much, your edits to it?
Thanks!
Renate NST said:
[...] Why would anyone want "QuickNav"?
It's not part of Android anywhere, it's just something B&N put in.
Click to expand...
Click to collapse
Mainly because I don't like every device looking like an iPhone wannabe with a grid of icons. I like the reader focus with apps secondary. I do wish the QuickNav could be fully customized, including icons, easily.
bobstro said:
Mainly because I don't like every device looking like an iPhone wannabe with a grid of icons.
Click to expand...
Click to collapse
Mmm, Ok. Still, I don't like having to do three taps to do a non-book activity.
"n", then [launcher select] gets me anywhere.
The "currently reading" icon gets me back to my book.
I'm not fond of icons at all and have considered a list-oriented launcher,
but the fact remains that visually locking onto an icon is quicker.
That's why the QuickNav has icons on it.
Renate NST said:
Mmm, Ok. Still, I don't like having to do three taps to do a non-book activity.
Click to expand...
Click to collapse
There are only a few apps I use regularly on the NST, so I've just remapped the QuickNav buttons using Xor's NookTouch Tools to launch them directly: Library, maildroid, astrid tasks, calendar pad and dropsync. I find it quicker than pulling up a full launcher.
It's definitely a personal preference thing. I rather like that the NST isn't trying to be an iDevice. There's a minimalist 'Zen' to it I like.
I know you don't like additional software, but you can take it a step further using Folder Organizer. I set it to show items in the Notification menu, then show the "Starred items" and "Applications" menus in the Notification menu. You can launch apps and submenus this way, and also shortcuts, which can be handy to have 2 clicks away.
"n", then [launcher select] gets me anywhere.
The "currently reading" icon gets me back to my book.
Click to expand...
Click to collapse
For me, it's:
"n" then run my top 5 most often used apps directly from QuickNav (2 taps)
or tap Notification->app for regularly used (still 2 taps)
or at worst, Notification->Menu->app for stuff I don't use regularly (3 taps)
This give me progressively more focused listof apps. At no point do I have to go through a launcher, thus avoiding the dreaded iPhone-wannabe look. I never use a launcher except for maintenance tasks.
I'm not fond of icons at all and have considered a list-oriented launcher, but the fact remains that visually locking onto an icon is quicker. That's why the QuickNav has icons on it.
Click to expand...
Click to collapse
Folder Organizer does essentially what you've described. You can change the folder display to show:
icons with text
icons only
list with icon and text
list with text only.
I don't recall which features are available in the free version, but I like to toss a few bucks to developers when I can, so happily paid the few bucks for the full version.
Unfortunately, NookTouch Tools only allows you to set the 'n' key to show QuickNav or not. If it allowed setting it to launch a shortcut, you could pull up a nice targeted list of apps directly, thus bypassing the 5 item limit of QuickNav.
bobstro said:
Unfortunately, NookTouch Tools only allows you to set the 'n' key to show QuickNav or not.
Click to expand...
Click to collapse
Although I have no experience with any of the Tools, I presume that they
(like my mod) just generate an android.intent.category.HOME/android.intent.action.MAIN
Most "home-based" apps should already have this as a filtered intent.
You should be able to easily select one of them as the default.
Using specific "shortcuts" defeats the purpose of the Android intents system.
Renate NST said:
[...] Using specific "shortcuts" defeats the purpose of the Android intents system.
Click to expand...
Click to collapse
Does it have to be one or the other exclusively? For a basic launcher, pulling up the main app is sufficient. Other programs, such as Folder Organizer, provide shortcuts to user-defined categories, so I could have a subset of all available apps appear rather than a full launcher. Various readers provide shortcuts to books, and so on. Sometimes you don't want/need the full program.
Looks like they have the new Nook 1.1.5 OSS released: http://images.barnesandnoble.com/PResources/download/Nook/source-code/nook2_1-1-5.tgz
The "n" button is used turn the light on and off I think with long presses.
I pre-ordered mine already so will see when it arrives how it works.
See following post for workaround
I tracked down an old version of the app (2.6.2--extracted from one of the nooter project file zips) and installed it on my NST, hoping to create a simple date-day widget.
I must be daft. I cannot get a widget to display! I can go through the entire creation and customization process. I can "see" the preview result while in the settings section. But nothing appears on the home screen
I tried installing the same app on my little KitKat device and had no issues with the widget appearing on the home screen. This version of the app was surely known to work with the NST or else it would not have been included in the nooter package.
Does anyone have any experience with Minimalistic Test on the NST? I must be missing something. I have no problem adding other widgets.
Workaround
Whew! It's too bad there wasn't any chatter on the forum about working with this app. Maybe something in the newer NST firmwares just makes it mad, but whatever may be the case, here's what I did:
The last version for Eclair is 2.6.3. You can get it straight from the developer here: http://devmil.de/MT/MinimalisticText_2_6_3.apk
I did this on a system running FW 1.2.2 but I'm pretty sure this will apply to 1.2.1 also. Installation goes OK but apparently the file minimaltextprefs*.xml in /data/data/de.devmil.minimalitext/shared_pref is malformed in some way. Things just don't behave the way they should. While I floundered about I ended up installing the app on my little KitKat media player and then copied the minimaltextprefs*.xml file from that device and used it to replace the one on the NST. Voila! There is a number at the end of the file name and you can make the replacement file the same as the original file, but the number does change as you use the app. I have attached a zipped copy of the file I used below.
For me the best use of the widgets is with black text and no background. Unfortunately the opening settings screen of the app is black.... So if you use black text (the default is white) you will see nothing except a box for your widget. However, within the customization section there is a preview pane which lets you see what you've got.
One last--and the most important--thing. Supposedly when you've made changes the "back" button saves these. Not on the NST. Instead, while in the settings section (anywhere except the customization preview pane) if you tap the "menu" button one of the options that pops up at the bottom of the screen is "OK". That is how you save your changes. Using the "save" command at the end of the settings just places things in a file for later reference.
All this for a date-month-day text widget...... But you can do a lot more with the app, so maybe someday.
I want to thank @Devmil for providing the direct link to v. 2.6.3 and also for having patience with me while I tried to figure all this out.