How to change, or/and create new keyboard shortcuts

Frequently Asked Questions regarding XnView (including Answers)

Moderators: XnTriq, helmut, xnview

User avatar
Dreamer
XnThusiast
Posts: 4578
Joined: Sun Jul 25, 2004 9:08 pm
Location: Slovakia

How to change, or/and create new keyboard shortcuts

Postby Dreamer » Tue Jan 30, 2007 11:45 pm

The current keyboard hotkeys and shortcuts are described in topic 'All Current keyboard Hotkeys & Shortcuts'.

___

It's impossible to change hotkeys / shortcuts in XnView Classic, but there is a workaround - HotkeyP (freeware). Read HotkeyP Help for more information.

It's possible to change, or make new keyboard shorcuts and it's possible to make also global keyboard shorcuts and even use XnView by remote control.

Global guides for all types of keyboard shortcuts:

How to find a command number for desired action:

1. Run XnView.
2. Spy from HotkeyP menu > File.
3. Make desired action (by menu or existing keyboard shortcut) in XnView.
4. Number in "Command" column in Spy is a command number you have to use below as the first parameter.

How to use use a second parameter:

- xnview.exe&(XmainClass|XprevClass) means that keyboard shortcut will be used in Browser, Viewer, Edit fullscreen and Browser fullscreen
- xnview.exe&XmainClass means that keyboard shortcut will be used in Browser, Viewer and Edit fullscreen
- xnview.exe&XprevClass means that keyboard shortcut will be used in Browser fullscreen
- xnview.exe means that keyboard shortcut will be used in in all modes including dialogs (e.g. Rename dialog), so this way it's impossible to make single letter hotkeys, useful for global keyboard shortcuts and remote control

The same "Window Class" is used for Browser, Viewer and Edit fullscreen, therefore usage of the same keyboard shortcuts for different actions in more modes is limited - but not impossible, it might work in some cases.

Custom keyboard shortcuts:

Guide - how to make new commands in HotkeyP for XnView:

1. Go to menu > Hotkey > and select Insert new.
2. Press a new key / shortcut, e.g. F10
3. In Command field type Command to active window, or choose it from [<] button menu.
4. In Parameters field type a command number (more above), xnview.exe and "Window Class", e.g. 300 xnview.exe&(XmainClass|XprevClass)
5. Press Enter or use OK button to confirm.
6. For additional commands go to menu > Hotkey select Duplicate and repeat steps 2 - 5, just change a hotkey - F10, a command number - 300, if appropriate "Window Class", more in HotkeyP Help.

Global keyboard shortcuts:

Guide - how to make new commands in HotkeyP for XnView:

1. Go to menu > Hotkey > and select Insert new.
2. Press a new shortcut, e.g. Ctrl+Shift+Right
3. In Command field type Send window command, or choose it from [<] button menu.
4. In Parameters field type a command number (more above) and xnview.exe, e.g. 43 xnview.exe
5. Press Enter or use OK button to confirm.
6. For additional commands go to menu > Hotkey > select Duplicate and repeat steps 2 - 5, just change a hotkey - Ctrl+Shift+Right and a command number - 43, more in HotkeyP Help.

Remote control:

You will need WinLIRC (freeware) and supported remote control. Read HotkeyP and WinLIRC Help for more information.

Guide - how to make new commands in HotkeyP for XnView:

1. Download, install, run and set up WinLIRC.
2. In HotkeyP, go to menu > Window > select Options, Remote tab and enable and set up WinLIRC.
3. Go to menu > Hotkey > and select Insert new.
4. Press a new button, e.g. CH+
5. In Command field type Send window command, or choose it from [<] button menu.
6. In Parameters field type a command number (more above) and xnview.exe, e.g. 43 xnview.exe
7. Press Enter or use OK button to confirm.
8. For additional commands go to menu > Hotkey > select Duplicate and repeat steps 4 - 7, just change a hotkey/button - CH+ and a command number - 43, more in HotkeyP Help.

Notes:

- In most cases just the custom keyboard shortcuts make sense, but aso global shortcuts and remote control might be useful sometimes.
- Global keyboard shortcuts will work also if XnView window is not active!
- Global keyboard shortcuts and Remote control don't work in Browser fullscreen, but there is a workaround, use Send keys to window instead of Send window command and type existing/old keyboard shorctut instead of command number, e.g. \pagedown, more in HotkeyP Help.
- You can use also keyboard shortcuts or buttons to Insert new commands, Duplicate, Edit or Delete (not all buttons are enabled by default) in HotkeyP.
- If you have any problem or question, start a new topic in General Support section, but please read the HotkeyP (and WinLIRC) Help first.
Dreamer

User avatar
Dreamer
XnThusiast
Posts: 4578
Joined: Sun Jul 25, 2004 9:08 pm
Location: Slovakia

Small guide for the capture command line options

Postby Dreamer » Tue Aug 14, 2007 6:01 pm

Small guide for the capture command line options.

1. Go to HotkeyP menu > Hotkey > and select "Create new"

2. Use any keyboard/mouse shortcut as a Hot Key

3. Command - it's the same for all options, it's a path to xnview.exe, by default:

C:\Program Files\XnView\xnview.exe

4. Parameters - few examples:

-capture=window
-capture=desktop

-capture=window,c:\file.ext
-capture=desktop,c:\file.ext

-capture=window,c:\file#.ext
-capture=desktop,c:\file_###.ext

-capture=window,d:\screenshot$.ext
-capture=desktop,d:\screenshot_$.ext


# is a number index - #=1, 2, 3..., ###=001, 002, 003...
$ is a date and time - 08132007_214818

Extension is taken from the Capture setup dialog. Path and file name is customizable. Screenshot is created, saved and then XnView exits, when using path and file name.

If you want to open the screenshot in XnView, then don't use path and file name parameters and use option "Open in XnView" in the Capture dialog.

You can create a desktop shortcut with those parameters and assign a shortcut key / hotkey, then it's possible to make screenshot(s) with a single key - even without HotkeyP.
Dreamer


Return to “XnView - FAQ”

Who is online

Users browsing this forum: No registered users and 1 guest