Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctrl-space should select a column ... #3077

Open
mmeeks opened this issue Aug 13, 2021 · 7 comments · May be fixed by #10729
Open

ctrl-space should select a column ... #3077

mmeeks opened this issue Aug 13, 2021 · 7 comments · May be fixed by #10729

Comments

@mmeeks
Copy link
Contributor

mmeeks commented Aug 13, 2021

This is an Easy Hack.
Potential mentors: @merttumer

Detailed description and rationale

calc: ctrl-space should select a column ...

Code pointers

This works in the PC / desktop app. You'll want to tripple click in help->about, look in the browser's console to see what events are going out on the wire for this (I guess), and see whether the browser swallows the ctrl up/down, or if the 'space' event (which is quite a special event) is mis-transmitted somehow.

Shift-space selects the row - and this appears to work; unclear why =)

Might be an nightmare =) but perhaps it is easy enough; lets see.

@Mathusela
Copy link

Hello, is this issue still open?
I'm new to open source, but I would like to take a look at this if it's still relevant.
Thanks.

@mmeeks
Copy link
Contributor Author

mmeeks commented Apr 17, 2023

Hi Mathusela - feel free to start on the ticket =) please do the tripple click as above, turn on protocol logging, and see what happens in the protocol log for a - - it may be that we can't get this out of the browser. Drop your findings back into the ticket ... Thanks !

@Mathusela
Copy link

Will do, I'll take a look soon. Thanks - Matt

@Mathusela
Copy link

Can't see anything immediately out of place in the protocol logs, shift+space (working event) and ctrl+space (broken event) appear consistent.
It's worth noting that a short time after ctrl+space is used (or after using the shortcut and moving the selected cell) the row headers on the left of the screen change colour as if a column is selected; this is not true selection, deleting at this point will delete only the selected cell not the column.
This does however seem to suggest that the event is being processed and the issue is elsewhere.

image

@mmeeks
Copy link
Contributor Author

mmeeks commented Apr 21, 2023

Oh - interesting; it is possible then that a subsequent event causes de-selection in error; can you share the protocol log ? I guess we need to work out whether that's an event that we send, or just the core getting confused somehow. I believe we send as a separate key-event rather than a UTF-8 input method character so ... the code paths should be remarkably similar to desktop.

@Mathusela
Copy link

Mathusela commented Apr 25, 2023

Hi sorry for the late follow up:
Here's the log (just saved from the chrome console):

# Send ctrl+space event
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 keyboard handler: keydown Control 0 undefined KeyboardEvent {isTrusted: true, key: 'Control', code: 'ControlLeft', location: 1, ctrlKey: true, …}
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 keyboard handler: keydown   0 undefined KeyboardEvent {isTrusted: true, key: ' ', code: 'Space', location: 0, ctrlKey: true, …}
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 1682452974977 OUTGOING: key type=input char=0 key=9476
 
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 keyboard handler: keyup   0 undefined KeyboardEvent {isTrusted: true, key: ' ', code: 'Space', location: 0, ctrlKey: true, …}
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 keyboard handler: keyup Control 0 undefined KeyboardEvent {isTrusted: true, key: 'Control', code: 'ControlLeft', location: 1, ctrlKey: false, …}
# Move to another cell to make row headers appear as selected.
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 keyboard handler: keydown ArrowRight 0 undefined KeyboardEvent {isTrusted: true, key: 'ArrowRight', code: 'ArrowRight', location: 0, ctrlKey: false, …}
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 1682452988276 OUTGOING: key type=input char=0 key=1027
 
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 1682452988307 INCOMING: cellautofillarea: 7605, 1740, 75, 75 
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 1682452988307 INCOMING: celladdress: F7 
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 1682452988308 INCOMING: cellcursor: 6400, 1536, 1279, 255, 5, 6 
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 keyboard handler: keyup ArrowRight 0 undefined KeyboardEvent {isTrusted: true, key: 'ArrowRight', code: 'ArrowRight', location: 0, ctrlKey: false, …}
cool.html?WOPISrc=http://localhost:9980/wopi/files/workspace%2Fonline%2Ftest%2Fdata%2Fhello-world.ods&:361 1682452988330 OUTGOING: key type=up char=0 key=1027

@mmeeks
Copy link
Contributor Author

mmeeks commented Apr 25, 2023

Its odd - it seems we have rather few 'keyup' events happening - I would expect us to have an

OUTGOING: key type=up

sort of event; then again - - seems to work immediately on the key-down in the desktop version; so that's not obviously the problem.

It is particularly amazing that the action seems to happen after some time delay - if you press ctrl-space and leave it. I'd look at the logs on the coolwsd side to hunt down what oddness is going on in that gap - and that suddenly makes us refresh the row selections.

Rather an interesting one =)

@rparth07 rparth07 linked a pull request Dec 12, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants