From 4f02875d4ca2003f6a00699f561f3b85a35475fc Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Tue, 24 Jul 2018 21:03:52 +0200 Subject: [PATCH] change hotkey to alt+x --- README.md | 10 ++++------ raspberry-environment/display.py | 2 +- windows-snapshot-tool/bin/freeze.exe | Bin 401414 -> 401414 bytes windows-snapshot-tool/src/main.cpp | 4 ++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 337240c..f30bf93 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ # Usage Instructions * Plug HDMI into Beamer * Plug USB into Computer - * booting the Raspberry takes approximately ?? seconds. the green led will light up when ready + * booting the Raspberry takes approximately 25 seconds. the green led will light up when ready * start freeze.exe from the (now attached) USB-Drive - * press WindowsKey+Y or Alt+PRINTSCREEN to take a screenshot + * press button on device or ALT+X or Alt+PRINTSCREEN to take a screenshot * simply unplug after use ## Other features @@ -84,7 +84,5 @@ mount -o remount,rw /boot ## ToDo - * dritte led für boot?: dtoverlay=gpio-poweroff,gpiopin=23,active_low - * gpio pins ändern - * screenshot-tool option für sofortigen screenshot - * hdmi regelmäßig überprüfen ob inaktiv \ No newline at end of file + * bessere tastenkombination + * hdmi regelmäßig überprüfen ob inaktiv diff --git a/raspberry-environment/display.py b/raspberry-environment/display.py index 9d89154..b9b6084 100644 --- a/raspberry-environment/display.py +++ b/raspberry-environment/display.py @@ -129,7 +129,7 @@ def os_echo_bin(filename, string): def send_keypress(): with open('/dev/hidg0', 'wb') as f: #f.write(bytearray(b'\x00\x00\x04\x00\x00\x00\x00\x00')) #press the A-button - f.write(bytearray(b'\x08\x00\x1C\x00\x00\x00\x00\x00')) #press Win+Y + f.write(bytearray(b'\x04\x00\x1B\x00\x00\x00\x00\x00')) #press Alt+X time.sleep(0.05) f.write(bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00')) #release all keys diff --git a/windows-snapshot-tool/bin/freeze.exe b/windows-snapshot-tool/bin/freeze.exe index cd783dfa45f02364ffbeb03c30ac79cb3098b29d..8ea7bbc563815964e8de95e1dcd8bd390372cb34 100755 GIT binary patch delta 56 zcmZoWAklU}VnPSgrt*nheoS1Z8*j05Ge%72=TU3s;A!XJVFY3(AZ7+)79eKb&cVa> GPZ$9EPY(kC delta 60 zcmZoWAklU}VnPR#RqDhpKc-1q8*j05b4D^SFdTPL;oxX~#ohjjn-PeafS4JGS%8>z K`zvlX84&=EtrV~T diff --git a/windows-snapshot-tool/src/main.cpp b/windows-snapshot-tool/src/main.cpp index 21bc0a7..cac1fc5 100644 --- a/windows-snapshot-tool/src/main.cpp +++ b/windows-snapshot-tool/src/main.cpp @@ -93,9 +93,9 @@ int WINAPI WinMain (HINSTANCE hThisInstance, /*Initialize the NOTIFYICONDATA structure only once*/ InitNotifyIconData(); - /* register hotkey. 0x59 is 'y' so win+y or print * + /* register hotkey. 0x58 is 'x' so alt+x or print * * see: https://docs.microsoft.com/de-de/windows/desktop/inputdev/virtual-key-codes */ - if (!RegisterHotKey(NULL, WM_HOTKEY_FREEZE, MOD_WIN, 0x59) + if (!RegisterHotKey(NULL, WM_HOTKEY_FREEZE, MOD_ALT, 0x58) || !RegisterHotKey(NULL, WM_HOTKEY_FREEZE, MOD_ALT, 0x2c)) { FatalAppExit(0, TEXT("Couldn't register hotkey!")); }