# [HELP]Want to write my own keyboard layout



## VolcanicSkunk (Oct 20, 2011)

I want to write my own custom keyboard layout for my BT keyboard and had some questions. I already have the keytest.apk installed and know what keys I want to assign and their corresponding numbers. My questions begin with, do I have to build the .kl file in eclipse? Or is it just a text file saved as a .kl? Also, what would I name the .kl file to be recognized by the keyboard?

I have tried to find the keyboard layout that works with my keyboard, but I can't find a layout that corresponds to the numbers that I have listed with their respective keys. So any help with this is greatly appreciated!


----------



## Sleeepy2 (Jan 20, 2012)

I just copied the generic one, changed my key commands and renamed it what the Touchpad thought my keyboard was. It is just a simple text file.

Sent from my Galaxy Nexus using RootzWiki


----------



## VolcanicSkunk (Oct 20, 2011)

@Sleepy2 Thanks for the quick reply! I got everything working except when trying to use one of the keys as a home key. I have every other button I have a key number for (a couple don't give me a key number) working great! I just can't seem to get that one. Here's what my home key line looks like:

```
<br />
key 117	   HOME		  WAKE_DROPPED<br />
```
I have it set up this way so that way I can wake it with this key as well as use it to go home.

Totally stumped on this one. But not a huge deal at this point since the back key I set up works fine. I would really prefer not having to close out apps when I just want to go back home for a second.

Better yet! Is there a way to set up a key to bring up the recent apps list? That would be ideal!


----------



## Sleeepy2 (Jan 20, 2012)

I don't have my TP with me right now so I can't check. I seem to remember having the same kind of problem and I think I might have just changed it to WAKE and not WAKE_DROPPED.
I will try to take a look when I get home.
For the recent apps list, when I did my keyboard layout I was on GB so that didn't exist. I haven't had time to check with the new ICS if there is a command for it. If I find it I will let you know.

Just some quick searching and APP_SWITCH may be the command.



```
[/size][/color]
[color=#000000][size=2]key [color=#006666]117[/color]    APP_SWITCH           WAKE_DROPPED[/size][/color]
[color=#000000][size=2][/CODE[/size][/color]
```


----------



## bobloblaw1 (Jul 2, 2011)

Would one of you guys mind posting your config file for the Touchpad keyboard? I'll give it a day or so and then do it myself if no one bites...but I'd like to avoid duplicating efforts.

Thanks in advance.


----------



## VolcanicSkunk (Oct 20, 2011)

Here is the keyboard layout I came up with for my HP Touchpad BT keyboard. The only thing that doesn't work on the keyboard is the keyboard key, and brightness up/down. They didn't have an assigned key number for some reason. They work fine in WebOS, but when I was testing all the keys in Android they wouldn't show a key number. Not sure what the issue is with those, but it isn't a deal breaker for me. Also, the Home key isn't working still (and haven't had time to try out APP_SWITCH yet), but it does wake my Touchpad. So overall it is pretty complete.


----------



## Sleeepy2 (Jan 20, 2012)

Each keyboard probably has its own key code so 1 may not work for the other

Sent from my Galaxy Nexus using RootzWiki


----------



## bobloblaw1 (Jul 2, 2011)

Sleeepy2 said:


> Each keyboard probably has its own key code so 1 may not work for the other
> 
> Sent from my Galaxy Nexus using RootzWiki


As long as the keyboard is of the same make and model it should have the same key codes.

It seems APP_SWITCH is the right command. I still haven't been able to get it working right however. I've used both a custom config file and tried to edit the qwerty.kl file. Back to the drawing board.

EDIT: So I thought I had something here with getting the APP_SWITCH command to work. Anyway, I tried editing the framework file and it was a no go....please feel free to try.


----------



## Sleeepy2 (Jan 20, 2012)

Yeah I have it almost working also. It shows the old App switcher and not the new one. I keep looking into it.


----------

