0

I have a RP4 and want to remap a button from my keyboard to be a dedicated shutdown button. I don't really want to add an external shutdown/power switch to it since my power supply unit has a power switch.

The Keyboard is a Logitech K400 plus with european/german keymapping and I am an absolut beginner with coding, the Pi and anything regarded to it. So please have patience with me ^^

I searched through various similar threads here, but did not find one, that is about this specific topic. So if there is already one and I have overseen this, please excuse me for that and post the link.

With best regards Siggi

Siggi
  • 1
  • does this help at all – Jaromanda X Jun 25 '20 at 00:28
  • first one looks pretty good to me, I will try it and give feedback on it thank you very much for this quick answer – Siggi Jun 25 '20 at 01:03
  • I followed everything in the first link and prepared what I would type in but when I wrote sudo nano etc/xdg/openbox/lxde-pi-rc.xml it said that "etc/xdg/openbox does not exist"

    the command for the keybinding would have been:

    sudo poweroff or instead of "C-A-p" "0x1008ff2f" which is fn+Ins (the keyboard standby button) is at least this command correct? but I really dont know why sudo nano etc/xdg/openbox/lxde-pi-rc.xml did not work do I need to create/prepare it for the first link?

    – Siggi Jun 25 '20 at 01:49
  • btw this is what I installed as OS https://www.raspberrypi.org/downloads/noobs/ just this and nothing else – Siggi Jun 25 '20 at 01:56
  • oh, NOOBS .. can't do it in noobs – Jaromanda X Jun 25 '20 at 01:57
  • someone else told me I forgot the first "/" in "sudo nano /etc/xdg/openbox/lxde-pi-rc.xml

    I followed his advice and the window popped up just like in the first link yours and followed the steps accordingly and entered

    sudo poweroff

    and it works :D thank you for your contribution <3

    – Siggi Jun 25 '20 at 02:28
  • Please don't use comments for details. They are unreadable because they are not made for this. Instead edit your question and add it there. – Ingo Jun 25 '20 at 16:41

0 Answers0