How to use Megapixels and QR codes?
#1
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.
  Reply
#2
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.
  Reply
#3
I was a C programmer 40 years ago, still have my original K&R book. Smile 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.)
  Reply
#4
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.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  mobian, pinephone camera, and megapixels dawg161 34 5,128 05-01-2021, 02:34 PM
Last Post: NormandC
  Megapixels Crash When Taking Photo ImmyChan 1 732 12-25-2020, 08:59 PM
Last Post: pajux
  QR code decoding within megapixels Antoine 1 1,113 09-30-2020, 03:57 PM
Last Post: tllim
  Camera app down, megapixels up daniel 4 1,948 09-22-2020, 07:34 AM
Last Post: bcnaz

Forum Jump:


Users browsing this thread: 1 Guest(s)