howto generate keystrokes for F1-F12 and Insert - Planet Gemini PDA Questions & Answers

Is it possible to generate keystrokes for F1-F12 and Insert that appear in a standard PC keyboard with DebianTP2?

Related

[REF] Foxtel Mobile TV GUIDE (Australia) on HTC Touch HD & Jbed

I have succeeded in:
- downloading the Foxtel Mobile TV Guide
- making it work on my HTC Touch HD
- stopping it from prompting me for "permissions" every time it runs.
- creating a direct shortcut to the application
This allows me to send remote-record instructions to my Foxtel iQ2 set top box, just like on the "supported" handsets, such as the Nokia N95.
(I've cross-posted this information to an existing thread on forums.whirlpool.net.au, where there are probably more Aussies asking about it. But I thought I should also post here, because xda-developers has more people interested in adjusting permissions in Jbed's "selector.utf".)
The following worked with Jbed 20080418.2.1 on the HTC Touch HD. I am not entirely sure whether that is the version which came on my handset originally, but if you have a problem with the version you're using, you can try to find the version I'm using via a Google/forum search.
Step 1. Register for the Foxtel TV Guide on your computer, and make sure it's working from a normal PC browser:
https://www.foxtel.com.au/EPG/EPG.aspx
Step 2. Send the text message "Guide" to 19 955 955 from the handset, as per the instructions at the following webpage:
http://www.foxtel.com.au/mobile/get-started.htm
(Cost: $0.55 according to that web page.)
You will shortly receive an SMS message with a URL to download the software, but if you try to download it on your handset, you will probably get an error message saying that your handset is unsupported.
Step 3. Change a web browser's "agent string" to match one of the supported handsets' agent string, then use the URL on the SMS message to download the software.
I used Firefox, and changed my agent string to:
Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95_8GB/10.0.021; Profile/MIDP-2.0 Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko) Safari/413
as quoted on the following web page:
http://www.leytonjay.co.uk/internet...kia-n95-8gb-user-agent-string-default-browser
Using the instructions on this page:
http://johnbokma.com/mexit/2004/04/24/changinguseragent.html
(I removed the "general.useragent.override" setting afterwards, to change Firefox back to normal.)
The file you download will be a ".jad" file.
Step 4. Copy the ".jad" file onto the handset, using ActiveSync, etc.
Step 5. On the handset, run the Jbed "Java" program, and choose Menu->Install->Local Files to locate the .jad file, and install it.
At this stage, you have installed the Foxtel Mobile TV Guide, but you might not be able to use it. On the HTC Touch HD, you do not have any built-in keyboard, or any directional buttons, and something needs to be done to work around it.
Step 6. If you don't have a directional pad on your pocket pc, then install a utility to re-map your volume buttons to fulfil the role of the directional pad. I installed AE-Button Plus, and used the following settings for my HTC Touch HD:
Volume Up:
1: Press Up arrow key
2: Press Left arrow key
3: Press Enter
Long: Press Left SoftKey
Volume Down:
1: Press Down arrow key
2: Press Right arrow key
3: Press Enter
Long: Press Right SoftKey
You may choose to use a different utility, as long as you can access up/down/left/right/enter and have a "hardware" way of accessing the soft-keys, which will be invisible.
http://ae.inc.ru/aebplus.php
Step 7. Run "Java" and launch the "Foxtel TV Guide" application. You will probably need to give it several permissions manually, because we haven't done anything about that, yet.
In order to perform a "remote record", you will need to enter your Foxtel TV Guide user guide and password, the same as for the normal web browser interface. But, Jbed won't let you access a SIP, and if you might not have a physical keyboard. You will need to use some software to control your handset from your PC.
I used EveryWAN Remote Support Personal Edition 3.0:
http://www.sparus-software.com/spip.php?page=download&lang=en
In the Foxtel Java application, press the Left SoftKey, to bring up the "Actions" menu. You can do this via your remote control program, or use your remapped buttons. Choose "Settings", then "Account Settings".
Now you have to enter your Foxtel username and password using the remote control software as a keyboard. However, it's not as simple as typing "a", "b", "c", etc. The application expects you to ONLY use digit keys, like on a simple phone. So, for "a" you might press "2" once, "b" = hit "2" twice in quick succession, etc. It's a pain, but you should only have to do it once, and it'll remember your settings.
By this stage, you should be able to launch and control the Foxtel Mobile TV Guide with your remapped buttons, and because you've entered your username and password, you can ask your iQ/iQ2 to record something from your phone, and it'll do it.
IF you want to get rid of the annoying prompts for permission on startup: (technical, and your mileage may vary)
Step 8. Find the files "selector.utf" on your handset, and copy it to your PC. Mine is in \Esmertec Java\AppDb, but yours might be in \Windows\AppDb. Make backups, both on your PC and on your handset, in case you do something wrong.
Step 9. Download a Hex editor for your PC, and edit "selector.utf".
I used "HexEdit":
http://www.physics.ohio-state.edu/~prewett/hexedit/
The first two bytes of the file determine exactly how many bytes follow. My file was 397 bytes long, so the first two bytes were "01 8B" = 395. The first two bytes don't count. The java program should be happy with "selector.utf" as long as the correct length is given.
The Foxtel application is installed with a setting/line "domain=midp1", but we need to change it to "domain=tckmax". That's exactly one byte longer, so, use your hex editor to increase the length by 1. In my case, that meant changing the first two bytes from "01 8B" to "01 8C".
Save and exit.
Next, open the file up with a normal editor. Hopefully you can use notepad, but I used "vi", which may not be available on your computer. Change "domain=midp1" to "domain=tckmax", save, and exit.
Step 10. Overwrite "selector.utf" on your handset with your edited version, and run Java again, and launch the Foxtel TV Guide application. Hopefully, it will now run without prompting you for any permission any more.
Step 11. You can make a direct shortcut to the Foxtel TV Guide application if you like, so you don't have to run "Java" and then select it manually any more. If you look at "selector.utf" again, there is a parameter "root=XXXX". In my case, the Foxtel TV Guide root is "s2_". It depends on which order you install your Java applications.
Using Resco File Explorer, copy the Java shortcut from \Windows\Start Menu\Programs\ and create a link "Foxtel" in the same directory. Then, tap-and-hold on it and choose "Properties", then the "Shortcut" tab. In the "target" field, append the string:
-run XXXX
where XXXX is the root of your Foxtel application. Don't forget to use a space to seperate "-run" from whatever comes before.
I hope this information is useful to someone. I tried following all sorts of tutorials for removing the permissions prompts, but most threads are focussed on Java Gmail/Opera applications, and they never worked for this Foxtel software. They key was, the Foxtel application installs itself in the "midp1" domain, and in order to change that to "tckmax", which is one extra byte, and I had to change the two-byte header of the file.
Edit: Addendum: The application looks like it'd be happier on a QVGA device, and I had some problems scrolling through the list of all channels in WVGA mode. It's more functional if I use WVGAFIX3 to set the resolution to VGA 480x640 before I run it.
I just installed this file: View attachment 156767 which allows me to watch foxtel on my xperia and also allows me to view the foxtel tv guide through telstra's business portal (free to browse) and set up programs to record on my IQ2.
Works like a charm.
Special thanks to thedeva who posted this file in another thread.
Thanks tls,
will add this to my shortcut list!
will this work if you're with a different mobile carrier other than telstra or does it use the telstra portal?
i had it working on '3'!
On a separate note, my JBlend got corrupted and im trying to figure out how to install/restore it.

