Browse Source

change hotkey to alt+x

main
Hendrik Langer 6 years ago
parent
commit
4f02875d4c
  1. 10
      README.md
  2. 2
      raspberry-environment/display.py
  3. BIN
      windows-snapshot-tool/bin/freeze.exe
  4. 4
      windows-snapshot-tool/src/main.cpp

10
README.md

@ -2,9 +2,9 @@
# Usage Instructions # Usage Instructions
* Plug HDMI into Beamer * Plug HDMI into Beamer
* Plug USB into Computer * 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 * 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 * simply unplug after use
## Other features ## Other features
@ -84,7 +84,5 @@ mount -o remount,rw /boot
## ToDo ## ToDo
* dritte led für boot?: dtoverlay=gpio-poweroff,gpiopin=23,active_low * bessere tastenkombination
* gpio pins ändern * hdmi regelmäßig überprüfen ob inaktiv
* screenshot-tool option für sofortigen screenshot
* hdmi regelmäßig überprüfen ob inaktiv

2
raspberry-environment/display.py

@ -129,7 +129,7 @@ def os_echo_bin(filename, string):
def send_keypress(): def send_keypress():
with open('/dev/hidg0', 'wb') as f: 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'\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) time.sleep(0.05)
f.write(bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00')) #release all keys f.write(bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00')) #release all keys

BIN
windows-snapshot-tool/bin/freeze.exe

Binary file not shown.

4
windows-snapshot-tool/src/main.cpp

@ -93,9 +93,9 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
/*Initialize the NOTIFYICONDATA structure only once*/ /*Initialize the NOTIFYICONDATA structure only once*/
InitNotifyIconData(); 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 */ * 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)) { || !RegisterHotKey(NULL, WM_HOTKEY_FREEZE, MOD_ALT, 0x2c)) {
FatalAppExit(0, TEXT("Couldn't register hotkey!")); FatalAppExit(0, TEXT("Couldn't register hotkey!"));
} }

Loading…
Cancel
Save