Fixed algorithm for CAPS text key visualization. #10

Merged
MicheleC merged 1 commits from test/keycodes into master 3 years ago
Owner

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

@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?
MicheleC added 1 commit 3 years ago
ce36fbfbe1
Fixed algorithm for CAPS text key visualization.
Ray-V added 2 commits 3 years ago
Ray-V commented 3 years ago
Collaborator

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.

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.
SlavekB requested changes 3 years ago
SlavekB left a comment
Owner

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.

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();
Owner

Adding shiftcapsState seems unnecessary because it is not used => there is enough to combine shiftState && capsState.

Adding `shiftcapsState` seems unnecessary because it is not used => there is enough to combine `shiftState && capsState`.
MicheleC marked this conversation as resolved
{
VButton *v = btns[a];
v->shiftCapsPressed(shiftState, capsState);
v->shiftCapsPressed(shiftState, capsState, shiftcapsState);
Owner

This change is not needed.

This change is not needed.
MicheleC marked this conversation as resolved
src/VButton.cpp Outdated
}
void VButton::shiftCapsPressed(bool shift, bool caps)
void VButton::shiftCapsPressed(bool shift, bool caps, bool shiftcaps)
Owner

This change is not needed.

This change is not needed.
MicheleC marked this conversation as resolved
src/VButton.h Outdated
public slots:
void sendKey();
void shiftCapsPressed(bool shift, bool caps);
void shiftCapsPressed(bool shift, bool caps, bool shiftcaps);
Owner

This change is not needed.

This change is not needed.
MicheleC marked this conversation as resolved
Ray-V added 1 commit 3 years ago
a0fa652ac8
Revert unnecessary changes in commit a7e0250
MicheleC force-pushed test/keycodes from a0fa652ac8 to 8e72d604c0 3 years ago
Poster
Owner

Hi Ray,
thanks again for the testing and the fixing.

[1]
The Caps+Shift on the Italian keyboard is still showing ccedilla[ç] instead of Ccedilla[Ç].

Yup, didn't fixed that initially, but now it should be ok.

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

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.

Hi Ray, thanks again for the testing and the fixing. > [1] > The Caps+Shift on the Italian keyboard is still showing ccedilla[ç] instead of Ccedilla[Ç]. Yup, didn't fixed that initially, but now it should be ok. > [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. 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.
MicheleC requested review from SlavekB 3 years ago
MicheleC force-pushed test/keycodes from 8e72d604c0 to b1c1fd93a7 3 years ago
SlavekB approved these changes 3 years ago
SlavekB left a comment
Owner

Keys with Caps, Shift and their combinations seem to be displayed in order as well as written.

Keys with Caps, Shift and their combinations seem to be displayed in order as well as written.
MicheleC merged commit b1c1fd93a7 into master 3 years ago
MicheleC deleted branch test/keycodes 3 years ago
MicheleC added this to the R14.0.10 release milestone 3 years ago
Poster
Owner

Thanks @Ray-V @SlavekB for testing. Merged to master.

Thanks @Ray-V @SlavekB for testing. Merged to master.

Reviewers

SlavekB approved these changes 3 years ago
The pull request has been merged as b1c1fd93a7.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/kvkbd#10
Loading…
There is no content yet.