maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   New Working Xkbd Keyboard (https://talk.maemo.org/showthread.php?t=18107)

Addison 2008-03-20 02:34

New Working Xkbd Keyboard
 
1 Attachment(s)
Greetings everyone.

I managed to put together a perfectly working virtual keyboard that......................................
wait for it, wait for it................................... doesn't crash! :D

To launch it from the left side the command is:
xkbd -geometry +65536+65536 -k /media/mmc2/x.xkbd

To launch on the right side it's:
xkbd -geometry +722+65536 -k /media/mmc2/x.xkbd


Okay, most likely the first time it fires up, the Upper and Lower cases will be backwards when typing.

If so, press the Caps Lock once (it's just below the red Backspace key) and then close Xkbd.

The next time Xkbd launches, everything should be fixed from then on and you won't have to do this ever again.

My apologies for this keyboard being very minimalist, with not that many keys supported, but it's all that I really need and I like the perfect layout.

Anyway, this was tested on a N800 using the latest 2008 OS.

Post any feedback if needed.

Cheers. :D

Here's a screenshot:
http://img442.imageshack.us/img442/8965/monopolysi5.png

Grab ArnimS's latest Xkbd version from his site:
http://pupnik.de/xkbd.html

And here's the keyboard layout file:
Attachment 1194

b-man 2008-03-20 03:50

Re: New Working Xkbd Keyboard
 
1 Attachment(s)
Sweet! now i can use dosbox and qt4 correctly! Betwean that command and the personal menu app i can now easily gain acsess to the modified app by simply putting the command in on the personal menu settings window, select a icon and, putting in a name!
If you allrety have the personal menu app enjoy!
here's my example-


to simplify things, just go to this URL and install personal menu:http://garage.maemo.org/projects/personal-menu/
Then go to control panel> personal menu> add> put name >put in command> select icon> ok.

coffeedrinker 2008-03-20 04:01

Re: New Working Xkbd Keyboard
 
What did you have to change to get it working?

b-man 2008-03-20 04:15

Re: New Working Xkbd Keyboard
 
1 Attachment(s)
here's one more example:

b-man 2008-03-20 04:20

Re: New Working Xkbd Keyboard
 
I had to do almost nothing really, i just put in the command that was provided from the post in the command to execute bar so it runs as an executable, then select a name and icon.

coffeedrinker 2008-03-20 05:30

Re: New Working Xkbd Keyboard
 
Oh, I was referring to issues regarding corrupt input.

Addison 2008-03-20 06:37

Re: New Working Xkbd Keyboard
 
Quote:

Oh, I was referring to issues regarding corrupt input.
Hey coffeedrinker. If you're curious about how I got around the corrupt input, you can check out the post I made over in the "Games that work well with Dosbox" in the gaming forum.

Hope that answers your question.

qwerty12 2008-03-20 16:45

Re: New Working Xkbd Keyboard
 
I know you said you would create a seperate keyboard for the missing keys but is it possible to add the ESC & Function Keys onto this keyboard & A ALT that isn't the caps lock?

I wouldn't mind it on a seperate keyboard but you need to have the same xkbd session to use key sequences. Unless you are duplicating keys?

Thank you.

Addison 2008-03-20 21:01

Re: New Working Xkbd Keyboard
 
Quote:

I know you said you would create a seperate keyboard for the missing keys but is it possible to add the ESC & Function Keys onto this keyboard & A ALT that isn't the caps lock?
Understand that the actual program for Xkbd is still broken.

Until there's a fix for it or until the next release of the 2008 OS doesn't corrupt whatever is going on, this keyboard layout is just a work around cheat that avoids it from crashing.

I think I've managed to hard reset my tablet about 50 times lately because of the constant crashing. Since using this latest keyboard, it's down to none. :)

Anyway, the "trick" that I used to avoid Xkbd from crashing looks like it's not compatible with generating an "ALT a", just a capital "ALT A". I'm not too sure if this can be corrected, sorry.

I'll give it a look and see if there's a way for this to happen but it doesn't seem likely. The only solution that I can think of right now would be to create a whole new key for that.

I know the keyboard is small, if any of you want it so that it takes up a bigger chunk of screen real estate, I'm certainly open to suggestions.

Well, I'm currently looking into other options right now, the most likely of cases is to add a second keyboard.

It won't happen today. Thursdays are date night with the wife. *shivers* :D

qwerty12 2008-03-20 21:07

Re: New Working Xkbd Keyboard
 
Ah, I see..

I cant complain, we actually have a working keyboard thanks to you! :)

Hehe, my parents are probably the most unromantic couple :D

OSEmuTech 2008-03-20 21:11

Re: New Working Xkbd Keyboard
 
Hey Addison. Great job! :)

Grrr ... of all days to forget my charger at work. Probably have an hour left of charge. :mad:

I'll try to work on an updated keyboard in the next week unless someone else does it first.

http://fkwjcw.bay.livefilestore.com/...8w/twoxkbd.png

Addison 2008-03-20 21:35

Re: New Working Xkbd Keyboard
 
http://fkwjcw.bay.livefilestore.com/...8w/twoxkbd.png

Mine's bigger than yours, or at least longer, not that I'm implying anything of course. :p

Yeah, I was going to fix yours as well but I wasn't sure how you wanted to do the layout since you'll have to remove the "Shift key" since it will crash Xkbd.

Hopefully it's not too inconvenient to use the Caps Lock button, but at least we finally have something now, so I'm happy. :)

qwerty12 2008-03-20 21:38

Re: New Working Xkbd Keyboard
 
Quote:

Originally Posted by Addison (Post 157955)

Mine's bigger than yours, or at least longer, not that I'm implying anything of course. :p

Lmao, lol why not produce a collaboration likee with the old layout :)

OSEmuTech 2008-03-20 22:54

Re: New Working Xkbd Keyboard
 
Mine was too big, so I reduced it from 12 points to 10 points. :p

It was over the edge of the menu bar. Maybe 11 point would have been the perfect fit.

I'll try to get around to messing with things soon. If anything, I'll have Tuesday off. One thing that would be nice is to keep the minimize keyboard key (>>).

Addison 2008-03-21 00:16

Re: New Working Xkbd Keyboard
 
Quote:

Mine was too big, so I reduced it from 12 points to 10 points.

It was over the edge of the menu bar. Maybe 11 point would have been the perfect fit.

I'll try to get around to messing with things soon. If anything, I'll have Tuesday off. One thing that would be nice is to keep the minimize keyboard key (>>).
Hey OSEmuTech!

First, a quick suggestion.

Don't bother with trying to figure out the correct font size, there's a better way of doing this without pulling out your hair.... You do still have some left don't ya? :D

There's a height and width command that you can place at the end of your keys.

So for example:
default a
default_ks A
shift A
shift_ks A
obey_capslock yes
height 28
width 26


You don't need to do the width and height for every key, but at least do it for the first row and see what happens.

If that doesn't work for all they keys, then also add that on the last row of your keys as well. This way it will force them to appear all the same. :)

And yeah, I totally agree that there should be a Minimize button which mine doesn't have.

The thing is, if you close out Xkbd with the Caps Lock on, for some reason, that flag carries over to the next time you fire up Xkbd, meaning that the Upper and Lower cases will be reversed each and every time.

So I can't use the "Shift Minimize" key to exit Xkbd since that will drive people nuts always having the keys being typed going back and forth from default Upper case then to default Lower case, then back again.

I also don't want to burn an extra button just to add the Minimize feature, space is severely limited.

So I'm a little stuck on this at the moment and I'm not too sure what to do here.

Is there another way to kill Xkbd like Ctrl or Alt something?

Thanks.

OSEmuTech 2008-03-21 01:00

Re: New Working Xkbd Keyboard
 
Quote:

Originally Posted by Addison (Post 158026)
Hey OSEmuTech!
There's a height and width command that you can place at the end of your keys.

