Float the preview panel using Keyboard shortcut?

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
mjbrookes
Bronze Member
Bronze Member
Posts: 112
Joined: 2007 Sep 19, 11:24

Float the preview panel using Keyboard shortcut?

Post by mjbrookes »

I use the Preview panel extensively,

I have 2 needs for the Preview
Small view - to identify file content
Large View - to allow full reading of content

it is a nuisance to need to manually change between Panel-sizes
and if I default to Large-size then the Preview panel takes up too much space.

My work-around so far has been to open/close a large size Preview Panel
(I have assigned the key-press " ` " to 32934 so that I can do this with a single keypress - too lazy to use CTRL+Q :D )

I have also begun to use the preview FLOAT & DOCK feature ... this works quite nicely, but I have to use the mouse, which is fiddly.

Is there a way to associate the Float/Dock action to a keypress (or macro?)

Thanks
User avatar
nikos
Site Admin
Site Admin
Posts: 15522
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Float the preview panel using Keyboard shortcut?

Post by nikos »

for this kind of need, you can use window layouts. One "normal" with a small preview window, and one with bigger or floating preview panel. See WINDOW menu and this blog post: www.zabkat.com/blog/window-layouts.htm
mjbrookes
Bronze Member
Bronze Member
Posts: 112
Joined: 2007 Sep 19, 11:24

Re: Float the preview panel using Keyboard shortcut?

Post by mjbrookes »

Hi Nikos,
thanks for your reply,

I do already use different Window-Layouts,
but I would like to have a different Preview-Panel behaviour in all layouts.

request/suggestion:-
~~~~~~~~~~~~~~~~~
please add to "Customise Keyboard"
the option to Toggle Float/Dock the preview panel

eg currently I have keyboard Assignmtnt = ` 32934 Show or hide the quick previewer pane
I would like to be able to assign something like = ` 32935 Float or Dock the quick previewer pane.


(hopefully this would be Trivially easy?)

regards
Mark
User avatar
nikos
Site Admin
Site Admin
Posts: 15522
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Float the preview panel using Keyboard shortcut?

Post by nikos »

ok, request registered!
(but how do you choose which panel to float? there could be the tree, the details pane etc)
mjbrookes
Bronze Member
Bronze Member
Posts: 112
Joined: 2007 Sep 19, 11:24

Re: Float the preview panel using Keyboard shortcut?

Post by mjbrookes »

ooooHH! how interesting; I had not noticed this before.

my suggeston:-

ID 32935 Float or Dock the quick previewer pane.
ID 32936 Float or Dock the Tree
ID 32937 Float or Dock the Details Pane etc....



or how about

Assigned Key eg " ` "
press once ..... Floats quickview panel
press again .... Floats Tree ( two panels now floating)
press again ... Floats details pane ( three panels now floating)
press again ... Docks details pane
press again ... Docks Tree
press again ... docks Quick view.


But I think having 3 different ID ###### codes is superior

Regards
Mark
mjbrookes
Bronze Member
Bronze Member
Posts: 112
Joined: 2007 Sep 19, 11:24

Re: Float the preview panel using Keyboard shortcut?

Post by mjbrookes »

from: viewtopic.php?f=18&t=11952#
for your (old) request, the CMENU macro command can now function with dock panes, so you can use code like
CODE: SELECT ALL

FINDWND preview
CMENU float
I have tried writing macros but have not sorted it out.
This is what I am aiming for
#-----------------------------------------------------------------------
# Toggle FILE Preview
#-----------------------------------------------------------------------
#for selected FILE in active pane,
#If no preview is currently displayed, then open Preview

#If Docked Preview is currently displayed, then Float preview
#(size and position is inherited from last user-modifications to floated-preview)

#If Floating Preview is currently displayed, then Dock preview

and my most recent failure was

Code: Select all

#-----------------------------------------------------------------------
# Toggle FILE Preview
#-----------------------------------------------------------------------
# Reference Page for Xplorer2 Macros ..... https://www.zabkat.com/x2h_7a.htm

#for selected FILE in active pane,

#If no preview is currently displayed, then open Preview

	ERRORSTOP 0							#even if No Preview window is found at next step, proceed with macro
	FINDWND preview 				#try to find a currently displayed Preview window
	JUMPERR NoCurrentPreview			#If No Preview window was found jumpto label
	EXIT								#If Preview window was found then exit
	LABEL NoCurrentPreview
	COMMAND "Quick viewer"				#Toggle file-Quick-View == <Ctrl+Q> == 32934
	##### at this point there s.b. an open file-preview-pane
	########## FAILS - if preview is already open .. closes it ...sb leave it open
	
	
