How to simulate keyboard.../dev/tty0?

From: Keeper (keeper_at_iosys.no-ip.org)
Date: 11/11/03

  • Next message: Brian McCauley: "Re: How to simulate keyboard.../dev/tty0?"
    Date: Tue, 11 Nov 2003 09:42:31 +0100
    
    

    Hi all,

    I'm trying to send chars to the current console (currently having cursor
    focus) - /dev/tty0 - in my program by:

    my $st = 'K'
    my $ri = 'L'
    my $ng = 'J'
    open(TTY, ">/dev/tty0");
    ioctl(TTY, &TIOCSTI, $st);
    ioctl(TTY, &TIOCSTI, $ri);
    ioctl(TTY, &TIOCSTI, $ng);

    I'm using redhat 9, kde.
    Everything is ok in the linux console (on tty1 chars are sending
    properly - KLJ...), but in kde i see strange things (and not only for
    those characters):
    ^[[D- on ttyp1
    - on mozilla window
    My question is why chars are not properly sending by ioctl call, is
    there any additional settings to do (setting termios, keyboard driver?)??

    thanks,
    Keeper


  • Next message: Brian McCauley: "Re: How to simulate keyboard.../dev/tty0?"

    Relevant Pages

    • How to simulate keyboard.../dev/tty0?
      ... I'm trying to send chars to the current console (currently having cursor ... ioctl(TTY, &TIOCSTI, $st); ... there any additional settings to do (setting termios, ...
      (comp.lang.perl.misc)
    • How to simulate keyboard.../dev/tty0?
      ... I'm trying to send chars to the current console (currently having cursor ... ioctl(TTY, &TIOCSTI, $st); ... there any additional settings to do (setting termios, ...
      (comp.lang.perl.modules)
    • Re: [2.6 patch] UTF-8 fixes in comments
      ... Did you put the bash shell and the console into unicode mode? ... The console yes (by default until I disabled it to restore correct ... two chars to the bash, which itself sends two chars to the terminal, ... pressing backspace once sends one backspace all along, ...
      (Linux-Kernel)
    • console nightmare (vidcontrol + kbdcontrol + iso-8859-15 + shell)
      ... I'm having troubles in getting console to work using 8859-15 (or even ... Still i miss 2 chars: € Ç ... but it still won't solve the shell issue) ...
      (freebsd-questions)
    • Re: [PATCH 1/2] Colored kernel output (run3)
      ... Are there any other drivers besides vgacon and fbcon that use vt.c? ... With an 8-color console, only the first 8 values are considered. ... the whole Unicode set of chars. ... I'll have to try this, because usually, setterm operates on TTYs ...
      (Linux-Kernel)