WANTED: Pet to invoke Print Screen Function key (SOLVED)

Requests go here. If you fill a request, give it a new thread in the appropriate category and then link to it in the request thread.
Message
Author
B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

WANTED: Pet to invoke Print Screen Function key (SOLVED)

#1 Post by B.K. Johnson »

Hi Guys

Take A Shot
and Screeny both do the job of taking screenshots, but if I want to take a screenshot when the Menu is active, I can't or should I say, I don't know how. Would it be heresy to ask for an app that uses the Print Screen function key? Either Print Screen alone or with the Alt key would be a welcome addition, I think.


B.K. Johnson
tahrpup-6.0.2 PAE, slacko-5.7, frugal install, pupsave file, multi OS flashdrive, SYSLINUX boot, CPU-Dual E2140, 4GB RAM
Last edited by B.K. Johnson on Mon 30 Mar 2015, 15:32, edited 1 time in total.

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#2 Post by HoerMirAuf »

Seems the keyboard focus is on the menu, while it's open. So no other function is possible with a keypress.

You can take a screenshot with tas. Set a delay, take the shot and then open your menu during the delay is active.

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#3 Post by B.K. Johnson »

HoerMirAuf, thanks. I'll try TAS but I am leaving the thread open (not marked solved) in the hope that someone will come up with a way to use the Print Screen function key.

B.K. Johnson
tahrpup-6.0.2 PAE, slacko-5.7, frugal install, pupsave file, multi OS flashdrive, SYSLINUX boot, CPU-Dual E2140, 4GB RAM

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#4 Post by HoerMirAuf »

You can install this little pet:

PrintKey.pet

Be sure your jwm config file

Code: Select all

/root/.jwm/jwmrc-personal 
include this line:

Code: Select all

<key keycode="111"> exec:defaultscreenshot</key>
Every keypress on the Print Button a .png screenshot will saved in root directory
But will not work with open jwm-Menu, because seems this Window Manager doesn't support KeyShortcuts in the Menu.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#5 Post by jamesbond »

Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#6 Post by B.K. Johnson »

jamesbond wrote:
Does look interesting. I'll put it on the back burner for looking at in more detail another time. Xscreenshot is part of a larger package. Don't know how easy it will be to extract.
Thanks for the link

____________________________________________________
B.K. Johnson
tahrpup-6.0.2 PAE, slacko-5.7, frugal install, pupsave file, multi OS flashdrive, SYSLINUX boot, CPU-Dual E2140, 4GB RAM

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#7 Post by HoerMirAuf »

Here are the binarys:
xannotate.tar.gz

But that will not work better than the capturesript.
Thats not a question of any programm function.

While the jwm menu is open, jwm keeps the keyboard focus, so the keyboard is busy and can't get any other inputs.... (i guess)

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#8 Post by B.K. Johnson »

TAS
From tahrpup-6.0.2, TAS-1.9 with an adequate delay created a fullscreen screenshot including the open menu list screen, but captures garbage/nothing when window as opposed to fullscreen is chosen (with or without menu screen). It's probably because the menu screen can never have focus.

PrintKey

To test the PrintKey pet I installed it in a tahrpup-6.0 upgraded to 6.0.2 with service pack. I got a fullscreen screenshot in /root when the PrintKey was pressed, Nothing with Alt+PrintScreen, or Shift+PrintScreen key.

With that limited but expected results, I installed the PrintKey pet in a straight tahr-6.0.2 installation. The PrintScreen key did not produce a screenshot in /root as expected. I uninstalled the pet, rebooted and re-installed it but still no joy.

On a lark, I thought I'd try the PrintKey pet and functionality in Slacko-6b2. Installed it. Forgot to check the line with keycode in /root/.jwm/jwmrc-personal. Pressed PrintScreen. Works!

666philb, any idea why PrintScreen does not work in 6.0.2? All the conditions set out by HoerMirAu were set (see TAS produced screenshot - setup_print_key.png).

B.K. Johnson
tahrpup-6.0.2 PAE, slacko-5.7, frugal install, pupsave file, multi OS flashdrive, SYSLINUX boot, CPU-Dual E2140, 4GB RAM


Attachments
setup_print_key.png
windows showing instructon, jwm-personal directory and file with keycode
(158.84 KiB) Downloaded 392 times

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#9 Post by B.K. Johnson »

HoerMirAuf wrote:
Here are the binarys:
xannotate.tar.gz
Got it.
But that will not work better than the capturesript.
Thats not a question of any programm function.

While the jwm menu is open, jwm keeps the keyboard focus, so the keyboard is busy and can't get any other inputs.... (i guess)
Understood. All that's left is to get PrintKey to run in tahrPup-6.0.2
Thanks for your help.

B.K. Johnson
tahrpup-6.0.2 PAE, slacko-5.7, frugal install, pupsave file, multi OS flashdrive, SYSLINUX boot, CPU-Dual E2140, 4GB RAM

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#10 Post by HoerMirAuf »

Hi B.K.

your are right ... i didn't know ... tahr use avconv instead of ffmpeg.

This Script support both of them:

PrintKey-2.pet

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#11 Post by jamesbond »

HoerMirAuf wrote:Here are the binarys:
xannotate.tar.gz
Thanks.
But that will not work better than the capturesript.
Thats not a question of any programm function.

While the jwm menu is open, jwm keeps the keyboard focus, so the keyboard is busy and can't get any other inputs.... (i guess)
actually not. Xscreenshot has delayed capture mode. So you press shift print screen, then open the jwm menu. Five seconds later, the screen shot is done behind jwm's back, capturing its open menu too.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#12 Post by HoerMirAuf »

Oh, you can also delay the screenshot in my script:


open with texteditor the file

/usr/bin/fullscreenshot

and

include this:


#!/bin/sh

SAVENAME="/root/""_`date +%Y-%m-%d_%H:%M:%S`" #Save Path
CURSOR="+nomouse" #"+nomouse" or leave empty
EXTENS="png" #png, jpg, bmp, tif

sleep 5

if [ -e /usr/bin/ffmpeg ]; then
PRG=ffmpeg
else
if [ -e /usr/bin/avconv ]; then
PRG=avconv
else
Xdialog --title "Screenshot" --stdout --ok-label "OK" --infobox "\n Missing Dependency \nNo ffmpeg or avconv found \n" 0 0 5000
exit 0
fi
fi

read MAXX MAXY <<< `xwininfo -root | awk 'NR>=8&&NR<=9 {print $2}'`
WIDTH=$MAXX; HEIGHT=$MAXY
$PRG -f x11grab -s "$WIDTH"x"$HEIGHT" -r 25 -i :0.0$CURSOR -vframes 1 -pix_fmt rgb24 "$SAVENAME.$EXTENS"

but is the same as:

Code: Select all

You can take a screenshot with tas. Set a delay, take the shot and then open your menu during the delay is active.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#13 Post by greengeek »

B.K. Johnson wrote: TAS-1.9 with an adequate delay created a fullscreen screenshot including the open menu list screen, but captures garbage/nothing when window as opposed to fullscreen is chosen (with or without menu screen).
When you select the "window" option you see a "crosshair" on screen which is used to select the title bar of the window you wish to capture. Once you have selected the appropriate window by clicking on the title bar TAS takes a png image of that window alone. This works for me in Slacko5.6 - does it not work in Tahr?
cheers

EDIT : Ok I see what you mean - when the "window" function is selected TAS does not capture the main puppy system menu. However - when you use the fullscreen option it does capture the menu and you can edit this directly on Slacko5.6 - does this edit function not work on your system? (maybe "window" has no meaning when menu is visible - as the menu is not actually a window??)

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#14 Post by Semme »

Easy enough as a two-step if the goal's a reduced file size.
Attachments
two_step-1.jpg
(54.48 KiB) Downloaded 269 times
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#15 Post by B.K. Johnson »

@HoerMirAuf
You wrote:
your are right ... i didn't know ... tahr use avconv instead of ffmpeg.
Kept getting "need ffmpeg" error when I tried TAS-1.6. Eventually revisited the thread and found that SFR created TAS-1.9 for tahr
This Script support both of them:

PrintKey-2.pet
Thanks
Will install and report.

Code: Select all

Oh, you can also delay the screenshot in my script:


open with texteditor the file

/usr/bin/fullscreenshot

and

include this:


#!/bin/sh

SAVENAME="/root/""_`date +%Y-%m-%d_%H:%M:%S`" #Save Path
CURSOR="+nomouse" #"+nomouse" or leave empty
EXTENS="png" #png, jpg, bmp, tif

sleep 5

if [ -e /usr/bin/ffmpeg ]; then
PRG=ffmpeg
else
if [ -e /usr/bin/avconv ]; then
PRG=avconv
else
Xdialog --title "Screenshot" --stdout --ok-label "OK" --infobox "\n Missing Dependency \nNo ffmpeg or avconv found \n" 0 0 5000
exit 0
fi
fi

read MAXX MAXY <<< `xwininfo -root | awk 'NR>=8&&NR<=9 {print $2}'`
WIDTH=$MAXX; HEIGHT=$MAXY
$PRG -f x11grab -s "$WIDTH"x"$HEIGHT" -r 25 -i :0.0$CURSOR -vframes 1 -pix_fmt rgb24 "$SAVENAME.$EXTENS"
Where in /usr/bin/fullscreenshot do I insert?

_______________________________________________
B.K. Johnson
tahrpup-6.0.2 PAE, slacko-5.7, frugal install, pupsave file, multi OS flashdrive, SYSLINUX boot, CPU-Dual E2140, 4GB RAM

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#16 Post by B.K. Johnson »

@greengeek
You wrote:

EDIT : Ok I see what you mean - when the "window" function is selected TAS does not capture the main puppy system menu. However - when you use the fullscreen option it does capture the menu and you can edit this directly on Slacko5.6 - does this edit function not work on your system? (maybe "window" has no meaning when menu is visible - as the menu is not actually a window??)
You got it. Yes, the edit function does work and editing is my fall-back position, but messy to edit out secondary windows. Much easier if only the top window and Menu screen were captured.

________________________________________________
B.K. Johnson
tahrpup-6.0.2 PAE, slacko-5.7, frugal install, pupsave file, multi OS flashdrive, SYSLINUX boot, CPU-Dual E2140, 4GB RAM

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#17 Post by B.K. Johnson »

@jamesbond

Both TAS-1.9 (with delay) and PrintKey2 (untested) will capture fullscreen+Menu screen. Will Xscreenshot do more? Does Shift PrintKey before opening the Menu take a fullscreen +Menu or top window+Menu? M$ Windows refugees know that the PrintScreen fumction key captures the full screen but either Shift/Alt (don't remember) + PrintScreen fumction key takes only the top window in focus. If Xscreenshot does no more, then we have all 3 taking fullscreens, plus Screenie and others I expect. Choose your medicine. :wink:

______________________________________________________
B.K. Johnson
tahrpup-6.0.2 PAE, slacko-5.7, frugal install, pupsave file, multi OS flashdrive, SYSLINUX boot, CPU-Dual E2140, 4GB RAM

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#18 Post by jamesbond »

B.K. Johnson wrote:Both TAS-1.9 (with delay) and PrintKey2 (untested) will capture fullscreen+Menu screen. Will Xscreenshot do more?
Yes, but it is probably not what you're looking for. The main use case for Xscreenshot is for taking multiple screenshots in succession: press Printscreen to enter capture mode, then click mouse left-button (and hold), move mouse to select region to capture, release left-button (and image is capture). Repeat left-click/select/release to capture more, images, and press Printscreen again to leave capture mode. The Shift-Printscreen delayed capture is just a bonus - if you need to capture menus.
Does Shift PrintKey before opening the Menu take a fullscreen +Menu or top window+Menu? M$ Windows refugees know that the PrintScreen fumction key captures the full screen but either Shift/Alt (don't remember) + PrintScreen fumction key takes only the top window in focus.
I don't remember Windows has Shift-Printscreen to capture single-window, but I left Windows a long time ago. Anyway Xscreenshot doesn't have single-window capture, if that's what you're looking for.
If Xscreenshot does no more, then we have all 3 taking fullscreens, plus Screenie and others I expect. Choose your medicine. :wink:
As above. If all you're looking for is fullscreen + menus, then yes it's medicine-picking time :lol:
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#19 Post by HoerMirAuf »

Code: Select all

Where in /usr/bin/fullscreenshot do I insert? 
you have to insert sleep 5 (red marked) to get a delay.

Ok guys ... many ways to get a screenshot. The goal was to get one with the print key ;)

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#20 Post by 666philb »

B.K. Johnson wrote:
666philb, any idea why PrintScreen does not work in 6.0.2?
print screen key working here on tahrpup, tried on 3 different computers all good.
it executes mtpaint -s , and immediately opens mtpaint with the capture.

for a more fancy screen capture app with hotkey settings try hotshots in quickpet
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

Post Reply