Hello,
I recently decided to use Pynput for a project on my Zero W 2 Pi in order to control some motors. The motors work with other code, but that code doesn't let me use the arrow keys so I decided to use pynput. I code primarily on my laptop and test functionality using print statements, and my code works perfectly on my laptop. I press the arrow key and it prints out the correct statement. When I pulled the repo onto my pi and tested out the code, none of the input worked. Instead of printing a statement when I press a key on my bluetooth keyboard, it instead types it and when I hit enter nothing happens. Even worse, when I hit an arrow key it instead types "^[[A" or something like that. Why is it doing this? Can someone help me? I'm so confused on why it works on my laptop and not my pi.
Laptop View: Pi View:
I recently decided to use Pynput for a project on my Zero W 2 Pi in order to control some motors. The motors work with other code, but that code doesn't let me use the arrow keys so I decided to use pynput. I code primarily on my laptop and test functionality using print statements, and my code works perfectly on my laptop. I press the arrow key and it prints out the correct statement. When I pulled the repo onto my pi and tested out the code, none of the input worked. Instead of printing a statement when I press a key on my bluetooth keyboard, it instead types it and when I hit enter nothing happens. Even worse, when I hit an arrow key it instead types "^[[A" or something like that. Why is it doing this? Can someone help me? I'm so confused on why it works on my laptop and not my pi.
Laptop View: Pi View:
Statistics: Posted by 30jmn — Tue Apr 22, 2025 8:19 pm