Bug 46200 - [RFE] Use the Scroll Lock key as a toggling lock key like Excel
Summary: [RFE] Use the Scroll Lock key as a toggling lock key like Excel
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: lowest enhancement
Assignee: abhilash300singh
QA Contact:
URL:
Whiteboard: target:5.3.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2012-02-16 16:05 UTC by kolrac
Modified: 2017-08-09 13:55 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kolrac 2012-02-16 16:05:12 UTC
Let's suppose I highlight cell A12 in Calc (with A1 at the top left corner of the window) and hit cursor down: when scroll lock is disabled I move to A13. When Scroll Lock is on it would be useful if I stayed on A12 and the whole worksheet scrolled up so that A2 would be at the top left corner of the window -- as Excel and Lotus Notes do.

In other words, when the Scroll Lock key is activated scroll the entire table when using cursors instead of just moving a cell.

FYI, this enhancement request was filed as bug n° 7179 on OOo's bugzilla in 2002 and is still considered as open.
Comment 1 Joel Madero 2012-11-21 21:40:40 UTC
Confirmed. Marking as NEW and Prioritizing:

Enhancement: Confirmed

Lowest: Just offering a third way to scroll, can already do it with mouse in two ways. Also Scroll Lock is being taken off of a lot of systems/keyboards these days, I actually didn't have it on three systems, had to go ask someone else to check it out
Comment 2 Joel Madero 2012-11-21 21:41:47 UTC
Per a developers input, marked as proposedeasyhack
Comment 3 Markus Mohrhard 2012-11-21 21:50:29 UTC
Code Pointers:

ScTabViewShell::KeyInput for the key input event as starting point
ScViewData as the class holding the information which area is currently displayed.

