Global shortcuts

Problems, bugs, suggestions... anything related to SMPlayer.

Global shortcuts

Postby colibris79 » Tue Feb 21, 2017 1:50 am

Hi,
I've been trying to use the global shortcuts but I haven't been able to find out how :oops: . Under Preferences-Keyboard/mouse I just have the normal shortcuts and they don't work when Smplayer is not as the active window. I'm using Smplayer 17.2.0 under Mint 17.3 (Ubuntu 14.04)
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Global shortcuts

Postby rvm » Tue Feb 21, 2017 2:32 am

The global shortcuts only work when SMPlayer is compiled with Qt 5.
You can find packages compiled with Qt 5 for Ubuntu here:
http://software.opensuse.org/download.h ... e=smplayer
rvm
Site Admin
 
Posts: 2787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: Global shortcuts

Postby colibris79 » Tue Feb 21, 2017 3:10 am

Hi rvm. Thanks for the answer. I've installed the one with qt5 but haven't been able to use them yet :?
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Global shortcuts

Postby rvm » Tue Feb 21, 2017 12:10 pm

You need to enable the option "use the multimedia keys as global shortcuts" in preferences -> keyboard and mouse.
rvm
Site Admin
 
Posts: 2787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: Global shortcuts

Postby colibris79 » Tue Feb 21, 2017 12:24 pm

I did. I guess it is because this keyboard has the multimedia keys with the Fn key. Is there any way to set other keys apart from the multimedia ones to the global shortcuts?
EDIT: I've tried the keyboard with vlc and the multimedia keys work. Also tried with another keyboard with multimedia keys and they work in vlc but not in Smplayer. Anything else I could change?
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Global shortcuts

Postby rvm » Wed Feb 22, 2017 2:29 am

colibris79 wrote:I did. I guess it is because this keyboard has the multimedia keys with the Fn key. Is there any way to set other keys apart from the multimedia ones to the global shortcuts?


Currently only the multimedia keys are supported.

colibris79 wrote:EDIT: I've tried the keyboard with vlc and the multimedia keys work. Also tried with another keyboard with multimedia keys and they work in vlc but not in Smplayer. Anything else I could change?


Press the multimedia keys and send the smplayer log.
rvm
Site Admin
 
Posts: 2787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: Global shortcuts

Postby colibris79 » Thu Feb 23, 2017 3:07 am