#If Docked Preview is currently displayed, then Float preview
#(size and position is inherited from last user-modifications to floated-preview)

	ERRORSTOP 0							#even if No Preview window is found at next step, proceed with macro
	FINDWND preview 				#check that there IS a currently displayed Preview window
	JUMPOK CurrentPreviewFound			#If Preview window was found jumpto label		
	EXIT								#If No Preview window was found then exit
	LABEL CurrentPreviewFound
		# if preview pane is currently Floating then make it Dock
	CMENU dock							#simulate Right-click(ContextMenu) and select from displayed text options
		# if preview pane is currently Docked this command should fail & macro should exit


#If Floating Preview is currently displayed, then Dock preview

	ERRORSTOP 0							#even if No Preview window is found at next step, proceed with macro
	FINDWND preview 				#check that there IS a currently displayed Preview window
	JUMPOK CurrentPreviewFound			#If Preview window was found jumpto label		
	EXIT								#If No Preview window was found then exit
	LABEL CurrentPreviewFound
		# if preview pane is currently Docked then make it Float
	CMENU float							#simulate Right-click(ContextMenu) and select from displayed text options
		# if preview pane is currently Floating this command should fail & macro should exit


* I seem to have particular problem with CMENU Dock which sometimes works and sometime does'nt
* any help appreciated :bigsmile:
User avatar
nikos
Site Admin
Site Admin
Posts: 15522
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Float the preview panel using Keyboard shortcut?

Post by nikos »

when the pane is floating, use FINDFRAME preview then CMENU dock
I think you should be able to do it now :)
mjbrookes
Bronze Member
Bronze Member
Posts: 112
Joined: 2007 Sep 19, 11:24

Re: Float the preview panel using Keyboard shortcut?

Post by mjbrookes »

Hi Nikos,

Thanks for your help in the new features topic...
use CUSTOMIZE > MACROS > EDIT MACRO menu command and copy/paste the following "code"
CODE: SELECT ALL

ERRORSTOP 0
findframe preview
jumpok floating
FINDWND preview
cmenu float
exit
label floating
cmenu dock
this macro toggles the dock/float mode. You can SAVE it and then you can assign a key to it

is there any way I can assign this macro to key " ` "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

so far I have tried:-
I currently have used customise > Keyboard
to assign this key to command = "Quick Preview Pane"
` 32934 Show or hide the quick previewer pane
I have also assigned the macro to Short-cut-keys Ctrl+0
Ctrl+0 45000 Macros: File Preview - Toggle
but I havn't found a way to assign the single key-press " ` " to command 45000


Thanks for your help
User avatar
nikos
Site Admin
Site Admin
Posts: 15522
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Float the preview panel using Keyboard shortcut?

Post by nikos »

all commands under CUSTOMIZE menu have quirky keyboard assignments (they predate CUSTOMIZE > KEYBOARD command)
so you need to use MACROS > ORGANIZE menu command to assign keyboard shortcuts, and sadly you are limited to some fixed numbers :(
mjbrookes
Bronze Member
Bronze Member
Posts: 112
Joined: 2007 Sep 19, 11:24

Re: Float the preview panel using Keyboard shortcut?

Post by mjbrookes »

Could the macro command numners
45000 - 45059

be added to
> Customise > Keyboard > Category = miscellaneous

so users could then asscoiate macro shortcuts to assigned keys?


If not now, could this be added to the features of the new release?
User avatar
nikos
Site Admin
Site Admin
Posts: 15522
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Float the preview panel using Keyboard shortcut?

Post by nikos »

I suppose one day :)
mjbrookes
Bronze Member
Bronze Member
Posts: 112
Joined: 2007 Sep 19, 11:24

Re: Float the preview panel using Keyboard shortcut?

Post by mjbrookes »

oooooH, Excellent .... :-D :thumbup:


(and I only need to wait for ONE day .... :evilgrin: )
User avatar
nikos
Site Admin
Site Admin
Posts: 15522
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Float the preview panel using Keyboard shortcut?

Post by nikos »

:D
that's the spirit, don't take life too seriously!
Post Reply