Re: [hatari-devel] SDL GUI keyboard shortcuts

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


Am Sun, 17 Aug 2014 23:36:10 +0300
schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:

> Hi,
> 
> On sunnuntai 17 elokuu 2014, Thomas Huth wrote:
> > schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> > > Some options:
> > > - document that SDL2 builds support only alphanumeric shortcuts
> > > - add code to skip indicator drawing for such shortcuts with SDL2
> > 
> > That sounds like a bad idea ... SDL2 will be the only option one
> > day, so we should go for a solution that works with both versions
> > of the SDL library now.
> >
> > > There are few very useful use-cases for non-alphanumeric
> > > shortcut keys:
> > > - List arrows, e.g. in joystick & fsel dialogs.
> > >   I've mapped them to < and >.
> 
> What do you propose to be used as keyboard shortcuts for arrows
> in SDL GUI?
> 
> Pressing </> to switch Joystick interface in Joystick dialog
> and shortcut for given joy option, is 10x nicer to use to change
> what port has joystick, than moving focus to arrow, then to joy
> option, back to arrow, back to joy option...  Especially when
> focus changing doesn't have key repeat.
> 
> (Personally I prefer using shortcuts also over mouse.)

How often do you change the joystick configuration? Especially the
joysticks beside joystick #1 ?
I think most people hardly change the other sticks, so I do not
consider these shortcuts as very important.

> > > - Frequently used buttons on top of the file selector,
> > >   mapped to '.', '$', '~', '/'.
> > > 
> > > Of these symbols, I think '.' doesn't need Shift on all/most
> > > keyboards, but others do.  I guess the Fsel buttons could instead
> > > of symbols use _UP, _CWD, _HOME and _ROOT text/shortcuts, but that
> > > would conflict with letter shortcuts for jumping to corresponding
> > > place in file list.
> > 
> > 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.

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).

> 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.

> 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.

> 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?

 Thomas





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