When I press the media keys nothing shows in the log:
Code: Select all
[10:07:18:778] global_init
[10:07:18:778] global_init: config file: '/home/mik/.config/smplayer/smplayer.ini'
[10:07:18:778] Preferences::load
[10:07:18:779] AssStyles::load
[10:07:18:779] Translator::loadCatalog: can't load qt_es_ES from /usr/share/smplayer/translations
[10:07:18:779] Translator::loadCatalog: successfully loaded qt_es_ES from /usr/share/qt5/translations
[10:07:18:779] Translator::loadCatalog: can't load qtbase_es_ES from /usr/share/smplayer/translations
[10:07:18:779] Translator::loadCatalog: can't load qtbase_es_ES from /usr/share/qt5/translations
[10:07:18:779] Translator::loadCatalog: successfully loaded smplayer_es_ES from /usr/share/smplayer/translations
[10:07:18:779] SMPlayer v. 17.2.0 (revisión 8426) ejecutándose en Linux
[10:07:18:779] Compiled with Qt v. 5.2.1, using 5.2.1
[10:07:18:779]  * application path: "/usr/bin"
[10:07:18:779]  * data path: "/usr/share/smplayer"
[10:07:18:779]  * translation path: "/usr/share/smplayer/translations"
[10:07:18:779]  * doc path: "/usr/share/doc/smplayer"
[10:07:18:779]  * themes path: "/usr/share/smplayer/themes"
[10:07:18:780]  * shortcuts path: "/usr/share/smplayer/shortcuts"
[10:07:18:780]  * config path: "/home/mik/.config/smplayer"
[10:07:18:780]  * ini path: "/home/mik/.config/smplayer"
[10:07:18:780]  * file for subtitles' styles: "/home/mik/.config/smplayer/styles.ass"
[10:07:18:780]  * current path: "/home/mik"
[10:07:18:780] SMPlayer::processArgs: arguments: 1
[10:07:18:780] SMPlayer::processArgs: 0 = smplayer
[10:07:18:780] SMPlayer::processArgs: files_to_play: count: 0
[10:07:18:780] SMPlayer::gui: changed working directory to app path
[10:07:18:780] SMPlayer::gui: current directory: /usr/bin
[10:07:18:780] Screen::setAutoHideCursor: 0
[10:07:18:780] Screen::setAutoHideCursor: 0
[10:07:18:781] Images::setThemesPath: "/usr/share/smplayer/themes"
[10:07:18:781] Images::resourceFilename: "/usr/share/smplayer/themes/PapirusDark/PapirusDark.rcc"
[10:07:18:781] Images::setTheme: loading "/usr/share/smplayer/themes/PapirusDark/PapirusDark.rcc"
[10:07:18:781] Images::setTheme: has_rcc: true
[10:07:18:784] MediaSettings::reset
[10:07:18:784] Core::changeFileSettingsMethod: hash
[10:07:18:784] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:784] PlayerProcess::createPlayerProcess: creating MPVProcess
[10:07:18:784] MediaSettings::reset
[10:07:18:784] MplayerLayer::setRepaintBackground: 0
[10:07:18:784] Preferences::monitor_aspect_double
[10:07:18:784]  warning: monitor_aspect couldn't be parsed!
[10:07:18:784]  monitor_aspect set to 0
[10:07:18:797] Sig::load
[10:07:18:835] Playlist::setModified: 0
[10:07:18:835] Playlist::updateWindowTitle: "Lista de reproducción sin nombre"
[10:07:18:837] Recents::addItem: 'http://smplayer.info/sample.m3u8'
[10:07:18:837] Playlist::setConfigPath: "/home/mik/.config/smplayer"
[10:07:18:837] Playlist::setConfigPath: ini file: "/home/mik/.config/smplayer/playlist.ini"
[10:07:18:837] Playlist::loadSettings
[10:07:18:837] Helper::qtVersion: 5201
[10:07:18:843] Playlist::updateWindowTitle: "/home/mik/Escritorio/Relax.m3u"
[10:07:18:843] Playlist::setModified: 0
[10:07:18:843] Playlist::updateWindowTitle: "/home/mik/Escritorio/Relax.m3u"
[10:07:18:847] BaseGui::BaseGui: default_style: "gtk+"
[10:07:18:848] Favorites::load
[10:07:18:849] Favorites::load
[10:07:18:849] TVList::parse_channels_conf
[10:07:18:849] VList::parse_channels_conf: /home/mik/.mplayer/channels.conf.ter doesn't exist
[10:07:18:849] TVList::parse_channels_conf: can't open /home/mik/.mplayer/channels.conf
[10:07:18:849] Favorites::load
[10:07:18:849] TVList::parse_channels_conf
[10:07:18:849] VList::parse_channels_conf: /home/mik/.mplayer/channels.conf.ter doesn't exist
[10:07:18:849] TVList::parse_channels_conf: can't open /home/mik/.mplayer/channels.conf
[10:07:18:851] BaseGui::initializeMenus
[10:07:18:852] BaseGui::updateBookmarks
[10:07:18:858] BaseGui::initializeMenus
[10:07:18:858] BaseGui::updateBookmarks
[10:07:18:858] BaseGui::updateRecents
[10:07:18:860] BaseGui::updateWidgets
[10:07:18:860] Core::togglePostprocessing: 1
[10:07:18:860] Core::changeSubVisilibity: 1
[10:07:18:860] WARNING: PlayerProcess::writeToStdin: process not running
[10:07:18:860] Core::displayMessage
[10:07:18:860] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:860] BaseGui::setupNetworkProxy
[10:07:18:860] BaseGui::setupNetworkProxy: no proxy
[10:07:18:860] BaseGui::setStayOnTop: 0
[10:07:18:860] BaseGui::setStayOnTop: nothing to do
[10:07:18:860] BaseGui::updateWidgets
[10:07:18:860] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:860] BaseGui::updateRecents
[10:07:18:862] UpdateChecker::UpdateChecker: enabled: true
[10:07:18:862] UpdateChecker::UpdateChecker: days_to_check: 7
[10:07:18:862] UpdateChecker::UpdateChecker: days since last check: 6
[10:07:18:863] BaseGuiPlus::updateSendToScreen
[10:07:18:863] BaseGuiPlus::updateSendAudioMenu
[10:07:18:863] DeviceInfo::paDevices
[10:07:18:868] DeviceInfo::paDevices: index: 0
[10:07:18:868] DeviceInfo::paDevices: name: "alsa_output.pci-0000_00_1b.0.analog-stereo"
[10:07:18:873] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:873] GlobalShortcuts::GlobalShortcuts
[10:07:18:874] GlobalShortcuts::setEnabled: true
[10:07:18:874] GlobalShortcuts::registerShortcut: nativeKey: 121
[10:07:18:874] GlobalShortcuts::registerShortcut: nativeKey: 122
[10:07:18:875] GlobalShortcuts::registerShortcut: nativeKey: 123
[10:07:18:875] GlobalShortcuts::registerShortcut: nativeKey: 171
[10:07:18:875] GlobalShortcuts::registerShortcut: nativeKey: 172
[10:07:18:876] GlobalShortcuts::registerShortcut: nativeKey: 173
[10:07:18:876] GlobalShortcuts::registerShortcut: nativeKey: 174
[10:07:18:876] GlobalShortcuts::registerShortcut: nativeKey: 175
[10:07:18:876] GlobalShortcuts::registerShortcut: nativeKey: 209
[10:07:18:876] Chromecast::loadSettings
[10:07:18:879] BaseGui::initializeMenus
[10:07:18:879] BaseGui::updateBookmarks
[10:07:18:879] BaseGui::updateRecents
[10:07:18:881] BaseGuiPlus::updateWidgets
[10:07:18:881] BaseGui::updateWidgets
[10:07:18:881] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:882] BaseGuiPlus::loadConfig
[10:07:18:882] DefaultGui::createStatusBar
[10:07:18:882] StateWidget::StateWidget: supported formats for QMovie: ("gif")
[10:07:18:883] DefaultGui::createActions
[10:07:18:883] DefaultGui::createControlWidget
[10:07:18:883] DefaultGui::createControlWidgetMini
[10:07:18:883] AutohideWidget::installFilter: child name: "mplayerlayer"
[10:07:18:883] AutohideWidget::installFilter: child name: "mplayerwindowlogo"
[10:07:18:883] AutohideWidget::installFilter: child name: ""
[10:07:18:884] DefaultGui::adjustFloatingControlSize
[10:07:18:884] DefaultGui::populateMainMenu
[10:07:18:884] BaseGuiPlus::populateMainMenu
[10:07:18:884] BaseGui::populateMainMenu
[10:07:18:886] BaseGui::initializeMenus
[10:07:18:886] BaseGui::updateBookmarks
[10:07:18:886] BaseGui::updateRecents
[10:07:18:888] DefaultGui::updateWidgets
[10:07:18:888] BaseGuiPlus::updateWidgets
[10:07:18:888] BaseGui::updateWidgets
[10:07:18:888] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:888] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:888] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:889] DefaultGui::loadConfig
[10:07:18:889] DesktopInfo::isInsideScreen: geometry of screen: x:0 y:0 w:1600 h:900
[10:07:18:889] ToolbarEditor::load: 'toolbar1'
[10:07:18:889] ToolbarEditor::load: loading action open_file
[10:07:18:889] ToolbarEditor::load: loading action open_url
[10:07:18:889] ToolbarEditor::load: loading action favorites_menu
[10:07:18:889] ToolbarEditor::load: loading action separator
[10:07:18:889] ToolbarEditor::load: adding separator
[10:07:18:889] ToolbarEditor::load: loading action screenshot
[10:07:18:889] ToolbarEditor::load: loading action separator
[10:07:18:889] ToolbarEditor::load: adding separator
[10:07:18:889] ToolbarEditor::load: loading action show_file_properties
[10:07:18:889] ToolbarEditor::load: loading action show_playlist
[10:07:18:890] ToolbarEditor::load: loading action show_tube_browser
[10:07:18:890] ToolbarEditor::load: loading action separator
[10:07:18:890] ToolbarEditor::load: adding separator
[10:07:18:890] ToolbarEditor::load: loading action show_preferences
[10:07:18:890] ToolbarEditor::load: loading action separator
[10:07:18:890] ToolbarEditor::load: adding separator
[10:07:18:890] ToolbarEditor::load: loading action play_prev
[10:07:18:890] ToolbarEditor::load: loading action play_next
[10:07:18:890] ToolbarEditor::load: loading action separator
[10:07:18:890] ToolbarEditor::load: adding separator
[10:07:18:890] ToolbarEditor::load: loading action audiotrack_menu
[10:07:18:890] ToolbarEditor::load: loading action subtitlestrack_menu
[10:07:18:890] ToolbarEditor::load: 'controlwidget'
[10:07:18:890] ToolbarEditor::load: loading action play_or_pause
[10:07:18:890] ToolbarEditor::load: loading action stop
[10:07:18:890] ToolbarEditor::load: loading action separator
[10:07:18:890] ToolbarEditor::load: adding separator
[10:07:18:890] ToolbarEditor::load: loading action rewindbutton_action
[10:07:18:890] ToolbarEditor::load: loading action timeslider_action
[10:07:18:890] TimeSlider::setDragDelay: 100
[10:07:18:890] ToolbarEditor::load: loading action forwardbutton_action
[10:07:18:890] ToolbarEditor::load: loading action separator
[10:07:18:890] ToolbarEditor::load: adding separator
[10:07:18:890] ToolbarEditor::load: loading action fullscreen
[10:07:18:890] ToolbarEditor::load: loading action mute
[10:07:18:890] ToolbarEditor::load: loading action volumeslider_action
[10:07:18:891] ToolbarEditor::load: loading action quick_access_menu
[10:07:18:891] ToolbarEditor::load: 'controlwidget_mini'
[10:07:18:891] ToolbarEditor::load: loading action play_or_pause
[10:07:18:891] ToolbarEditor::load: loading action stop
[10:07:18:891] ToolbarEditor::load: loading action separator
[10:07:18:891] ToolbarEditor::load: adding separator
[10:07:18:891] ToolbarEditor::load: loading action rewind1
[10:07:18:891] ToolbarEditor::load: loading action timeslider_action
[10:07:18:891] TimeSlider::setDragDelay: 100
[10:07:18:891] ToolbarEditor::load: loading action forward1
[10:07:18:891] ToolbarEditor::load: loading action separator
[10:07:18:891] ToolbarEditor::load: adding separator
[10:07:18:891] ToolbarEditor::load: loading action mute
[10:07:18:891] ToolbarEditor::load: loading action volumeslider_action
[10:07:18:891] ToolbarEditor::load: 'floating_control'
[10:07:18:891] ToolbarEditor::load: loading action play_or_pause
[10:07:18:891] ToolbarEditor::load: loading action stop
[10:07:18:891] ToolbarEditor::load: loading action separator
[10:07:18:891] ToolbarEditor::load: adding separator
[10:07:18:891] ToolbarEditor::load: loading action rewind1
[10:07:18:892] ToolbarEditor::load: loading action current_timelabel_action
[10:07:18:892] ToolbarEditor::load: loading action timeslider_action
[10:07:18:892] TimeSlider::setDragDelay: 100
[10:07:18:892] ToolbarEditor::load: loading action total_timelabel_action
[10:07:18:892] ToolbarEditor::load: loading action forward1
[10:07:18:892] ToolbarEditor::load: loading action separator
[10:07:18:892] ToolbarEditor::load: adding separator
[10:07:18:892] ToolbarEditor::load: loading action fullscreen
[10:07:18:892] ToolbarEditor::load: loading action mute
[10:07:18:892] ToolbarEditor::load: loading action volumeslider_action
[10:07:18:893] Helper::qtVersion: 5201
[10:07:18:894] DefaultGui::loadConfig: playlist visible: 0
[10:07:18:894] DefaultGui::loadConfig: playlist position: 0, 0
[10:07:18:894] DefaultGui::loadConfig: playlist size: 491 x 182
[10:07:18:894] DefaultGui::updateWidgets
[10:07:18:894] BaseGuiPlus::updateWidgets
[10:07:18:894] BaseGui::updateWidgets
[10:07:18:894] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:894] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:894] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:894] BaseGui::applyStyles
[10:07:18:894] BaseGui::applyStyles: stylesheet: "PapirusDark"
[10:07:18:894] BaseGui::changeStyleSheet: "PapirusDark"
[10:07:18:894] BaseGui::loadQss: :/default-theme/style.qss
[10:07:18:895] Images::setThemesPath: "/usr/share/smplayer/themes"
[10:07:18:895] Images::setTheme: unloading "/usr/share/smplayer/themes/PapirusDark/PapirusDark.rcc"
[10:07:18:895] Images::resourceFilename: "/usr/share/smplayer/themes/PapirusDark/PapirusDark.rcc"
[10:07:18:895] Images::setTheme: loading "/usr/share/smplayer/themes/PapirusDark/PapirusDark.rcc"
[10:07:18:895] Images::setTheme: has_rcc: true
[10:07:18:909] BaseGui::applyStyles: style: "GTK+"
[10:07:18:934] BaseGuiPlus::dockVisibilityChanged: 1
[10:07:18:934] BaseGuiPlus::stretchWindow
[10:07:18:934] BaseGui::showEvent
[10:07:18:940] BaseGui::loadActions
[10:07:18:940] ActionsEditor::loadFromConfig
[10:07:18:957] BaseGui::initializeMenus
[10:07:18:957] BaseGui::updateBookmarks
[10:07:18:957] BaseGui::updateRecents
[10:07:18:959] DefaultGui::updateWidgets
[10:07:18:959] BaseGuiPlus::updateWidgets
[10:07:18:959] BaseGui::updateWidgets
[10:07:18:959] BaseGuiPlus::showPlaylist: 1
[10:07:18:959] BaseGuiPlus::showPlaylist (before): playlist visible: 1
[10:07:18:959] BaseGuiPlus::showPlaylist (before): playlist position: 294, 69
[10:07:18:959] BaseGuiPlus::showPlaylist (before): playlist size: 580 x 295
[10:07:18:959] BaseGuiPlus::showPlaylist (after): playlist visible: 1
[10:07:18:959] BaseGuiPlus::showPlaylist (after): playlist position: 294, 69
[10:07:18:959] BaseGuiPlus::showPlaylist (after): playlist size: 580 x 295
[10:07:18:959] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:959] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:18:959] PlayerID::Player: player_bin: "/usr/bin/mpv" filename: "mpv"
[10:07:19:862] BaseGui::checkReminder
[10:07:20:963] BaseGui::checkIfUpgraded
[10:07:23:801] BaseGui::showLog
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Global shortcuts

