Key command for screen capturing
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?
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:
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
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.
In a command prompt window I type:
Code: Select all
sleep 8s ; mtpaint -s
I don't mind a bit of typing, you can shorten the typing by setting an alias command, eg
Code: Select all
alias scrn="sleep 8s ; mtpaint -s"
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.
Sven is a nice gui tool for assigning commands to hotkeys. Search the forum for it.
If I regularly took a lot of screenshots, I would probably assign a hotkey.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
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!
- Attachments
-
- SCRNSHOT.PNG
- (50.73 KiB) Downloaded 384 times
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. ... 44&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.
________________________________
for the JWM window manager
I set up CTRL-shift-P
http://murga-linux.com/puppy/viewtopic. ... 44&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.
________________________________
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.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
I suppose you could also find mtpaint directly. At the command prompt, type
Code: Select all
rox /usr/bin
There is some related information here http://www.murga-linux.com/puppy/viewtopic.php?t=51619
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 .
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 .
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
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.
___________________________________________________
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: Select all
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.
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.
___________________________________________________
- Attachments
-
- xev.zip
- keyboard application
- (8.2 KiB) Downloaded 177 times