Visual keyboard for Oricutron

Comments, problems, suggestions about Oric emulators (Euphoric, Mess, Amoric, etc...) it's the right place to ask. And don't hesitate to give your tips and tricks that help using these emulations in the best possible way on your favorite operating system.
User avatar
Hialmar
Flight Lieutenant
Posts: 318
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Visual keyboard for Oricutron

Post by Hialmar » Fri Mar 28, 2014 11:47 am

I have updated the SVN (a while ago in fact) with a visual keyboard display and keyboard mapping redefinition feature.

It works okay on OS X, Linux (even though the first time I compiled it - it didn't so maybe there is an hidden bug somewhere).

It doesn't work on Windows however and I have no idea why.
I'll try to have Oricutron to be built with visual studio so that I can debug it.
Using Mingw's gdb was very strange...

Anyway, if someone can test this it would be nice.

There is a new submenu called "Keyboard options".

In the submenu you can find:
- a toggle that shows/hides the visual keyboard (you can click on the keyboard keys to enter key presses/releases) ;
- a toggle that gets you in the key mapping definition mode (you can then click on a visual keyboard key ; press a real key on your keyboard and the mapping will work) ;
- a toggle that allows mod keys (ctrl, shift, funct) to be sticky (ie you first click on a key to press it and then either re-click it to release it or click on another key and it will generate a modded key press - e.g. a Ctrl-T instead of T - and then auto release the key) ;
- an option to save a keyboard mapping (.kma file) ;
- an option to load a keyboard mapping ;
- an option that resets the keyboard mapping to the default SDL one.

You can also add the following in your oricutron.cfg to autoload a keyboard mapping (here Test.kma in the keymap directory found in Oricutron's directory):

Code: Select all

; automatically load a keyboard mapping file
autoload_keyboard_mapping = 'keymap/Test.kma'
If someone could test this it would be nice.
Also if someone finds why this doesn't work under Windows it would be even nicer ;)

PS : the visual keyboard isn't working correctly on the Pravetz 8D but I have trouble understanding some of the keys... Any help with this is more than welcome as I don't have a pravetz 8D.
Hialmar
CEO and Silicium member.

User avatar
iss
Flight Lieutenant
Posts: 471
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Visual keyboard for Oricutron

Post by iss » Fri Mar 28, 2014 12:00 pm

Nice feature! I will check asap in Linux and 8D related items :).

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Visual keyboard for Oricutron

Post by Xeron » Fri Mar 28, 2014 3:32 pm

good work! And potentially useful for an android port :)

User avatar
iss
Flight Lieutenant
Posts: 471
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Visual keyboard for Oricutron

Post by iss » Fri Mar 28, 2014 4:40 pm

indeed! It's ready for touch screens :).

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Visual keyboard for Oricutron

Post by Xeron » Fri Mar 28, 2014 6:28 pm

I've commited a fix for problems that showed up on my linux laptop. I haven't had time to test it on my Windows laptop or Amiga, but I suspect it might be fixed.

User avatar
Hialmar
Flight Lieutenant
Posts: 318
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar » Fri Mar 28, 2014 10:54 pm

Ah ok the problem was due to the fact that you can click on a visual key, move the mouse in another key and release the mouse button ?

Your fix, actually breaks the sticky mod keys management.

I'll try to re-think this a bit.

Anyway you can still press shift/ctrl/func while clicking on a visual key.

Edit: I have found a fix for this.
Hialmar
CEO and Silicium member.

User avatar
Xeron
Emulation expert
Posts: 382
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Visual keyboard for Oricutron

Post by Xeron » Sat Mar 29, 2014 9:26 am

The change I committed also fixed a weird crash. You were reading off the end of the modkey array. I have no idea why that caused a crash, but on Ubuntu, with optimisation turned on, this generated a weird crash with an illegible stack backtrace in gdb. Turning off optimisation made the problem go away. I have no idea why it caused such behaviour, but fixing the bug fixed the crash. I think it was the same crash and gdb weirdness you saw on Windows.

User avatar
Hialmar
Flight Lieutenant
Posts: 318
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar » Sat Mar 29, 2014 12:22 pm

Yes it sounds exactly the problem I saw.

Sorry for the problem.
Hialmar
CEO and Silicium member.

User avatar
Dbug
Site Admin
Posts: 2326
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Visual keyboard for Oricutron

Post by Dbug » Sat Mar 29, 2014 2:00 pm

I don't want to be annoying, but would be nice if you did not both have the same visual avatar, makes it harder to follow the discussions :)

User avatar
Hialmar
Flight Lieutenant
Posts: 318
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar » Sat Mar 29, 2014 4:16 pm

Okay I'm a Telestrat now ;)

And the windows version works okay now :)
I just compiled it on Win7.

I have quickly done a little keymap that transforms the qwerty into an azerty keyboard ;)
Hialmar
CEO and Silicium member.

User avatar
Hialmar
Flight Lieutenant
Posts: 318
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar » Tue Apr 01, 2014 7:59 am

One of my next work will be to modify the pravetz 8D keymap to make it work as intended.

But it's very different than the Atmos' one so I suppose I'll need to modify the keyboard matrix as well isn't it ?
Or am I missing something ?
Hialmar
CEO and Silicium member.

User avatar
Dbug
Site Admin
Posts: 2326
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Visual keyboard for Oricutron

Post by Dbug » Tue Apr 01, 2014 8:03 am

Hialmar wrote:One of my next work will be to modify the pravetz 8D keymap to make it work as intended.

But it's very different than the Atmos' one so I suppose I'll need to modify the keyboard matrix as well isn't it ?
Or am I missing something ?
The Pravetz keyboard is 100% identical to the Atmos one.
The only difference in behavior is that the FUNC key of the atmos is now behaving like what CTRL-T does, it's a CAPS LOCK key.

User avatar
iss
Flight Lieutenant
Posts: 471
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Visual keyboard for Oricutron

Post by iss » Tue Apr 01, 2014 7:47 pm

I fixed Pravetz 8D visual keyboard and all keys work as expected.
Additionally added two new options in 'oricutron.cfg' file:
; Visual keyboard
show_keyboard = yes
sticky_mod_keys = yes

If set - Oricutron starts with Visual keyboard shown :).

User avatar
Hialmar
Flight Lieutenant
Posts: 318
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar » Tue Apr 01, 2014 8:07 pm

Ah very good. Thanks a lot :)
Hialmar
CEO and Silicium member.

User avatar
Hialmar
Flight Lieutenant
Posts: 318
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar » Tue Apr 01, 2014 8:12 pm

I'll update the OS X downloadable 1.1 version with all this or should we call it 1.2 ?

I suppose that it's your say Xeron ?
Hialmar
CEO and Silicium member.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest