Re: [hatari-devel] SDL GUI keyboard shortcuts

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On maanantai 18 elokuu 2014, Thomas Huth wrote:
> schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> > (Personally I prefer using shortcuts also over mouse.)
> 
> How often do you change the joystick configuration? Especially
> the joysticks beside joystick #1 ?

At least for me it's not that infrequent.  I use arrow keys
joy emulation, but have it disabled by default.  Games use
different joy ports.  Joypads cannot be even enabled with
the joystick change AltGr-J shortcut.  I.e. for me there's
quite a bit of use for that.


> I think most people hardly change the other sticks, so I do not
> consider these shortcuts as very important.

I consider Hatari developers an important user-group for Hatari. :-)


> > > After all, maybe it's either not so important to have shortcuts for
> > > the buttons on top of the file selector ... or maybe we should just
> > > not implement the letter-shortcuts to jump to the corresponding
> > > places in the file list.
> > 
> > I'm not yet giving up either of them.  Most important of the buttons
> > for keyboard navigation is '..', without that Fsel cannot be used
> > just with keyboard.
> 
> You can always move the cursor key focus to that button to use it,
> too.

Have you tried to use that?  It's too awkward, I would then use a mouse
instead.

I think the main use-case for moving focus will be SDL GUI joystick
usage without keyboard.  When you have a keyboard, I think you'd rather
use keyboard shortcuts because they're faster (that of course
depends on a person, most probably just use mouse).


> Anyway, using '.' as shortcut should be ok as symbolic KEYDOWN event
> with most keyboards, as far as I can tell (I am not sure about the
> French azerty layout, though).

Yes.


> > Letter shortcuts in the list would make it much more convenient to
> > use with keyboard, when you know the name of the file you want.
> > Just press the first letter and scroll down few items if needed,
> > to select the desired file, then accept the dialog.  I guess it
> > should also focus the first filename.
> 
> At least I have sorted most of my disk images in alphebetical folders,
> i.e. in the folder "a" there are all images starting with "a" or "A",
> etc., so if you've got a sorting like this, the letter shortcuts for
> the file selector are useless anyway.

I haven't (I don't have hundreds of them, so I have just ST floppy
apps, ST demos, ST games, STE demos and STE games dirs).

I use Fsel a lot less than joystick dialog though, as I load
files mainly through command line options.  Comments from
others who use SDL GUI Fsel more would be welcome.


> > Do you have other proposals how the Fsel list could be made easier
> > to navigate with keyboard?
> 
> Scrap the whole sdl-gui and write something better from scratch?
> Honestly, I wrote that thing more than ten years ago, when my only GUI
> programming experience was limited to GEM so far.
> Considering that Hatari is nowadays also used on consoles that have
> only a joystick as input or on mobile phones where you have to use your
> fingertip to hit the buttons, that GUI simply does not feel right
> anymore.

The nasty thing is that if you want to do something that feels
"right" on them, you need to write separate one for each.  They
use different GUI toolkits, programming languages and if those
two are same, then they have different UI paradigms (iOS, OSX,
Windows, Winphone, Android, Linux desktop etc).

Integrating Hatari screen handling etc SDL code to such GUI toolkit
would also be a major undertaking.

SDL GUI in C is the lowest common denominator between all these OSes,
so I think we're stuck with it as the default.


> > Btw. I added your UTF-8 -> latin1 conversion for SDL GUI (filename)
> > strings with same ifdefs as what were used in Max' GEMDOS HD patch.
> 
> Ok ... but why didn't you simply also copy the part that checks for a
> UTF-8 locale and used a #define instead?

1. There's no point.  LANG environment variable contains two things:
   - language user requests from programs.  Until there are
     translations for the GUI strings, this part is useless
   - encoding that the program should use when it outputs text
     to the console in which it's running [1].  SDL GUI doesn't
     output to console, but to its own window with its own font,
     so checking encoding specified in LANG is useless

  [1] This setting is typically inherited from global configuration,
      so one can take it as a strong indicator that given OS does
      also mount disks by default with UTF-8 encoding.  However, I
      don't think that from absense of LANG variable, or its value
      missing "UTF-8", you can deduct that UTF-8 isn't used for
      mounting file systems.  Console text output encoding and file
      system file name encoding are two separate matters.

      File name encodings is a mess where you just need to do assumptions
      and hope for the best. I'm not going to add to Hatari (OS specific)
      code for checking on which file system listed file resides or
      parse its mount options.

2. Same thing should be used for checking host file name encoding
   for GEMDOS HD emulation, and for SDL GUI.  I used same thing in
   GUI as GEMDOS HD emulation.  That's what Max had actually tested
   to work on Windows, OSX and Linux.

Btw. If / when Hatari has its own SDL GUI translations, user is not
going to change their encoding although s/he might change LANG value.
Encoding of the translations is dictated by the application, and
going to be UTF-8 as discussed. :-)


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/