ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Wii Port > Keyboard support? Goto page Previous  1, 2, 3, 4, 5, 6  Next
Keyboard support?
  Author    Thread Reply to topic
Mr_Nick666



Joined: 11 Apr 2007
Posts: 146
Location: Bideford, Devon, UK
 

Red_Breast sums it up nicely Wink Ive seen calls for USB Mouse support now (personally I dont see the need when the Wiimote makes a perfectly good mouse substitute and is just as accurate) do you think it will be added?

 Reply with quote  
Post Sun Feb 01, 2009 6:50 pm 
 View user's profile Send private message Visit poster's website
brijohn



Joined: 25 Jan 2009
Posts: 16
 

quote:
Originally posted by Mr_Nick666
Ive seen calls for USB Mouse support now (personally I dont see the need when the Wiimote makes a perfectly good mouse substitute and is just as accurate) do you think it will be added?


Not by me since I agree that we already have a perfectly good pointer device in the form of the wiimote.

However I am in the process of adding key-mapping support into libwiikeyboard. When i get this finished it will allow you to use different keyboard layouts. This will allow you to use it with non US keyboards that have the keys in different places.

Except for the US layout, which is built into the library and is the default, all keymaps will be loaded off of an SD card from the directory /keymaps. In the root of your Sd card you simply have to put a file called kbd.map whcih contains a single line specifying the name of the mapping to use. So if you want to add a German layout you create a keymap file called de.map and stick it under your keymaps directory and then edit the kbd.map file so the first line says de (the map suffix is appended automatically)

When I finish this up and do some testing I'll post an updated version of scummvm using the new libwiikeyboard library.
 Reply with quote  
Post Sun Feb 01, 2009 9:20 pm 
 View user's profile Send private message
Red_Breast



Joined: 30 Sep 2008
Posts: 785
Location: The Bar Of Gold, Upper Swandam Lane.
 

Well yesterday (Sunday) not having much to do I thought I'd try some games with the Keyboard build.
I started with Indy4 Atlantis but that's as far as I got.
I'd forgotten what a gem of a game it is and ended up playing it to completion via the Fists route.
I can report that the keyboard works fine.
As for mouse. Don't know. Are there any games that need such pinpoint precision? Maybe. Probably.
It wasn't until yesterday when my Wiimote batteries went, and I was trying to find 2 more, that I found out that my Wavebird can be used. I guess it's a given really.
The Wavebird seemed better for moving the mouse cursor around the screen but the Wiimote was better for actually placing it, if you know what I mean?

 Reply with quote  
Post Mon Feb 02, 2009 12:31 pm 
 View user's profile Send private message
brijohn



Joined: 25 Jan 2009
Posts: 16
 

Alright here it is the updated vesion that supports using different keyboard layouts. Included in the archive is a keymaps directory and a file called kbd.map that must be placed in the root of your SD Card. Once placed there you can change the layout that your keyboard uses by editing the kbd.map file to specify the correct layout file. For example to use the US dvorak layout enter us/dvorak on the first line of the file. At the moment i've only created two layouts besides the default us/qwerty layout those are us/dvorak and de/qwertz. If anyone wants any additional layouts or there are issues with the current ones let me know.

ScummVM r36196
- Added keyboard layouts (us/qwerty, us/dvorak, de/qwertz)

 Reply with quote  
Post Mon Feb 02, 2009 7:43 pm 
 View user's profile Send private message
chojin



Joined: 27 May 2008
Posts: 48
Location: Berlin, Germany
 

Very nice again. I tried the german layout, and all keys appear to work as expected, except the (euro) symbol, which is an "e" but probably not relevant. The "first line" in kbp.map must be the only line, it did not work when I had accidently a carriage return at the end of that line.

Why I mentioned the USB mouse: My cordless desktop contains keyboard and mouse, but it was more a joke. I'm not sure whether I would make use of it, although I guess it's easier to implement than a keyboard.

My problem with the WiiMote: Clicking the A-button often results in a little cursor jump, probably depending on the distance between wiimote and tv. In some game scenes the click-area is very small and timing relevant, I needed some attempts there. Doubleclicking folders in SCUMMVM GUI is likewise, maybe a singleclick is sufficent here.

 Reply with quote  
Post Wed Feb 04, 2009 9:41 am 
 View user's profile Send private message
Bossk



Joined: 03 Nov 2008
Posts: 107
 

Nice work brijohn. Your work is much appreciated.

I've noticed a few quirks with the virtual keyboard, I haven't had the time to dig in to check for myself yet for the cause:

- When calling and dismissing the VKBD the shift state is set (seen when the add buttons becomes mass-add).
- The numbers don't work in the VKBD (probably to do with the shift state?)

The cause most likely is the remapping of VKBD to shift-F7 instead of F7, and mapping shift-F7 to the down key.

 Reply with quote  
Post Thu Feb 05, 2009 8:26 am 
 View user's profile Send private message
Red_Breast



Joined: 30 Sep 2008
Posts: 785
Location: The Bar Of Gold, Upper Swandam Lane.
 