Bluetooth Keyboard and custom key and character mapping

Some custom ROMs, which are not based on HTC roms, but compiled form Android Source support the Bluetooth HID profile, thus support well known and common normal Bluetooth keyboards.
I've tested Cyanogenmod and OpenDesire.
However, I was unsatisfied with the keyboard layout. I've found no key for return, needed some special 'Umlaute' for my German layout, etc.
Here's what I've found to fix all this:
1. Description what can be changed:
Android Open Source Project: Keymaps and Keyboard Input
Until now I don't know the internal differences between the key map and character map files. Sure, both look different, both can and must be changed for different reasons. The key map if you want to change actions and also alter phone buttons, the character map for modifying the full layout. But with the key map you could also alter parts of the layout, so it's not that clear for me. However.
2. Altering Key Map Layout
If you don't specify a keylayout file, Android will default to /system/usr/keylayout/qwerty.kl
Click to expand...
Click to collapse
So I took a look at this file, changed it, and it worked
Here a nice explanation of this file, explained are the different commands, too.
[GUIDE] How to Remap Hardkey Actions || Custom App Launching
What we not know, the key number of our physical BT keyboard, so what's the number of ESC? For this, I've found following site, which seems to contain the correct scan codes, used in Android: (note, the values are in HEX!!)
http://www.marjorie.de/ps2/scancode-set1.htm
So if we take a look at ESC:
Key: ESC Make: 01 --> in decimal, stays 01
We just have to add following line to the key map layout file:
key 1 BACK WAKE_DROPPED
and we have a back key.
3. Altering Character Map file
To change characters and change the whole layout, it seems as if we have to alter the character Map file. (/system/usr/keychar/qwerty.kcm.bin)
Sadly, this fact makes editing the file somehow difficult:
Resource Binary File Format
The file snippet above [see first link] gets converted to the following [a binary file] by the makekcharmap tool as part of the build process.
Click to expand...
Click to collapse
I have no idea what this tool is, nor how to revert it back, so we have to edit the binary file. Luckily, one user's done the hard work already, again:
Changing to a non-english keyboard layout [cupcake support]
The easiest method is to use some kind of hexeditor, so you see what you do and can enter the character code of special characters easily, I used the one in Notepad++
Then you can alter the layout just as you like. Because I have a special english keyboard with which I want to type german Umlaute, too, I changed
A.2.a.A.#..
to
A.2.a.A.ä.Ä.
So I can type an 'ä' by holding the 'Alt' key and pressing a. Typing 'Ä' by holding Shift+Alt and typing 'a'.
Unlimited possibilities
Tips:
To alter both files you can use ADB and an editor on your computer.
Or you can alter the files directly on the phone, without any additional hardware. You only need Root Explorer to open, change and save the files directly on the phone.
Drawbacks of changing the layout:
Haven't seen some yet