You do still have some left don't ya? :D

Is there another way to kill Xkbd like Ctrl or Alt something?

1. I took out the height\width lines to make each key resizable (based on font size) and prevent the "ugliness" you commented on in an earlier "build" of my extended keyboard layout where the divisions did not line up.

2. I have some hair left. I did get a buzz cut on Tuesday though, so it's even less than usual. http://www.mysmiley.net/imgs/smile/r...olleye0004.gif

3. How to kill xkbd?

Where you have

key_1
Key_a "key 49"


put

key_1 "key 49"
key_a "key 97"


:D

Addison 2008-03-21 05:18

Re: New Working Xkbd Keyboard
 
Dude, you're too funny!

Well, it turns out that Dosbox goes into tetanus if you minimize the keyboard then bring it back up. Only way to get control back is to power down the tablet.

I thought perhaps it was the goofy "geometry +65536+65536" setting, but after trying "geometry +1+1" I got the same results.

I tried doing the minimize outside of Dosbox and it works just fine, so not too sure what's going on there. But for now, unless you can find a solution, it doesn't look like minimizing the keyboard is going to be an option within Dosbox.

And just to let you know, there's no competition here with both our ideas on how to do the layout for the keyboard.

If anyone is excited about seeing your revised version, come Tuesday or whenever, it's definitely me. I'd really like to see what your next take is going to be.

Cheers bud. :D

qwerty12 2008-03-21 07:54

Re: New Working Xkbd Keyboard
 
Beat 18 points! :P. No wait...

Nah, I just wanted to say to Addison, you know you were saying about two keyboards running with DosBox?

It can be done quite easily. I only play monopoly on DosBox anyway. (Thanks Addison! :D)

Edit /usr/bin/dosboxkbd as root. The next time you start DosBOX, it will start your 2 keyboards automatically.

I commented out the existing xkbd line. Which loads the default xkbd keyboard that dosbox uses and I put in lines for the keyboard:
Here is how my dosboxkbd looks like:
Quote:

#!/bin/sh
xkbd -geometry +65536+65536 -k /usr/share/xkbd/x.xkbd &
xkbd -geometry +722+65536 -k /usr/share/xkbd/m.xkbd
#xkbd -geometry +1+60 -k /usr/share/dosbox/dosbox.xkbd # the standard keyboard that runs usually when you run dosbox

Addison 2008-03-21 21:15

Re: New Working Xkbd Keyboard
 
Thanks a bunch qwerty!!!

Yeah, I caught your previous post the other day on chaining two commands together. I tried using that last night and it works out great!

Dosbox will open both keyboards and close them both when exiting.

So I'll be putting together a left and right side keyboard for Dosbox.

For stuff outside of Dosbox, I'll make another double keyboard that will cover the left and top side tool bars on the Nokia screen with a minimize option.

It should be a good setup if I get it right.

Still haven't figure out a way to do a lower case "Alt a" though. By the way, I've never used the Alt button in my life, so just curious, what do you need that for anyway?

Thanks again!

qwerty12 2008-03-21 21:24

Re: New Working Xkbd Keyboard
 
Quote:

Originally Posted by Addison (Post 158503)
Thanks a bunch qwerty!!!

Yeah, I caught your previous post the other day on chaining two commands together. I tried using that last night and it works out great!

Dosbox will open both keyboards and close them both when exiting.

So I'll be putting together a left and right side keyboard for Dosbox.

For stuff outside of Dosbox, I'll make another double keyboard that will cover the left and top side tool bars on the Nokia screen with a minimize option.

It should be a good setup if I get it right.

Still haven't figure out a way to do a lower case "Alt a" though. By the way, I've never used the Alt button in my life, so just curious, what do you need that for anyway?

Thanks again!

Great! :)

Come think of it, I think you are right. I've only used alt in dos apps and not games. I think i'm being picky - sorry :).

I don't actually mind the layout. For keys i need, I load matchbox kbd from cpu applet and close when finished. I don't think that works for fast action games but I don't have any :p!

