[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allow missing components (or detect them in project)


Le 22/01/2026 à 00:54, Bruce Steers a écrit :



On Wed, 21 Jan 2026 at 23:21, Benoît Minisini <benoit.minisini@gambas- basic.org <mailto:benoit.minisini@xxxxxxxxxxxxxxxx>> wrote:

    Le 21/01/2026 à 23:39, Bruce Steers a écrit :
     >
     >
     > On Wed, 21 Jan 2026, 21:54 Bruce Steers, <bsteers4@xxxxxxxxx
    <mailto:bsteers4@xxxxxxxxx>
     > <mailto:bsteers4@xxxxxxxxx <mailto:bsteers4@xxxxxxxxx>>> wrote:
     >
     >
     >
     >                 You should pass it directly what you get from
     >                 'Key.Shortcut'.
     >
     >
     >     The only big bug in that program is i realised Key.Shortcut
    letter
     >     text is always upper case.
     >
     >
     > I guess this upper case issue is a bug then?

    Sort of.

    Internally "a" and "A" have different key values.

    The problem is that on the keyboard it's written "A", whereas the
    key is
    actually "a", and you have to use SHIFT to get an "A".

    So Qt returns the code "A" when you press "A" or "a", as well as GTK+
    where I add to do a conversion for that.


I'm not sure i explained properly.

The new Key.Send function "should" only send lower case if no Shift is present
So
Key.Send("a")
Key.Send("A")
should both send lower case "a" because of no Shift+
Respectively
Key.Send("Shift+a")
Key.Send("Shift+A")
Key.Send("SHIFT+A")
should all send upper case "A"

The case of the Key.Shortcut string or what's used in Key.Send() command should be irrelevant and only an upper case letter sent if Shift+ is present.


    I have to implement the reverse trick when interpreting the shortcut
    passed to 'Key.Send()', otherwise there is no coherency.


Is it not a simple as sending the text as upper or lower case depending on the Shift+ being true

Currently i get this result...
   Key.Send("Shift+a")
   Key.Send("Shift+A")
   Key.Send("a")
   Key.Send("A")

aAaA

but it should be AAaa
The case is being controlled by what ever case the text sent is and not by the presence of Shift+

I don't know the c++ code but i think that all the converting you need is to convert any letter to lower case if no Shift+ and upper if there is

Respects
BruceS


It's more complex than that, because not everybody has the same keyboard layout.

It's what I said: "A" and "a" are two different keys in the toolkit logic, whereas they are not on american and french keyboard (and others), and so does the shortcut representation, which is then no coherent anymore with 'Key.Code'.

--
Benoît Minisini.


Follow-Ups:
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Allow missing components (or detect them in project)Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>
Re: Allow missing components (or detect them in project)Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Allow missing components (or detect them in project)Bruce Steers <bsteers4@xxxxxxxxx>