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: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Visual keyboard for Oricutron

Post by Hialmar »

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
Wing Commander
Posts: 1637
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Visual keyboard for Oricutron

Post by iss »

Nice feature! I will check asap in Linux and 8D related items :).
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Visual keyboard for Oricutron

Post by Xeron »

good work! And potentially useful for an android port :)
User avatar
iss
Wing Commander
Posts: 1637
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Visual keyboard for Oricutron

Post by iss »

indeed! It's ready for touch screens :).
User avatar
Xeron
Emulation expert
Posts: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Visual keyboard for Oricutron

Post by Xeron »

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: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar »

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: 426
Joined: Sat Mar 07, 2009 5:18 pm
Contact:

Re: Visual keyboard for Oricutron

Post by Xeron »

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: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar »

Yes it sounds exactly the problem I saw.

Sorry for the problem.
Hialmar
CEO and Silicium member.
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Visual keyboard for Oricutron

Post by Dbug »

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: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar »

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: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar »

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: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Visual keyboard for Oricutron

Post by Dbug »

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
Wing Commander
Posts: 1637
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Visual keyboard for Oricutron

Post by iss »

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: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar »

Ah very good. Thanks a lot :)
Hialmar
CEO and Silicium member.
User avatar
Hialmar
Flight Lieutenant
Posts: 349
Joined: Tue Mar 04, 2014 11:25 am
Location: Toulouse, France
Contact:

Re: Visual keyboard for Oricutron

Post by Hialmar »

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