Now you can use the Print Screen Key

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

Now you can use the Print Screen Key

#1 Post by gposil »

The following will allow you to capture a screenshot as a jpeg in the my-documents folder just by pressing the "Print Screen" Key'.

"Alt-Print Screen" then click on a window to just capture that window.

Tested in JWM on 4.1.2 and 4.2

Hope you like it. :)

Latest version further down in Dingo post http://www.murga-linux.com/puppy/viewto ... 779#293779
Last edited by gposil on Sat 11 Apr 2009, 03:06, edited 2 times in total.

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#2 Post by Dingo »

very good, I suggest a little addition, to be able to select windows size (choosing width and height, moving mouse around windows you can capture)

adding -s parameter, like:

Code: Select all

scrot '-s %T.png' -e 'mv $f ~/my-documents/'; xmessage -timeout 3 -center "Screen Shot Done"
regarding the keyboard shortcut, if

Code: Select all

!/bin/bash
#post-install script.

 sed -i -e '/<!-- Key bindings -->/ a\<Key keycode="111">exec:fullshot</Key>' /root/.jwm/jwmrc-personal
 xmessage -center You must restart X for changes to take effect.
keycode="111" is used to perform fullshot, what key do you think we can use to perform a border selected screenshot?
Attachments
selectborders.zip
(283 Bytes) Downloaded 597 times
Last edited by Dingo on Fri 10 Apr 2009, 15:20, edited 1 time in total.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Seems good . . . but 237 k

Is it possible to activate the screen capture in mtpaint from the command line and activate it by assigning it the print screen key?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#4 Post by gposil »

Dingo that is already in there as seperate script, just run winshot and click on window you want to capture. I'm working on assigning winshot to Alt-Print Screen.

Lobster..the pet file includes the scrot command not in Puppy and includes the LibImLib2 libraries to support it.

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#5 Post by Dingo »

thanks, I was blind. regarding keybord shortcut, what keycode do you think we can assing to winshot (to select manually screenshoot area)
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

winshot key assignment

#6 Post by gposil »

Dingo
keycode 92 should do it...that Alt-Print Screen or Shift-Print Screen either will work I think...got to test it... :)

new version with window capture uploaded.

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#7 Post by Dingo »

Alt-Print Screen key is not working (I must type in console

Code: Select all

scrot -s
and then click on an on active window - (I'll further investigate) anyway, I have repackaged .pet with a little dependency missing (libtiff.so.4) and other libs renamed

take in mind, when create pet packages, that dir must have same name of pet package or it will not able to expand. fixed in version I have uploaded as attachment and on dokupuppy

http://puppylover.netsons.org/dokupuppy ... screenshot
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#8 Post by gposil »

Thanks Dingo.. it was 3:00am and I had brain fade :(

The Alt-PrintScreen is still bugging me i'll get onto it...

Version 0.1.2 will also cater for IceWM users...

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#9 Post by richard.a »

Lobster wrote:Is it possible to activate the screen capture in mtpaint from the command line and activate it by assigning it the print screen key?
Actually I wrote about that in the context of JWM when I described my button-bars (command bars) last year (possibly) or even the year before.

Let me quote from the web page I wrote which you can find here :
While nothing whatsoever to do with button bars, I thought I'd mention this customisation tip as well. I've discovered it isn't difficult to enable the Print/Screen button (like WhoDo did in 2.15ce) to initiate taking a screen capture - which is also used in several other operating systems, including Windows, but surprisingly in few Linuxes.

All it needs is a single line of code in the /root/.jwmrc file, near the bottom, in the key redefinition section...

<Key key="Print">exec:mtpaint -s</Key>

The keypress capture technique doesn't seem to work in Ver 1.09 for Windows, though. It locks the keyboard inoperable if you try it.
I don't know how WhoDo did it in 215ce, but the very simple line in the .jwmrc file works without anything extra in all the ver2's that use JWM, and from memory similarly in v3 as well. I haven't tried it in v4 at this time.

Richard in Oz-land
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

No it doesn't

#10 Post by gposil »

No that simple line doesn't work in version 4+...JWM has changed and you have to use the key scan method..

The whole point of what I and now Dingo are trying to achieve is to give the screen capture over to a familiar method ...just press the Print Screen Key...without opening software...you ca go back later and review and edit what you captured...

The reason I have steered clear of mtPaint is its inability to deal with clipboard matters...

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#11 Post by richard.a »

Thanks for the info. Is that because in the design the JWM menuing has been disabled?

I could never understand why there was a need for the other way of menuing when you almost never use more than one window manager.

I might have a look in the next day or so at re-enabling the JWM menuing in 4.12 - I'm pretty sure I was able to get the .jwmrc-tray menu up and running with my extra buttons etc on it several weeks ago when I first looked at it.

Richard

Edit
If you open .jwmrctray and duplicate the button next to the start menu button, and change the command in the duplicate to exec:mtpaint -s it works in the same way as a hot key :)

So if you don't like mtpaint (and I agree with your point) I'm sure there would be another app that could run in a capture mode that could be used.

The problem seems to be the inability to call a command from a key. Which makes one wonder if any of the other keybindings in the .jwmrc file work? Or maybe if the jwmrc menu were reinstated, they all would? Speculation for another day :D

I'm off to bed. Take care :D

Richard
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#12 Post by gposil »

Richard

All you need is an entry in the key bindings section of /.jwm/jwmrc-personal, but you use the keycode="111" instead of key="Print"(which doesn't work)...

What i'm trying to do is avoid opening any software when you capture a screen, just save it directly to a file for later perusal...this part works...we are now trying to get the selective window capture working from the Alt-Print Screen key combo.

wjaguar
Posts: 359
Joined: Wed 21 Jun 2006, 14:16

#13 Post by wjaguar »

gposil wrote:The reason I have steered clear of mtPaint is its inability to deal with clipboard matters...
Your information is outdated. :-) As of version 3.30, mtPaint can import images from, and export to, system clipboard.

panzerpuppy
Posts: 632
Joined: Tue 02 Oct 2007, 07:39

#14 Post by panzerpuppy »

gposil wrote:All you need is an entry in the key bindings section of /.jwm/jwmrc-personal, but you use the keycode="111" instead of key="Print"(which doesn't work)...
And what should I add to .jwmrc to be able to capture a screenshot of the active window by using 'Alt+PrintScreen' ? (with mtPaint opened,of course)

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

What about this

#15 Post by gposil »

When you press Print Screen key you get this...
Attachments
shot1.jpg
This is better
(6.6 KiB) Downloaded 2689 times

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

Explanation

#16 Post by gposil »

Maybe a few words about how shot works...

Click the Print Screen key and dialog will pop up asking you for full screen shot or just a window only...

If you select Full screen a snapshot of the screen will be saved to your /my-documents folder with file name as a time stamp(jpg format).

If you select Window only, you just click on the window you want a snapshot of and again it will be saved as per full screen.

Hope that explains it... :)

Let me know if you want the facility to change image format or any other suggestions.

Peter444
Posts: 36
Joined: Tue 04 Sep 2007, 02:58
Location: Brisbane Queensland Australia

Now you can use the Print Screen Key

#17 Post by Peter444 »

gposil, thanks for the excellent screen capture utility

I am using it on turbopup alpa3 with success today

a query, no options dialogue box appears when you press the printscreen button

what you get is a a small message box saying screen shot done

regards

ps, i also noticed graphic menu with turbo pup has an entry called mtpaint snapshot-screen capture

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#18 Post by gposil »

are you using version 0.1.1 or 0.1.2...
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

Peter444
Posts: 36
Joined: Tue 04 Sep 2007, 02:58
Location: Brisbane Queensland Australia

shot-0.1.2.pet

#19 Post by Peter444 »

Thanks for the quick response, yes i was using version 0.1.1

deleted this version, rebooted turbopup, installed 0.1.2 unfortunatly still exactly the same behavour

not a show stopper, i will try it in a couple of other puppys i have and see what happens, will report back in a couple of days

Regards

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#20 Post by gposil »

You ca always make a desktop shortcut to it...in rox go to/usr/bin and drag shot1 to the desktop...
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

Post Reply