Needed: Program to store key typing into text boxes[Found]

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
april

Needed: Program to store key typing into text boxes[Found]

#1 Post by april »

Often I make a comment on a page and it might run to 4 or 5 lines .
I realise I need to add a reference or URL to it and whip over to get the reference only to come back and loose all my typing and have to do it again.

Just something like GLipper in the tray that retains your typing automatically for however many characters you like would be handy.

Surely there is a clever young programmer out there who can knock one up in minutes?

Result : See near the end of thread Geoffrey's ".pet" and get the "Yad" a little earlier.
Last edited by april on Tue 08 Nov 2016, 22:09, edited 3 times in total.

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#2 Post by trapster »

Maybe type everything into geany and then copy/paste into text box.
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#3 Post by smokey01 »

Try notecase. It comes in all pups.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#4 Post by Geoffrey »

you can use xsel to create a file with the selected text in any application, thus avoiding the clipboard.

Just create a script containing something like this and place it in /usr/bin

Code: Select all

!#/bin/bash
xsel >> /root/.mynotes
I tested it by creating a hotkey to run the script, select the text and press the key, text is sent to the file.

A gtkdialog monitored edit dialog could be used to see the result in real time.

Here's a xsel I compiled in x-slacko
Attachments
xsel.tar.gz
(12.37 KiB) Downloaded 194 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

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

#5 Post by greengeek »

If you highlight the text and hit ctrl+c it will be saved into parcellite (that is attached to the icon in system tray). At least that is the case in Slacko. Just click on the icon and it gives you choices of what you have previously saved to clipboard.
Attachments
Parcellite.jpg
(9.37 KiB) Downloaded 314 times

april

#6 Post by april »

Mmm OK . Thanks .
I intended to impart the fact that I don't want to highlight and /or copy and store anything .That's what you always forget to do and you get caught out.

What I am suggesting is a service that always runs in the background and it records keystrokes ,say up to 5000 and does so in a round robin style file so when you do get caught out you can go to that file and copy out the last ,say, 100 keystrokes .

Any ideas on that?

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#7 Post by amigo »

In that case you'd need not only a process which runs all the time waiting, but also need to modify every input method so that it conforms to where your special program is listening. Have fun coding that up just the way you like it -one custom kernel module could possibly cover all bases...

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

#8 Post by greengeek »

april wrote:What I am suggesting is a service that always runs in the background and it records keystrokes ,say up to 5000 and does so in a round robin style file so when you do get caught out you can go to that file and copy out the last ,say, 100 keystrokes .
Oh right - you mean a basic keylogger. I haven't used a Linux one but used to have one running in Windows.

The following looks a possibility:
https://github.com/kernc/logkeys

Some other links:
http://www.tecmint.com/how-to-monitor-k ... -in-linux/
http://tipstrickshack.blogspot.co.nz/20 ... ggers.html
http://www.techinfected.net/2015/10/how ... linux.html
http://unix.stackexchange.com/questions ... -in-a-file

EDIT : Here are some links worth reading from within this forum:
http://www.murga-linux.com/puppy/viewtopic.php?t=36827
http://www.murga-linux.com/puppy/viewtopic.php?t=64048
Last edited by greengeek on Sun 30 Oct 2016, 19:01, edited 1 time in total.

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#9 Post by slavvo67 »

I recall our old friend, Jemima having something posted on this board; quite a while back. I'll see if I can find it but if I recall, it wasn't a full logger but just to grab the first 5 keys or so..... Just would need a touch up from there....

april

#10 Post by april »

amigo wrote:In that case you'd need not only a process which runs all the time waiting, but also need to modify every input method so that it conforms to where your special program is listening. Have fun coding that up just the way you like it -one custom kernel module could possibly cover all bases...
I don't think that is right. Keyloggers are commonly attached to all keyboard input and no modifications are needed to differentiate between say browser and geany etc.

Would you mind explaining this just a bit more? I am sure you have a particular reasoning behind this

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#11 Post by Geoffrey »

Here's a script for a editable clip board in the tray, needs a hotkey setup to run it, once you have selected some text you want to keep, press the key.
It's probably not what your wanting, but may be useful as a place to keep stuff.
Uses yad, gtkdialog edit box and xsel.

Code: Select all

#! /bin/bash

SELECT=`xsel`
[ ! "$SELECT" = "" ] && echo -e "$SELECT\n" >> "${XDG_CACHE_HOME:-$HOME/.cache}"/myclips

xsel -c

ps ax | grep -q '[My]Clips' && exit 1

function my_clips () {
ps ax | grep -q '[MY]CLIPS' && exit 1
    export MYCLIPS='
<window title="MyClips" icon-name="gtk-paste">
  <vbox>
    <edit file-monitor="true" auto-refresh="true" wrap-mode="3" editable="true">
    <variable>MY_CLIPS</variable> 
    <input file>'${XDG_CACHE_HOME:-$HOME/.cache}'/myclips</input>
    </edit>
    <hbox homogeneous="true">
    <hbox>
      <button>
        <label> Save </label>
        <input file stock="gtk-save"></input>
        <action>`echo "$MY_CLIPS" > '${XDG_CACHE_HOME:-$HOME/.cache}'/myclips`</action>
      </button>
    </hbox>
    </hbox>
  </vbox>
</window>'
gtkdialog -p MYCLIPS -G 400x200"+`getcurpos | tr " " "+"`"
}
export -f my_clips

