Namasté, !first of all I am not building in any way a keylogger or something like that! What I am actually building is a program to analyse typing behaviour. I don't need keylogger or hidden stuff. This is an example I used as a base for my program:

use Term::ReadKey ReadMode ('cbreak'); print "Press keys to see their ASCII values. Use Ctrl-C to quit.\n" while (1){ $char = ReadKey (0); last unless defined $char; printf("Hex: %x\n", ord($char), ord($char)); } ReadMode ('normal');

If you execute this in perl you'll get the Hex code for every character you type at the exact same time you type it. So for example "spacebar = 20 in hex". But this output comes vertically and without the actual typed-in key. Showing the key is not a problem offcourse. That actually worked with my solution. But I would like my users to type in notepad. So that the output in notepad eq "Hallo i am harry" and the output in perl is like:"

H Hex: 68 a Hex: 61 l Hex: 6c l Hex: 6c o Hex: 6f Hex: 20 I Hex: 69 Hex: 20 a Hex: 61 m Hex: 6d etc etc etc etc etc
Could you please help me with this... I deliberately did not post my reading part of the program (dont like malicious). If you don't want to post the solution, because it can be used for evil, can you please PM me or somthing? Greetz, Harry


In reply to Run perl simultaniously with notepad by Carnyx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.