Split Screen: Hot Keys to select

Discuss the spreadsheet application
Post Reply
Phillip
Posts: 102
Joined: Wed Jan 09, 2013 1:50 pm

Split Screen: Hot Keys to select

Post by Phillip »

In Calc: Is it possible to have hot keys to switch from one part of a split screen to another?
For example: AltGr + arrow key to jump to the 4 possible splits?
I ask as I find using keys much quicker than switching to and from using the mouse.
Perhaps by using BASIC?
Open Office 4.1.11, Windows 7 Professional 64-bit
Phillip
Posts: 102
Joined: Wed Jan 09, 2013 1:50 pm

Re: Split Screen: Hot Keys to select

Post by Phillip »

Since there has not been any response - is it time to close this post?
Open Office 4.1.11, Windows 7 Professional 64-bit
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Split Screen: Hot Keys to select

Post by Zizi64 »

Perhaps by using BASIC?
Using the BASIC will be not enough. You need call the API functions from the BASIC code.
API = Application Programming Interface
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Phillip
Posts: 102
Joined: Wed Jan 09, 2013 1:50 pm

Re: Split Screen: Hot Keys to select

Post by Phillip »

As I have no skills using either API or BASIC (other than copying code supplied), I will have to pass on this, unless someone can supply the code.
Open Office 4.1.11, Windows 7 Professional 64-bit
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Split Screen: Hot Keys to select

Post by Zizi64 »

I will have to pass on this, unless someone can supply the code.
I think, nobody will write the full code instead of you.
You must study the API functions - if you want a macro for this task. You can start with Andrew Pitonyak's free macro books.
http://www.pitonyak.org/oo.php

Or you can search some sample code in this forum or on other forums...
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
Posts: 11359
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Split Screen: Hot Keys to select

Post by Zizi64 »

Is it possible to have hot keys to switch from one part of a split screen to another?
A tip:
Splitting a sheet vertically and horizontally to 4 different view never make "four little sheets". The original sheet still one sheet only - with 4 partial view. You can jump (by a macro) to the desired Cell/Range by using the absolute adress of the Cell/Range: the cursor (the highlihting of the cell) will be moved to the target cell/range. But you must know: where you want to jump to.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Phillip
Posts: 102
Joined: Wed Jan 09, 2013 1:50 pm

Re: Split Screen: Hot Keys to select

Post by Phillip »

I tried jumping to a specific cell - but this only changes the focus within the current view. What I want is to be able to switch the focus to a different view, just as you can with a mouse.
This was to enable me to edit/view 4 widely separated parts of a large spreadsheet, even though the upper/lower pairs of views showing the same rows and the left/right pairs showing the same columns.

I was hoping that Calc could remember the last cell focused on within each view. If that was not possible then jump to the same relevant cell in the view - say 3rd row, 4th col.
Jumping to a specific cell - even if also to a different view is likely to move the views.

If this requires skills I don't have, then I how should I close this topic?
Open Office 4.1.11, Windows 7 Professional 64-bit
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Split Screen: Hot Keys to select

Post by Villeroy »

The attached macro works with frozen windows but not with windows that are only split, that is windows where you scroll all panes and where each pane can include any cell. With frozen windows you have the first panes fixed and scroll the last one. Frozen panes are mostly used for column and row headers.
After installing this, you can assign some hot key of your choice via menu:Tools>Customize... tab "Keyboard". Notice that shortcuts with AltGr are not possible but you will find enough empty slots with Ctrl and Shift.
Attachments
JumpNextPane.odt
2nd try. works with AOO 4.1 now but still with frozen panes only
(22.1 KiB) Downloaded 84 times
Last edited by Villeroy on Sat Jul 21, 2018 9:13 am, edited 2 times in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Phillip
Posts: 102
Joined: Wed Jan 09, 2013 1:50 pm

Re: Split Screen: Hot Keys to select

Post by Phillip »

Installed this but only limited functionality: Set CTRL+W to Freeze Windows, CTRL+0 (zero on numeric pad) to JumpNextPane macro.
Selected T10, freeze windows, then scroll down in lower right-hand pane by arrow keys to AC131. JumpNextPane then moves Focus to topmost cell in lower left-hand pane - A88 - ok so far.
But JumpNextPane stays on A88 - still need to use mouse to get back to left-hand pane.
Same whichever cell in all 4 panes I select.
Please don't think I am ugrateful Villeroy.
For info: Your script was 31 lines, ending with "g_exportedScripts = nextPane,". Was anything cut off?
Open Office 4.1.11, Windows 7 Professional 64-bit
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Split Screen: Hot Keys to select

Post by Villeroy »

Phillip wrote:Please don't think I am ugrateful Villeroy.
I'm grateful for every bug report that reaches me in time.
I'll investigate later this weekend.
P.S.: I see that there is an unexpected difference between OpenOffice and LibreOffice. I tested this with the latter where it works fine.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Split Screen: Hot Keys to select

Post by Villeroy »

I exchanged the installer in yesterday's posting. There have been some improvements to the Python macro language in LibreOffice. AOO is more picky with certain statements. The new code works with both office suites.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Phillip
Posts: 102
Joined: Wed Jan 09, 2013 1:50 pm

Re: Split Screen: Hot Keys to select

Post by Phillip »

I installed the amended script:
- it now jumps to the top left-hand cell of each window in the cycle: top left-hand window/bottom left-hand window/top right-hand window/bottom right-hand window.
This would be fine, but for the unwanted side effect that when you jump to the top left-hand window it undoes all the current scrolling.
Open Office 4.1.11, Windows 7 Professional 64-bit
Phillip
Posts: 102
Joined: Wed Jan 09, 2013 1:50 pm

Re: Split Screen: Hot Keys to select

Post by Phillip »

Thanks Villeroy for your efforts:
To be more specific:
When I freeze a window into 4 panes and scroll the Bottom Left pane down to the current working rows, then scroll the Bottom Right pane across to the right:
Jump from the Top left pane goes to the first visible cell in the Bottom Left pane & does not change the scrolling.
Jump from the Top Right pane goes to the first visible cell in the Bottom Right pane & does not change the scrolling.
However:
Jump from the Bottom Left pane goes to the first visible cell in the Top Right pane & undoes all up/down scrolling.
Jump from the Bottom Right pane goes to the first visible cell in the Top Left pane (A1) & undoes all scrolling - left/right as well as up/down

I had hoped that all Jumps would not alter the scrolling - but if this is just not possible - shall I close the topic?
Open Office 4.1.11, Windows 7 Professional 64-bit
Post Reply