Postby rvm » Thu Feb 23, 2017 12:54 pm

That's weird, there should be something like this:
Code: Select all
Debug: GlobalShortcuts::nativeEventFilter: keycode: 172
Debug: GlobalShortcuts::activateShortcut: Qt::Key(Key_MediaPlay) shortcut: QKeySequence("Media Play")
Debug: GlobalShortcuts::activateShortcut: action found: "play_or_pause" enabled: true
Debug: GlobalShortcuts::nativeEventFilter: keycode: 174
Debug: GlobalShortcuts::activateShortcut: Qt::Key(Key_MediaStop) shortcut: QKeySequence("Media Stop")
Debug: GlobalShortcuts::activateShortcut: action found: "stop" enabled: true
Debug: GlobalShortcuts::nativeEventFilter: keycode: 173
Debug: GlobalShortcuts::activateShortcut: Qt::Key(Key_MediaPrevious) shortcut: QKeySequence("Media Previous")
Debug: GlobalShortcuts::activateShortcut: action found: "play_prev" enabled: true
Debug: GlobalShortcuts::nativeEventFilter: keycode: 171
Debug: GlobalShortcuts::activateShortcut: Qt::Key(Key_MediaNext) shortcut: QKeySequence("Media Next")
Debug: GlobalShortcuts::activateShortcut: action found: "play_next" enabled: true
rvm
Site Admin
 
Posts: 2787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Re: Global shortcuts

Postby colibris79 » Thu Feb 23, 2017 1:12 pm

I don't know, maybe there was something wrong with the installation?. I downloaded the deb package from the page you mentioned.
colibris79
 
Posts: 49
Joined: Wed Jun 08, 2016 4:27 am

Re: Global shortcuts

Postby rvm » Thu Feb 23, 2017 9:08 pm

I don't think it's an installation problem.
Maybe your computer is returning different key codes than the ones that smplayer expects.

I can give you the test application I used to implement this feature, it displays the key codes of the keys as you press them. But you would have to compile it.
rvm
Site Admin
 
Posts: 2787
Joined: Wed Dec 23, 2009 1:25 am
Location: España

Next

Return to General

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron