How to use Megapixels and QR codes? - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139) +---- Thread: How to use Megapixels and QR codes? (/showthread.php?tid=13738) |
How to use Megapixels and QR codes? - Zebulon Walton - 04-29-2021 How does QR code scanning in Megapixels work? Tapping on the code brings up a menu with a "Copy" button. Tap on that and the data is copied - where? How to access it? Thinking it might go into the paste buffer I tried using ctrl-v to paste the data into another program but that didn't work. RE: How to use Megapixels and QR codes? - kqlnut - 04-29-2021 Starting to learn C I took the opportunity to glance over the source code since I had the same problem that copying the QR code's content doesn't work. I found that the content is being copied into the primary selection clipboard (line 503) which is usually pasted with a middle mouse click. I don't know of a corresponding keyboard shortcut, so I connected a mouse and lo and behold, pressing the middle mouse button (or rather the scroll wheel) pastes the content! I will propose a patch when I have the time to figure out how to do that (unless someone of the developers sees this before and is faster). Edit: Apparently shift + insert is a common shortcut to paste the primary selection, but it doesn't work with my keyboard. Also there is no way to reach that shortcut with squeekboard's terminal layout. For now maybe you can find a way to map a custom keyboard shortcut or use wl-clipboard (wl-paste --primary), that should work too. RE: How to use Megapixels and QR codes? - Zebulon Walton - 04-29-2021 I was a C programmer 40 years ago, still have my original K&R book. Have been away from it for a long time now though, and should have remembered the old adage that "the source is the documentation". Thanks, will give it a try with a mouse! (We really need a way to emulate right and middle mouse clicks through the GUI.) RE: How to use Megapixels and QR codes? - awaittrot - 05-06-2021 megapixels before v1.0.0 use "primary" clipboard, which phosh does not use. This behavior has changed recently and copy-paste should work when mobian updates the package. As a workaround, you can use wl-copy / wl-paste command to move the contents from primary to default clipboard. Code: wl-paste --primary | wl-copy Note: megapixels application must be keep opened while retrieving the contents from clipboard. |