This should be quite easy, when the event is received call a method in ScViewData that just moves the shown area.
Comment 4 Björn Michaelsen 2013-10-04 18:47:41 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 5 Tomas Prochazka 2014-03-10 09:33:55 UTC
Hi, 
I am a student of FEE CTU.This semester we have a subject called Open Source Programming.So I would like to solve this bug. 
Sincerely, Tomas.
Comment 6 Tharindu 2014-03-18 11:54:43 UTC
Hi all,
I'm new to LibreOffice and this is what I chose as my first easy hack. Can some one point me to the source files that I must look into.
Comment 7 Joel Madero 2014-03-18 17:48:56 UTC
Best to go to the development mailing list as developers are a bit more responsive in general on the list than on the bug tracker
Comment 8 jeyli 2014-09-09 12:52:39 UTC
The scroll lock is not implemented in linux (ubuntu) like in windows. When I press the key under linux the third led is not shining. So I think it's much work to solve this problem both in windows and in linux.
Comment 9 kolrac 2014-09-10 13:35:14 UTC
(In reply to comment #8)
It's not that the scroll lock key is implemented differently on Ubuntu; it's rather an X11 bug (press Ctrl-Shift-F2 and you'll see that scroll lock works on the console). You may find more information as well as a workaround on <https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/912044>. So when this X11 bug is fixed the problem should be solved for GNU/Linux without any additional work for LibreOffice, and things should work out of the box with Windows anyway. But because of this X11 bug, it would probably be a good idea to test this enhancement request on Windows, indeed.
Comment 10 kolrac 2015-08-17 17:52:23 UTC
More than two weeks ago I sent an e-mail to the current assignee of this bug asking if the was still interested in solving it but didn't get an answer; and as there was no input in well over a year, I'm going to reset the assignee field.

PS: In my previous message, I wrote that to get a console on GNU/Linux you had to press Ctrl-Shift-F2. This should have been Ctrl-Alt-F2.
Comment 11 Robinson Tryon (qubit) 2015-12-13 10:58:07 UTC
Migrating Whiteboard tags to Keywords: (easyHack, difficultyBeginner, skillCpp)
[NinjaEdit]
Comment 12 Robinson Tryon (qubit) 2016-02-18 14:51:51 UTC
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)
[NinjaEdit]
Comment 13 Markus Mohrhard 2016-03-11 00:45:12 UTC
The best method to start debugging is ScTabView::MoveCursorKeyInput.
Comment 14 Jakub Máša 2016-03-22 07:37:52 UTC
Hello,

I would like to work on this feature as my first contribution. Is it ok if I assign myself to it?

Jakub Máša
Comment 15 jani 2016-03-22 08:52:37 UTC
(In reply to Jakub Máša from comment #14)
> Hello,
> 
> I would like to work on this feature as my first contribution. Is it ok if I
> assign myself to it?
> 
> Jakub Máša

Please do, we have made a step by step guide, to help you:


https://wiki.documentfoundation.org/Development/GetInvolved

have fun
jan i
Comment 16 jani 2016-04-22 06:48:51 UTC
A polite ping, are you still working on this ?
Comment 17 jani 2016-05-23 06:37:06 UTC
Unassigning due to lack of work.
Comment 18 Marco Filippozzi 2016-06-27 07:02:21 UTC
we want to solve the bug, already assigned to myself
Comment 19 jani 2016-07-28 05:24:06 UTC
A polite ping, still working on this bug ?
Comment 20 jani 2016-08-28 07:08:15 UTC
Unassigning. Should you want to continue working on this bug please assign it again
Comment 21 erbe 2016-09-11 15:07:56 UTC
Here is a video how this feature works in Microsoft Excel:
https://youtu.be/p-QwdDSrbRk

It would be somehow similar to using (alt+) PageUp/PageDown but instead of scroll by whole screen at once, every time you would use your arrow keys when ScreenLock is activated the screen would move only by one cell in the chosen direction.

Enabling Scroll Lock functionality would be an elegant and useful enhancement especially if you work with bigger spreadsheets.

I've asked about also about this feature on ask.libreoffice.org here:
https://ask.libreoffice.org/en/question/76927/missing-scroll-lock-keyboard-key-feature-in-libreoffice-calc/

Wikipedia: https://en.wikipedia.org/wiki/Scroll_lock#Window_scrolling

This bug/feature request is open since 14 years now.
Comment 22 abhilash300singh 2016-10-03 05:31:57 UTC
(In reply to Markus Mohrhard from comment #13)
> The best method to start debugging is ScTabView::MoveCursorKeyInput.

All of the events inside this function move the current selected cell by different amounts. We need the function which is called when MouseWheelDown/Up event happens so that the current selected cell remains as it is and only the page moves up & down. Is there a way I can check the functions called when MouseWheelDown/Up event occurs? Or in case you know that function, please mention the same. Till then, I'd keep looking in the related files. Thanks.
Comment 23 abhilash300singh 2016-10-08 08:59:22 UTC
I wrote a simple SAL_DEBUG("Testing") immediately inside ScTabView::MoveCursorKeyInput. It is strange that when I run Calc and press the Arrow keys nothing is printed on the console. When I do the same with ScTabView::MoveCursorEnter, which is defined just above, and then press Enter key, "Testing" is printed on console as expected. 

I'm not sure why ScTabView::MoveCursorKeyInput is not getting called.
Comment 24 abhilash300singh 2016-10-11 23:03:54 UTC
Patch for review:

https://gerrit.libreoffice.org/#/c/29720/
Comment 25 jani 2016-11-11 11:50:05 UTC
(In reply to abhilash300singh from comment #24)
> Patch for review:
> 
> https://gerrit.libreoffice.org/#/c/29720/

A polite ping still working on this bug ?
Comment 26 Commit Notification 2016-11-11 19:37:01 UTC
Abhilash Singh committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=453de3473cf6f383c71466a1ed15e28b844ed7e5

tdf#46200 Use the Scroll Lock key as a toggling lock key like Excel

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Cor Nouws 2016-11-12 13:15:20 UTC
(In reply to Commit Notification from comment #26)
> Abhilash Singh committed a patch related to this issue.
> It has been pushed to "master":

Hi Abhialsh,

Do I need to do some special setting to use the arrow keys in Calc as I'm used to?
Arrow left/right do not work. Arrow up/down scroll.
Scroll Lock (Fn-F12 on my key board) does not help.

Version: 5.3.0.0.alpha1+
Build ID: 0af30952982767543cddd0b1ce643cb8d5c253a2
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-11-11_23:43:27
Locale: nl-NL (nl_NL.UTF-8); Calc: group
Comment 28 Commit Notification 2016-11-12 14:49:49 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d38459355e3e845ad8db3c515536267923afe3ec

accidentally kept always scroll test enabled.. tdf#46200 follow-up

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 29 Eike Rathke 2016-11-12 14:59:06 UTC
(In reply to Cor Nouws from comment #27)
> Do I need to do some special setting to use the arrow keys in Calc as I'm
> used to?
> Arrow left/right do not work. Arrow up/down scroll.
Use the next build that includes my fix, I accidentally left the "always scroll" test mode enabled when committing an amended patch. Sorry for fuzz.
Comment 30 abhilash300singh 2016-11-12 15:17:02 UTC
> Do I need to do some special setting to use the arrow keys in Calc as I'm
> used to?
> Arrow left/right do not work. Arrow up/down scroll.
> Scroll Lock (Fn-F12 on my key board) does not help.


I forgot to mention, but this only works on my Ubuntu 16.04 machine after I enter this command in console - xmodmap -e 'add mod3 = Scroll_Lock' 

I think I did it after reading this answer - http://askubuntu.com/questions/127167/how-do-i-enable-scroll-lock

Besides my keyboard has a dedicated ScrollLock key, if that makes any difference. Also, things run fine without any intervention on Windows 10.
Comment 31 JohnDoe_71Rus 2017-08-02 10:32:54 UTC
Please add settings to enable this functional. And disable this by default settings.
Comment 32 Cor Nouws 2017-08-09 13:54:42 UTC
(In reply to abhilash300singh from comment #30)

> I forgot to mention, but this only works on my Ubuntu 16.04 machine after I
> enter this command in console - xmodmap -e 'add mod3 = Scroll_Lock' 


thanks for link and fix - works nicely!
Cor
Comment 33 Cor Nouws 2017-08-09 13:55:57 UTC
(In reply to JohnDoe_71Rus from comment #31)
> Please add settings to enable this functional. And disable this by default
> settings.

Hi - can you  please open a new issue - enhancement request for that and mention it here? And try to be clear in what/how you mean with "settings to enable this functional"
thanks