How do I go about creating a keyboard .map file? I actually want a uk.map file.
There are some differences compared to the 2 US versions.
(I didn't know there were 2 US versions until reading Wiki)

http://en.wikipedia.org/wiki/British_and_American_keyboards

 Reply with quote  
Post Fri Feb 06, 2009 3:51 pm 
 View user's profile Send private message
brijohn



Joined: 25 Jan 2009
Posts: 16
 

Bossk: I discoverd what the issue with shift is. The problem is that libwiikeyboard does not send press/release events for shift, ctrl, and alt modifiers. Instead when you press a key it will send a bit flag telling you the state of each modifier. This means that scummvm does not detect that you pressed shift until you press a key while holding shift nor does it detect that you released shift till you press a key without holding shift.

Red_Breast: I have created a program that will take a text file describing a keymap and create a compiled version for use with libwiikeyboard. There are some brief instructions in the README about using it, and you can also look at the us based description files located in the data directory. If you have any questions or problems with it let me know.

Keymap Compiler

 Reply with quote  
Post Fri Feb 06, 2009 7:36 pm 
 View user's profile Send private message
Badablek



Joined: 28 Jan 2007
Posts: 60
 

Hi brijohn,

is this tool supposed to work under Windows Vista ? I'm trying to make a french (azerty) keyboard map, but it doesn't work well.

ScummVM can read through A to F, but stop respond from G to N, keypad, F Keys, Space, enter, etc. do not work too.
I tried to compile Us keyboard map too (I did NOT modify it) and same problem, like your tool does not compile correctly.


ps : when using your precompiled binary, everything works like it should be.

 Reply with quote  
Post Sat Feb 07, 2009 2:22 pm 
 View user's profile Send private message
brijohn



Joined: 25 Jan 2009
Posts: 16
 

Ok so yeah there was a slight bug in the windows compiled version. I forgot that windows is rather stupid and thinks that translating certain characters during file read and write operations is somehow a good thing. At any rate i've uploaded a fixed version that should work correctly under windows.

Keymap Compiler

 Reply with quote  
Post Sat Feb 07, 2009 3:31 pm 
 View user's profile Send private message
Badablek



Joined: 28 Jan 2007
Posts: 60
 

Thank you for this quick bugfix, works much better now.

I've made a french keyboard map (azerty), if you want to add it to the next version of ScummVM

http://www.gx-mod.com/team/perso/Badablek/French_keymap.zip
(source data is included)

ps : keyboard support rocks !

 Reply with quote  
Post Sun Feb 08, 2009 1:46 am 
 View user's profile Send private message
Red_Breast



Joined: 30 Sep 2008
Posts: 785
Location: The Bar Of Gold, Upper Swandam Lane.
 

quote:
Originally posted by brijohn
Ok so yeah there was a slight bug in the windows compiled version. I forgot that windows is rather stupid and thinks that translating certain characters during file read and write operations is somehow a good thing. At any rate i've uploaded a fixed version that should work correctly under windows.

Keymap Compiler


Nice one thanks.

Edit.
I guess the best way to do this is to take the us one from your data folder and just modify it. Is that right?
So I downloaded the .pdf but I can't even find ''(pound) listed.
Is there any chance you could make me one? Please.
I'm not sure I'm doing this right. I'm slowly playing with Linux but it still scares me and I have no Win compiler. Thanks.

Copy and paste from Wiki. UK differences.
"map the to where the US layout has a #
add a 102nd key to accommodate the #
reversal of @ and "
the movement of ~ to the # key to accommodate a on the `(backquote) key
the movement of the \ key to the left of Z"
 Reply with quote  
Post Mon Feb 09, 2009 9:33 pm 
 View user's profile Send private message
brijohn



Joined: 25 Jan 2009
Posts: 16
 

Red_Breast:

I can probably create a mapping but it might take a day or to to get some time for it.

Below is hopefully some information that might explain abit more...hopefully.

The pdf file only lists the number representing physical keys on the keyboard, so what you look for is in the case of the pound sign the key that claims to represents 3 and #. That is number 32 i think. The symbols listed in the pdf are just what that key is on a normal us keyboard. With that number we can map that physical key to any symbols we want. In the case of a UK keyboard this will be 3 and . Other things to note are the pound sign should be according to the pdf number 50 (Keyboard Non-US # and ~). Basically the pdf shows what the normal mappings are plus the number representing the physical key and we use the keyboard map files to rearrange what keys are used. Also the symbol name you use for the pound sign when mapping is called sterling and is called notsign.

 Reply with quote  
Post Tue Feb 10, 2009 2:16 am 
 View user's profile Send private message
brijohn



Joined: 25 Jan 2009
Posts: 16
 

Ok I've fixed the previous issue with the shift key that Bossk pointed out. libwikkeyboard now sends back discrete keyboard events for modifier keys, this also means the all modifier keys are fully mappable in the keymap files as well. So now if you want to say moved your left shift key over to your space bar or swap it with your escape key you can. Smile More to the point however is that scummvm should now be able to detect an individual shift key press instead of only knowing about when pressed with a secondary key.

I've also created the UK based keymapping as well as one for Japanese keyboards and updated my keymap_compiler to take some of these changes into account.

Keymap Compiler
- Updated keymaps with modifier keys
- Added gb(uk) and jp keymaps
- definition files now support # style comments

ScummVM r36255
- Includes updated keymaps
- Fix bug with shift

 Reply with quote  
Post Wed Feb 11, 2009 4:52 pm 
 View user's profile Send private message
Badablek



Joined: 28 Jan 2007
Posts: 60
 

brijohn, something seems broken with your latest release.

French keyboard : e, j and x do not work anymore (tried with azerty.map from r36255 and my compiled one). Same with Us keyboard.


and same when using old .map. So I think this bug comes from your latest build of scummvm.


ps :
it seems that pressing x = return, e = backspace, j = enter

and when pressing (without holding) the right Alt key (altGr on french keyboard), the "Alt" status is locked and only alt keys can be used...and impossible to go back to the "normal" state.

 Reply with quote  
Post Wed Feb 11, 2009 6:09 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 
Goto page Previous  1, 2, 3, 4, 5, 6  Next


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge