Keyboard support?

Subforum for discussion and help with ScummVM's Nintendo Wii port

Moderator: ScummVM Team

User avatar
dhewg
ScummVM Porter
Posts: 169
Joined: Wed Jun 04, 2008 8:41 pm

Post by dhewg » Tue Feb 17, 2009 12:57 am

hi brijohn,

i didn't want to strip the loading of keymaps off a FS altogether, my idea was to integrate the most common ones and add that possibility later on again. I compared some existing implementations, and i liked the *BSD code, so I just committed another bunch of changes, which does use much BSD code. The lib now allows stacked maps, meaning that every map is based on the US layout and thus the compiled size is as small as it gets. It also allows a "user" keymap, that can be used for external maps later on.

I also found out that there is a country code of a USB HID
descriptor. The BSDs are using that, and those matches exactly the keymaps i re-used :) That would make a better default like i currently use (with the issues involved like you mentioned).

There're many other features in there, most of them unused atm (like support for dead keys).

And you're right about the shift+key repeating issue, thats still present on my code. Thanks for explaining.

I really like the integration of libwiikeyboard into libogc. To avoid double work, what do you think about access to my git repo? You could just work on your own branch and we can simply merge back and forth...

EDIT: some stats:

Code: Select all

powerpc-gekko-size lib/wii/libwiikeyboard.a
   text    data     bss     dec     hex filename
   3403       4       0    3407     d4f usbkeyboard.o (ex lib/wii/libwiikeyboard.a)
   2720       8      40    2768     ad0 keyboard.o (ex lib/wii/libwiikeyboard.a)
   6754       0       0    6754    1a62 ukbdmap.o (ex lib/wii/libwiikeyboard.a)
   3197     774       4    3975     f87 wskbdutil.o (ex lib/wii/libwiikeyboard.a
thats not bad at all with all those keymaps methinks :D

Maxrunner
Posts: 29
Joined: Sun Mar 30, 2008 7:48 pm

Post by Maxrunner » Tue Feb 17, 2009 1:12 pm

Using the virtual keyboard when i press enter it just appears [Enter] issnt it supposed to activate the previous input command, like a normal keyboard.?

User avatar
Bossk
Posts: 107
Joined: Mon Nov 03, 2008 2:15 pm

Post by Bossk » Tue Feb 17, 2009 1:19 pm

No, you enter the sequence of keys you want and dismiss the vkeybd.

Maxrunner
Posts: 29
Joined: Sun Mar 30, 2008 7:48 pm

Post by Maxrunner » Tue Feb 17, 2009 1:23 pm

Bossk wrote:No, you enter the sequence of keys you want and dismiss the vkeybd.
oh, so lets say im playing the old kings quest, i call the virtual keyboard and when i press the keys they appear in the text box of the game right???

Maxrunner
Posts: 29
Joined: Sun Mar 30, 2008 7:48 pm

Post by Maxrunner » Tue Feb 17, 2009 3:11 pm

Also do i have to unzip the files vkeybd.zip(this one dont according to brijohn) and scummmodern/classic.zip???

User avatar
Bossk
Posts: 107
Joined: Mon Nov 03, 2008 2:15 pm

Post by Bossk » Tue Feb 17, 2009 3:16 pm

No. You keep the files as released.
Don't unzip, just put it in the correct location on your SD card (/apps/X for HBC).

Maxrunner
Posts: 29
Joined: Sun Mar 30, 2008 7:48 pm

Post by Maxrunner » Tue Feb 17, 2009 3:20 pm

Bossk wrote:No. You keep the files as released.
Don't unzip, just put it in the correct location on your SD card (/apps/X for HBC).
Yes, i also have a scummvm folder in the root where i put the games. Using sam and max cd game it seems i when i quit it just hangs...

User avatar
Red_Breast
Posts: 785
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast » Tue Feb 17, 2009 4:40 pm

Maxrunner wrote:
Bossk wrote:No. You keep the files as released.
Don't unzip, just put it in the correct location on your SD card (/apps/X for HBC).
Yes, i also have a scummvm folder in the root where i put the games. Using sam and max cd game it seems i when i quit it just hangs...
Try the USB key/b 'Esc' key to quit.
If you're asking do you put the zips in the ScummVM folder on the root of your SD card then no.
Leave the zips in apps/scummvm folder where the boot.dol is.

Maxrunner
Posts: 29
Joined: Sun Mar 30, 2008 7:48 pm

Post by Maxrunner » Tue Feb 17, 2009 5:36 pm

Red_Breast wrote:
Maxrunner wrote:
Bossk wrote:No. You keep the files as released.
Don't unzip, just put it in the correct location on your SD card (/apps/X for HBC).
Yes, i also have a scummvm folder in the root where i put the games. Using sam and max cd game it seems i when i quit it just hangs...
Try the USB key/b 'Esc' key to quit.
If you're asking do you put the zips in the ScummVM folder on the root of your SD card then no.
Leave the zips in apps/scummvm folder where the boot.dol is.
Does that work with the virtual keyboard?

User avatar
Red_Breast
Posts: 785
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast » Tue Feb 17, 2009 5:48 pm

Maxrunner wrote: Does that work with the virtual keyboard?
I don't know. The time between virtual and physical support was short and I was busy at the time so I've hardly used it.

Maxrunner
Posts: 29
Joined: Sun Mar 30, 2008 7:48 pm

Post by Maxrunner » Wed Feb 18, 2009 9:24 pm

i have a usb pen but it doesnt seem to be detected.

User avatar
Red_Breast
Posts: 785
Joined: Tue Sep 30, 2008 10:33 pm
Location: The Bar Of Gold, Upper Swandam Lane.

Post by Red_Breast » Wed Feb 18, 2009 11:05 pm

Maxrunner wrote:i have a usb pen but it doesnt seem to be detected.
It might be that your pen is old (USB 1.0 or 1.1) maybe and that the Wii is USB 2.0 and isn't backward compatible.
Are you looking as far as you can to the top of the 'tree' where SD comes under fat, USB under usb and DVD under dvd.

Jaffacakelover
Posts: 3
Joined: Sat Jul 04, 2009 6:51 pm

Post by Jaffacakelover » Sat Jul 04, 2009 7:15 pm

I have created a more Wii-looking Bitmap set for the Virtual Keyboard:
Image

http://www.freewebs.com/mwojm/vkeybd_default_jcl_v1.zip

Rename to vkeybd_default.zip and overwrite original to use (backup original first!)


Been looking at the code; here start the questions/feedback... :?

* Is there a way to have 2 modifiers on the same key? Looking for a method where pressing the shift key will set the display to 'uppercasesymbols' and use the modifier, the switch back to 'lowercasesymbols' once an alphanumeric key is picked!

* Related to above, why the symbols key? Would save a lot of code to just have the symbols appear when you press shift/Caps lock!

* Can the font in the textbox be made bigger? Can the brackets around the alphanumeric keys in this textbox be removed? Is the code for all this in the XML file or elsewhere?

* Can the red SCUMMVM cursor be used on the vkeybd instead of the SCUMM crosshairs?

* Can backspace do what it says instead of typing [backpace]?

*Closely related to the previous question, is it possible to call what's already in a clicked-on box into the textbox (eg. clicking on a named save game)?


Feel like i've kicked your sandcastle down now, but that's not what i'm aiming for: Love being able to play these games on Wii! :D

(I didn't even ponder a movable I-Bar... drat!)

User avatar
MusicallyInspired
Posts: 992
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Post by MusicallyInspired » Sat Jul 04, 2009 8:09 pm

I second all these feature requests. And I love the new keyboard bitmap!

User avatar
sev
ScummVM Lead
Posts: 1967
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev » Sat Jul 04, 2009 8:09 pm

Jaffacakelover wrote:Been looking at the code; here start the questions/feedback... :?
Yay! Those are really nice questions. DJWillis and me will be happy to work on them, as this is the first real feedback on the current code. Super!

First, your keyboard is just lovely. Would you like to let us incorportate is as a default one? (under GPL).
Jaffacakelover wrote: * Is there a way to have 2 modifiers on the same key? Looking for a method where pressing the shift key will set the display to 'uppercasesymbols' and use the modifier, the switch back to 'lowercasesymbols' once an alphanumeric key is picked!
Do you mean that you want alphanumeric keys to turn uppercasesymbeols off?
Jaffacakelover wrote: * Related to above, why the symbols key? Would save a lot of code to just have the symbols appear when you press shift/Caps lock!
It is up to a keyboard designer. You can do that in XML.
Jaffacakelover wrote: * Can the font in the textbox be made bigger? Can the brackets around the alphanumeric keys in this textbox be removed? Is the code for all this in the XML file or elsewhere?
Yes. Though probably for the flexibility it would be good to introduce another property keyword. Currently it is done in code.

As of the brackets, we need to come with a proper approach to this, I would use some special gfx to split the keys, which will take minimal space. One thing which comes to mind is use underline or draw a border around single key. We need to discuss it.
Jaffacakelover wrote: * Can the red SCUMMVM cursor be used on the vkeybd instead of the SCUMM crosshairs?
It is a good request and is easy to implement.
Jaffacakelover wrote: * Can backspace do what it says instead of typing [backpace]?
Actually there has to be another backspace key which will remove last key in the keyboard instead of generating backspace event.
Jaffacakelover wrote: *Closely related to the previous question, is it possible to call what's already in a clicked-on box into the textbox (eg. clicking on a named save game)?
As I assume, next thing which will be needed is editing capabilities in the textbox? Currently if this request is implemented, you will be able only to modify the tail characters.
Jaffacakelover wrote: Feel like i've kicked your sandcastle down now, but that's not what i'm aiming for: Love being able to play these games on Wii! :D
In fact this is really really nice, as I've mentioned. However, scummvm-devel is much more suited for this discussion (unless other forum lurkers will participate, in which case we'd better switch to General Forum and a separate thread).


Eugene

Post Reply