Are SSH RSA keys a system-wide thing?

Hello everyone. I'm not very experienced with Linux but have done some. I want to connect to my Tomato router using GScript and RSA keys. I generated keys with ConnectBot and I can connect to it from there fine, however when I try to connect from GScript using ssh -p port [email protected] 'command', I get an error about the host not being in the trusted hosts file. Is this because the RSA keys are not system-wide and GScript is not using what was created by ConnectBot, or is this a different unrelated problem? Any help would be great, thanks!
I really don't know where to start with this. I seriously recommend you read Wikipedia and experiment more with virtualized Linux computers (VMware Player or Oracle VirtualBox are good starts, running CentOS and Ubuntu).
RSA keys, as you're talking about at first, is the public key encryption scheme used to authenticate you to connect to your router, in this case. BUT. The keys you talk about in the second part? Those aren't keys. Your "trusted hosts file" is a list of unique fingerprints that an SSH server creates when it's first initialized, and are used to "sign" that it's the server you're connecting to.
For example, if every day you connect to the same server, and then suddenly one day, you get told that the fingerprints don't match, and you know that nothing has changed on the server end, it's a good chance that something got messed up, or that someone is attempting to perform some kind of a man-in-the-middle attack.
To get back to your question though, no, the Trusted Hosts file is not shared between ConnectBot and GScript. Odds are, ConnectBot isn't even sharing your SSH key (the RSA key) with GScript, and you haven't even gotten to that error yet. The SSH key can be system wide though (PROTIP: Just put it on the root of your SD card and load it into ConnectBot/GScript by manually adding the key file).
Thanks for your help. So basically I just want these two programs to share trusted hosts files and RSA keys. How does GScript initially come to trust a host, and how come ConnectBot didn't have this issue? I guess I could try to find the trusted hosts file ConnectBot is using, and can I move its key file to the root and then share it with GScript? Or do I need to make a new one (possibly in Cygwin on the desktop) and copy it over to the SD card.
I do plan to read more about this stuff, but that will happen in time. Right now I feel very close to accomplishing what I want (as you can probably tell by me posting this at 4:45 AM ).
Thanks again.
For the trusted hosts issue, you can't really share them, as there's no standardized format to the file (it's like trying to swap an MP3 and an AAC file; they both may be music, and they both may be of the same song, but they're quite different). There should be an option on the GScript error message to just add the host to the trusted list. If not, try running the same command from a terminal (ADB shell, or open ConnectBot and connect to local).
In regards to the key file, you'll just have to hunt down wherever ConnectBot placed it, and move it to the root of the SD card, then re-add it in ConnectBot (Press Menu and then Manage SSH keys to get to the key list. Menu again to select add/import).
Thanks. I'm having no luck finding ConnectBot's key file, so I just made a new one in Cygwin and will put it in my SD card. However I'm still not sure how to add/import that into GScript, or how to get GScript to trust that host (I don't see an option for it with the error message). These are questions I need to direct towards the GScript crowd, unfortunately its thread hasn't received much activity in awhile. Is there any other way you would go about saving a script to run from your home screen?