Thanks :)

Pushwall 2008-03-21 21:31

Re: New Working Xkbd Keyboard
 
FWIW, I think some of the old DOS games used Alt-S for saving a game, Alt-L for loading a saved game, and Alt-Q or Alt-Esc to quit a game....or something like that.

OSEmuTech 2008-03-21 21:45

Re: New Working Xkbd Keyboard
 
Almost everything in Windows 3.x needs the alt key for menu selection (Alt-F for file, Alt-X for exit, etc.). Especially as the mouse is messed up under Windows on DOSbox.

Addison 2008-03-22 00:23

Re: New Working Xkbd Keyboard
 
Quote:

Almost everything in Windows 3.x needs the alt key for menu selection (Alt-F for file, Alt-X for exit, etc.). Especially as the mouse is messed up under Windows on DOSbox.
Now is that Alt-F, Alt-X, etc. or Alt-f and alt-x?

Sorry, I'm not understanding if they need to be capital letters or just normal, lower case letters.

Thanks.

OSEmuTech 2008-03-22 00:31

Re: New Working Xkbd Keyboard
 
I wasn't thinking (anyone wouldn't know). :p

lower case. i.e. alt-f, alt-x.

Addison 2008-03-22 01:20

Re: New Working Xkbd Keyboard
 
Oh hey OSEmutech, I think I found something that you might find interesting.

When trying to look through the source code, I stumbled upon this:

Quote:

mod <text>

Defines a second alternative text string to be displayed. The mod option
exists to make it easy to define smaller keyboards with more
options per key.

mod_ks <XKeysym>

The keysym to be sent when the 'mod' button is pressed.
If I'm reading this correctly, it looks like it's possible to have three layers of keys using this method.

I don't know how to set up a modifier key though.

Actually, come to think of it, I don't know how to set up a lot of keys.

Where can I find all the keys that Xkbd supports along with the command that goes with them? I'm not finding it in the source code for some reason.

Here's the website:
http://handhelds.org/~mallum/xkbd/

OSEmuTech 2008-03-22 01:31

Re: New Working Xkbd Keyboard
 
I was thinking that mod key was used for either CTRL or ALT + key signals.

That was the site I got my information from and I believe it is the final resting place of the formally abandoned xkbd project.

BTW: I used Scratchbox running on andLinux to test out my layout as I made changes to it.

I'll be taking a look at things Tuesday hopefully.

Addison 2008-03-22 08:13

Re: New Working Xkbd Keyboard
 
Quote:

I was thinking that mod key was used for either CTRL or ALT + key signals.
Hey Tech!

Actually, I think you're wrong on this.

Just looking at the fr_FR.azerty.xkbd design, from that website I posted earlier, here's a part of the coding inside of it:

Quote:

<key>
default Mod
default_ks !Mod
</key>
It looks like the Mod button has it's own special key.

If that's true, then you're looking at an extra level in keyboard design. :D

Anyway, I need that list of all the keys supported with Xkbd. Until then, my hands are tied.

It shouldn't be this hard looking for what commands it needs for certain keys. I'm just not finding it anywhere.

Right now, I need to know what to enter in for the values of these special keys:

Insert
Home
Page Up
Delete
End
Page Down
Cursor key up
Cursor key left
Cursor key down
Cursor key right
Print Screen (Not sure if that's even necessary)
Sys Rq (No clue what this button even is)
Scroll Lock
Pause
Break
Num Lock (I think this key is expendable, just curious if it's supported though)


There's also three other keys that I'm looking at, here at home, on my keyboard.

There's something between the Ctrl and Alt key (on the left side of the space key), it looks like there's some kind of Windows graphic on it.

It's also on the other side of the Alt key followed by this weird graphic with a cursor on it next to the Ctrl key, on the right side of the space key.

So yeah, those are all the keys I don't know how to enter in with the Xkbd format.

Any help on this from anyone and you'll see some good results with your response.

Thanks. :)

ArnimS 2008-04-02 04:12

On-Screen Keyboard - Transparent and readable
 
On-Screen Keyboard (edit *mockup*) - Transparent and readable

http://pupnik.de/transp_keybd_Nokia_770.jpg

It can be done, even with a full keyboard layout....

Requires some deep magic to draw on top of any displayed app, irrespective of 'on top' or fullscreen status. Either xshp xshape extension or a direct to framebuffer draw hack.

chrisak 2008-04-02 05:27

Re: New Working Xkbd Keyboard
 
Just curious, what game is pictured in the post above? Thanks! <smile>

Bundyo 2008-04-02 05:34

Re: New Working Xkbd Keyboard
 
Ultima 8 .

GeraldKo 2008-04-17 20:43

Re: On-Screen Keyboard - Transparent and readable
 
Quote:

Originally Posted by ArnimS (Post 163736)
On-Screen Keyboard (edit *mockup*) - Transparent and readable

It can be done, even with a full keyboard layout....

Requires some deep magic to draw on top of any displayed app, irrespective of 'on top' or fullscreen status. Either xshp xshape extension or a direct to framebuffer draw hack.

ArnimS, this would be awesome. (Heck, even something that size but not transparent, if it could be minimised, would be great.) Any progress?

macr0t0r 2008-04-19 06:03

Re: New Working Xkbd Keyboard
 
Hmmmmm...for some reason I can't shake the "caps" problem. It writes capitols no mater what the mode of the caps key. I tried multiple times to open it, press caps once, and close it, but the problem persists. Currently it's impossible for me to type a lower-case letter. Any suggestions on how I should debug this? I'm using the default x.xkbd file on the left side on an N800 with Chinook installed.
- Jim

Addison 2008-04-19 13:40

Re: New Working Xkbd Keyboard
 
Quote:

Hmmmmm...for some reason I can't shake the "caps" problem. It writes capitols no mater what the mode of the caps key. I tried multiple times to open it, press caps once, and close it, but the problem persists. Currently it's impossible for me to type a lower-case letter. Any suggestions on how I should debug this? I'm using the default x.xkbd file on the left side on an N800 with Chinook installed.
Hey Jim!

No idea what's going on at your end to be causing you such trouble.

What application are you using?

The trick with this new layout makes it so that a lower case letter is actually a shifted upper case one, somehow most programs don't get weirded out by that.

Well, I just caught last night that there's a typo with the letter "x" and I've got another keyboard that has three layers to it that I also did a few small boo boos to.

I'll try to post those fixes either tonight or tomorrow when I get the chance.

suitti 2008-04-19 14:39

Re: New Working Xkbd Keyboard
 
Peronal menu requires libglade. Missing dependency.

macr0t0r 2008-04-19 22:52

Re: New Working Xkbd Keyboard
 
Hmmm....I tried it with Osso-Term, Fennec, and the built-in Instant Messenger. No Dice. I got capitol letters no matter what mode I was in. However, the pop-up keyboard has no issues and my Bluetooth keyboard has no issues. Is Xkbd only good with apps that do NOT implement the pop-up keyboard?

Anyhow, this is still useful for me. I only need caps for Crosswords and Dos apps. However, it appears that Fennec (Firefox 3) won't be much use without my BT keyboard. Thanks for porting this!

- Jim

macr0t0r 2008-04-20 05:58

Re: New Working Xkbd Keyboard
 
Huh...I fixed the problem by changing the x.xkbd file. Each letter use to say this:
<key>
default a
default_ks A
shift A
shift_ks A
obey_capslock yes
width 26
</key>

I changed the default_ks for each letter to be lower-case:
default_ks a

Now everything works as expected. Methinks the s.xkbd file I downloaded from the site was hard-coded for caps.

This is a sweet little app. Does everyone know that sliding up on your stylus will make the letter capitalized? A pity I can't change the Hildon environment to push the windows to the left side so I can just leave xkbd on the right. Thanks for making this!

- Jim


All times are GMT. The time now is 10:25.

vBulletin® Version 3.8.8