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
  [Megapixels] Flash strobe, pictures viewer and MPCamera error 22 freelectro 1 1,525 08-30-2023, 03:59 AM
Last Post: karensather
  Megapixels doesn't work Glenn 4 3,761 08-28-2022, 03:19 PM
Last Post: vortex
  Megapixels and Pinhole Zebulon Walton 0 1,108 06-15-2022, 04:53 PM
Last Post: Zebulon Walton
  Error - megapixels not opening user641 17 12,514 03-29-2022, 03:43 PM
Last Post: bcnaz
  mobian, pinephone camera, and megapixels dawg161 32 34,345 05-01-2021, 02:34 PM
Last Post: NormandC
  Megapixels Crash When Taking Photo ImmyChan 1 2,741 12-25-2020, 08:59 PM
Last Post: pajux
  QR code decoding within megapixels Antoine 1 3,774 09-30-2020, 03:57 PM
Last Post: tllim
  Camera app down, megapixels up daniel 4 6,406 09-22-2020, 07:34 AM
Last Post: bcnaz

Forum Jump:


Users browsing this thread: 1 Guest(s)