Skip to content

CheapNightbot-zz/Media-ShortKeys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Media-ShortKeys

GitHub stars GitHub license Github All Releases

POV: Your keyboard doesn't have Media keys...

Soon I will be migrating this whole code (application) to native C++ code (application); basically rewrite it using C++. I don't know if it's worth or useful anymore, but I wanna do it.

NEVER DOWNLOAD / RUN ANY EXECUTABLE (.EXE) FILE FROM THE INTERNET IF YOU DON'T TRUST THE SOURCE!

But me have created executable if you don't wanna do it using pyinstaller package. You can check the source code.

Hi, since I'm not maintaining the python (version) code for this and I don't think anyone will need this or even try to download from Releases; STILL today I ran the latest release v2.0.1 through VirusTotal to make sure the outdated/un-maintained executable is safe and it's shocking that ONLY MaxSecure flagged it as Trojan.Malware.300983.susgen and I'm sure it's false, but still you should check this Report before downloading the .zip file from Releases.

Todo list 〒▽〒 ヾ( ̄▽ ̄) Done-dana-done

  • Create a GUI for Media-ShortKeys.
  • Can set / change custom key combinations through GUI.
  • Maybe add abbreviation feature through GUI.
  • Update Releases to the latest v2.0.1

Why you need this?

  • Many keyboard comes with Media Keys, which can control any media playing on your device (like; play/pause & volume up/down) and it's Kool...
  • Best example; you are listening to Spotify and you can't change track or simply play/pause songs without being focused to Spotify app window without Media Keys. Spotify shortcuts like 'Ctrl + Right Arrow' doesn't work if you are not focused to Spotify (or app is in system tray).

Feature

Tested on Windows 10 Pro (64-bit)
I'm not sure about any other Operating System.

  • Basiclly it simulates Media Keys on keyboard (but if you want you can do anything xD).

  • Control any media playing on your device by:

    • Play / Pause: Ctrl + Shift + Space
    • Volume Up: Ctrl + Shift + Up Arrow
    • Volume Down: Ctrl + Shift + Down Arrow
    • Mute / Unmute: Ctrl + Shift + M
    • Next: Ctrl + Shift + Right Arrow
    • Previous: Ctrl + Shift + Left Arrow
    • Stop: Ctrl + Alt + Space
  • You can add any key combinations you like. "Default" button to set key combination(s) to default.

  • It can be minimized to the system tray and when focused to the GUI, you can press Ctrl+Q to close the application.

Requirements

NOTE: If you don't want to install all the packages and stuff, check releases. Download and extract .rar file anywhere you like (e.g. C:\Program Files) and just run the Media-ShortKeys.exe.

Make sure to install following packages (pyinstaller is optional. Only install it if you are going to make executable):

keyboard PySide2 pyinstaller

Make executable using pyinstaller

You can simply run following command in terminal:

pyinstaller -n "Media-ShortKeys" --noconsole --icon="assets\keyboard.ico" --add-data="assets;assets" --upx-dir="UPX_DIRECTORY_PATH" --clean app.py
  • -n "App_Name" for naming your .exe file.
  • --noconsole to disable console window.
  • --icon=your_icon.ico will set the icon of application. You can add any image as icon, but make sure it's an .ico file.
  • --add-data="assets;assets" will add "assets" folder containing icon, images, etc. into your application executable folder (basically copy-paste). Without it, you will not be able to see application icon and GUI images when it will run.
  • --upx-dir="UPX_DIRECTORY_PATH" will compress (reduce) the size of our application. Just download UPX, extract it anywhere and copy it's path to this. (UPX is a free utility for compressing executable files and libraries).
  • --clean for cleaning PyInstaller cache and remove temporary files before building.
  • app.py is our python file name.

For detailed information, please refer to Pyinstaller Official Documantation