Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 23 Apr 2014, 13:17
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Key command for screen capturing
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
rmcellig

Joined: 19 Nov 2011
Posts: 892
Location: Ottawa Ontario Canada

PostPosted: Tue 10 Jan 2012, 11:48    Post subject:  Key command for screen capturing  

Every time I want to capture a region of the screen, I have to go to the menu to Graphics and select Pupsnap. Is there a way I can for example assign F2 to bring up the ability to capture a region? What are my options?
Back to top
View user's profile Send private message Visit poster's website 
Peterm321

Joined: 29 Jan 2009
Posts: 209

PostPosted: Tue 10 Jan 2012, 15:02    Post subject:  

If I want a screen capture, I don't use a keystroke maybe because I don't use very often.

In a command prompt window I type:

Code:
sleep 8s ; mtpaint -s


The 8 second delay allows me to focus to whatever app I wish to take the screenshot from. The screen is sent to mtpaint which can save the result in a variety of image formats if you want.

I don't mind a bit of typing, you can shorten the typing by setting an alias command, eg

Code:
 alias scrn="sleep 8s ; mtpaint -s"


and use scrn to take screenshots.

I suppose it might be possible to assign a command to a function key in the JWM configuration files (or whatever window manager you use) to execute the "mtpaint -s" command via F2 etc. If you search the forums there may be a solution like this somewhere.
Back to top
View user's profile Send private message 
rmcellig

Joined: 19 Nov 2011
Posts: 892
Location: Ottawa Ontario Canada

PostPosted: Tue 10 Jan 2012, 15:11    Post subject:  

I am going to try your suggestion even though I would never have thought of doing it this way. Maybe it is because i usually don't think CLI.
Back to top
View user's profile Send private message Visit poster's website 
jemimah


Joined: 26 Aug 2009
Posts: 4309
Location: Tampa, FL

PostPosted: Tue 10 Jan 2012, 15:15    Post subject:  

Sven is a nice gui tool for assigning commands to hotkeys. Search the forum for it.
Back to top
View user's profile Send private message Visit poster's website 
Peterm321

Joined: 29 Jan 2009
Posts: 209

PostPosted: Tue 10 Jan 2012, 19:50    Post subject:  

Quote:
I am going to try your suggestion even though I would never have thought of doing it this way. Maybe it is because i usually don't think CLI


If I regularly took a lot of screenshots, I would probably assign a hotkey.

I just remembered that you can edit destop icons and change their properties. So I edited a unused destop icon and changed the comand to /usr/bin/mtpaint , the parameter to -s, and gave it a hotkey of ALT+F12. It works!
SCRNSHOT.PNG
 Description   
 Filesize   50.73 KB
 Viewed   305 Time(s)

SCRNSHOT.PNG

Back to top
View user's profile Send private message 
rmcellig

Joined: 19 Nov 2011
Posts: 892
Location: Ottawa Ontario Canada

PostPosted: Tue 10 Jan 2012, 21:06    Post subject:  

Now that is cool! Pardon my ignorance (I'm still learning how Puppy works), but how do you create an unused icon so that I can set the command like in the screenshot in your last post?

Thanks!! Smile
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 3083
Location: Ontario

PostPosted: Tue 10 Jan 2012, 21:31    Post subject:  

If you use psnapshot there is a keystroke combination
for the JWM window manager
I set up CTRL-shift-P

http://murga-linux.com/puppy/viewtopic.php?search_id=1031484544&t=70996

I show how easy it is for JWM.

Just one key to launch a program is harder.
It's explained on the forum somewhere.

________________________________
Back to top
View user's profile Send private message 
Peterm321

Joined: 29 Jan 2009
Posts: 209

PostPosted: Wed 11 Jan 2012, 21:50    Post subject:  

Quote:
Now that is cool! Pardon my ignorance (I'm still learning how Puppy works), but how do you create an unused icon so that I can set the command like in the screenshot in your last post?

Thanks!! Smile


Apparently its as simple as dragging any filename using rox or other file manager to the desktop, this creates an icon referencing the object just dragged. Then edit the icon to what you want.

I suppose you could also find mtpaint directly. At the command prompt, type
Code:
rox /usr/bin


Then scroll down to mtpaint then drag it to the desktop.

There is some related information here http://www.murga-linux.com/puppy/viewtopic.php?t=51619
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Wed 11 Jan 2012, 22:26    Post subject:  

Xbindkeys + Xbindkeys-config
http://murga-linux.com/puppy/viewtopic.php?t=61472
worked for me afaicr

Another possible feature for jwm is

/usr/local/jwmconfig2/keyboard
script
which does something don570 does manually .

jwmconfig is buggy , so i would try don's manual suggestion first
and read
/usr/local/jwmconfig2/keyConfigHelp .

/usr/local/jwmconfig2/keyboard
gets launched by
/usr/local/jwmconfig2/jwmConfigMgr GUI
which creates needed variables for
/usr/local/jwmconfig2/keyboard

Later Lupu 5 series had some features of /usr/local/jwmconfig2/jwmConfigMgr disabled .
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 3083
Location: Ontario

PostPosted: Thu 12 Jan 2012, 19:57    Post subject:  

If you want to launch an application ( such as mtpaint -s)
with just one press of a key there is trick.

It's explained HERE

It requires xev to be installed which most recent puppies have.

But here's a copy if you don't have it installed.

To get the number of the key that you are pressing,
the easiest way is read this carefully. I got it from
wikkipedia

Code:
Using xev

Another way to get the keycodes of your keys is to use the graphical X program "xev" (without having to switch to a console environment). With the following line you can start xev and directly grep the important parts:

xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
In the example below I pressed the "a", "r", "c" and "h" keys and two of the media keys on my Dell keyboard. This gives me the following output:

38 a
27 r
54 c
43 h
153 NoSymbol
144 NoSymbol
This means that the "a", "r", "c" and "h" keys have the keycodes 38, 27, 54 and 43 and are properly bound while the media keys with the keycodes 153 and 144 have no function yet, which is indicated by "NoSymbol". If you press a key and nothing appears in the terminal, this means that the kernel doesn't see that key or that it is not mapped.



You use the number of the key in JWM's configuration

This uses the PRINT SCREEN key

<Key keycode="111">exec:mtpaint -s</Key>


Openbox WM does it slightly different since it converts the
keycode number to a hexadecimal number.

___________________________________________________
xev.zip
Description  keyboard application
zip

 Download 
Filename  xev.zip 
Filesize  8.2 KB 
Downloaded  78 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0756s ][ Queries: 13 (0.0053s) ][ GZIP on ]