Fixed algorithm for CAPS text key visualization. #10
Merged
MicheleC
merged 1 commits from test/keycodes
into master
3 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'test/keycodes'
Deleting a branch is permanent. It CANNOT be undone. Continue?
@Ray-V
this should be inline with the comments on PR #9. Before I merge to master, could you test on your side to see if I missed anything else?
Built to commit
ce36fbf
There are a couple of issues.
[1]
The Caps+Shift on the Italian keyboard is still showing ccedilla[ç] instead of Ccedilla[Ç].
[2]
I've been so focussed on the accented character keys issue that I hadn't noticed what was not happening to the plain alpha characters.
Re: the 'a' key
Press Caps and 'A' is displayed and printed
Press +Shift and 'A' is still displayed, but this should be 'a' which is what is printed.
The two commits fix those issues for me.
Of the keyboards I've checked, the only character I've found that still doesn't display as it's printed, in 2 out of the 4 cases, is the finalsmallsigma [ς] and its upper [Σ] on the Greek keyboard. The σ/Σ pair display as they are printed, so I think that's something that any user of a Greek keyboard could live with.
It seems that the original intention of the variable and the argument
shiftcapsState
was not used and therefore some changes are not necessary. Please there can be a cleaning.{
bool shiftState = lshift->isOn() || rshift->isOn();
bool capsState = caps->isOn();
bool shiftcapsState = lshift->isOn() || rshift->isOn() && caps->isOn();
Adding
shiftcapsState
seems unnecessary because it is not used => there is enough to combineshiftState && capsState
.{
VButton *v = btns[a];
v->shiftCapsPressed(shiftState, capsState);
v->shiftCapsPressed(shiftState, capsState, shiftcapsState);
This change is not needed.
}
void VButton::shiftCapsPressed(bool shift, bool caps)
void VButton::shiftCapsPressed(bool shift, bool caps, bool shiftcaps)
This change is not needed.
public slots:
void sendKey();
void shiftCapsPressed(bool shift, bool caps);
void shiftCapsPressed(bool shift, bool caps, bool shiftcaps);
This change is not needed.
a7e0250
a0fa652ac8
to8e72d604c0
3 years agoHi Ray,
thanks again for the testing and the fixing.
Yup, didn't fixed that initially, but now it should be ok.
Yup, got caught out by the same mistake 😞
I have combined all those commits into one and credited you as author, since you have done 99% of the work here.
Note that I have switch the check for upper() and lower() in setShiftText. AFAICT the functionality is the same but it is more logical to read it that way.
I tested on us/it/fr keyboards and it now seems right to me (yes, I said the same before....). Please double check and if all is good we will later merge this.
8e72d604c0
tob1c1fd93a7
3 years agoKeys with Caps, Shift and their combinations seem to be displayed in order as well as written.
b1c1fd93a7
into master 3 years agoThanks @Ray-V @SlavekB for testing. Merged to master.
Reviewers
b1c1fd93a7
.