[DEV][HOWTO] How to decompile kcm.bin to remap keys properly.

Someone please explain how to properly decompile the kcm.bin so that it can be edited and recompiled. There are quite a few of us who would like to remap certain hardware buttons (mainly custom user keys) but just using the files from (this thread) leaves us with some broken keys, the "?" key mainly... but some would also like to tweak this layout and don't have a proper tutorial. I will gladly donate a minimum of $10USD to the first person who properly explains the process for both *nix and windows environments.
This is another approach.
(If you have already read this and it is not the way you want it, I am sorry)
According to http://forum.xda-developers.com/showthread.php?t=1285244&page=3
In short:
# Remount
adb shell
su
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# fetch Keylayout
adb pull /system/usr/keychars/vision-keypad-wwe.kcm.bin /tmp/vision-keypad-wwe.kcm.bin
# edit Keylayout according to Thread above with a hex editor
For example A 2 a A ! ! that represents:
A: Scancode
2: Does not matter
a: Letter when button connected to the keycode is pushed
A: SHIFT + button connected to the keycode is pushed
!: ALT + button connected to the keycode is pushed
!: SHIFT + ALT + button connected to the keycode is pushed
(for me ALT = FN)
# push it back
adb push /tmp/vision-keypad-wwe.kcm.bin /system/usr/keychars/vision-keypad-wwe.kcm.bin
The first line in every row is the constant value of the keycode.
For example: http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_A
For Button A it is: 29 in decimal, 1D in hex.
With this approach you can change every key, but only the printable characters.
Search button will not work, as it is implemented in another way...
ok, not sure if I missed something, but specifically I need to modify the ? key and the 3 user assignable keys on the g2/dz keyboard... I don't see in the hex editor any line that starts with the ? symbol then has a number and two more chars/symbols after the number (ie: A 2 a A ! ! )
when I load keynumber tracker app the ? key reports "214" the user assignable keys report 183, 184 and 185... I'm just not sure what to do with those numbers, or how they help me modify anything...
I guess I just don't understand what I'm doing...
Ok, so I noticed in hex editor that the only difference between the modded kcm.bin and the stock one where my ? key works (besides the remapped keys) was the last 64 blocks of hex so I copy /pasted that part to the modded kcm.bin then saved and pushed... Now it's working, thanks so much, will PM you momentarily to get your paypal addy. Sooooo happy!!!
Edited w/ a cold press a CNC and a water jet @ 30,000PSI.

entering text issues

every time I try to enter a number/letter combination on any browser windows it won't let me enter certain characters and just erases it. I have to enter a space, the letter or number and then go back and erase the space. it's so annoying
second if I'm on certain webpages trying to enter text I have to automatically enter a space as opposed to it happening automatically. soitbasicallywouldlooklikethisifIdon'tpressthespacemanually
third and other issue is with stored user names .. if I enter the first letter it brings my name in a drop down box. if I tap it the username and all text I type gets entered so I have to go in and delete the first few characters which is annoying. anyone have any ideas? it's been a problem since the first OTA and tmobile sucks at technical assistance since everything they have had me do has failed

Categories

Resources