touch ${XDG_CACHE_HOME:-$HOME/.cache}/myclips

exec yad --notification --text=$"MyClips" --image="gtk-paste" --command "sh -c my_clips"
Attachments
myclips.jpg
(19.44 KiB) Downloaded 226 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#12 Post by amigo »

I said 'input methods', since there are various ways to generate input which is then interpreted as keyboard input -think of on-screen keyboard utilities which are activated with the mouse, or touch screens. A plugin hardware keylogger is not gonna catch those.

If you want on-the-fly key-by-key recording within an application, that app must be capable of doing that. You might do something at the window-manager level if you are only concerned about gui activities -since the window manager will be re-directing any keyboard input to the current active window.

april

#13 Post by april »

amigo wrote:I said 'input methods', since there are various ways to generate input which is then interpreted as keyboard input -think of on-screen keyboard utilities which are activated with the mouse, or touch screens. A plugin hardware keylogger is not gonna catch those.
.
I don't wanna catch those.
amigo wrote:You might do something at the window-manager level if you are only concerned about gui activities -since the window manager will be re-directing any keyboard input to the current active window..
This is more useful though .What can I plug in to send those keystrokes to a file continuously in Seamonkey?
Last edited by april on Tue 01 Nov 2016, 20:33, edited 2 times in total.

april

#14 Post by april »

slavvo67 wrote:I recall our old friend, Jemima having something posted on this board; quite a while back. I'll see if I can find it but if I recall, it wasn't a full logger but just to grab the first 5 keys or so..... Just would need a touch up from there....
Went looking for that but the search utility here is hopeless. Google site: didn't find anything either

april

#15 Post by april »

Geoffrey wrote:Here's a script for a editable clip board in the tray, needs a hotkey setup to run it, once you have selected some text you want to keep, press the key.
Thanks, that will come in useful elsewhere though and I am learning from your coding. I'm thinking whether I can make a background service run this all the time and get it in there without a hotkey or make any key run it and just store letters one at a time will do. A cron job sort of thing.

B̶o̶o̶k̶s̶ ̶a̶r̶e̶ ̶d̶e̶a̶d̶

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

#16 Post by greengeek »

What puppy are you running? I just compiled logkeys for my slacko 5.6 deivative and it works great.

User avatar
nilsonmorales
Posts: 972
Joined: Fri 15 Apr 2011, 14:39
Location: El Salvador

#17 Post by nilsonmorales »

[b][url=http://nilsonmorales.blogspot.com/]My blog |[/url][/b][b][url=https://github.com/woofshahenzup]| Github[/url][/b]
[img]https://i.postimg.cc/5tz5vrrX/imag018la6.gif[/img]
[img]http://s5.postimg.org/7h2fid8pz/botones_logos3.png[/img]

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

#18 Post by greengeek »

Hmmm, looks great - but doesn't seem to log anything on my slacko 5.6

I will keep trying.

EDIT : it seems to create the kp directory but there is no log file inside it.

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#19 Post by Geoffrey »

greengeek wrote:
Hmmm, looks great - but doesn't seem to log anything on my slacko 5.6

I will keep trying.

EDIT : it seems to create the kp directory but there is no log file inside it.
I got it to work from command line

Code: Select all

logkeys -s -u --no-timestamps -o ~/.secret-keys.log
to kill the process

Code: Select all

logkeys -k

Code: Select all

# logkeys
Usage: logkeys [OPTION]...
Log depressed keyboard keys.

  -s, --start               start logging keypresses
  -m, --keymap=FILE         use keymap FILE
  -o, --output=FILE         log output to FILE [/var/log/logkeys.log]
  -u, --us-keymap           use en_US keymap instead of configured default
  -k, --kill                kill running logkeys process
  -d, --device=FILE         input event device [eventX from /dev/input/]
  -?, --help                print this help screen
      --export-keymap=FILE  export configured keymap to FILE and exit
      --no-func-keys        log only character keys
      --no-timestamps       don't prepend timestamps to log file lines
      --post-http=URL       POST log to URL as multipart/form-data file
      --post-size=SIZE      post log file when size equals SIZE [500k]

Examples: logkeys -s -m mylang.map -o ~/.secret-keys.log
          logkeys -s -d event6
          logkeys -k

logkeys version: 0.1.1b-svn
logkeys homepage: <http://code.google.com/p/logkeys/>
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#20 Post by Geoffrey »

greengeek wrote: it seems to create the kp directory but there is no log file inside it.
I found the problem, it trys to use

Code: Select all

-m --us-keymap
when US keyboard is selected, there is no map for the us keyboard, the /usr/bin/kp-map needs to be edited line 38 from this

Code: Select all

logkeys -s -m --us-keymap --no-func-keys -o /var/log/kp/secret-keys.log
to this

Code: Select all

logkeys -s -u --no-func-keys -o /var/log/kp/secret-keys.log
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

Post Reply