python/pyGtk : How to generate a keyboard interrupt?

Riccardo Attilio Galli riccardo_cut-me at cut.me.sideralis.net
Mon May 3 22:17:43 EDT 2004


On Mon, 03 May 2004 13:36:01 -0400, Peter Hansen wrote:

> Riccardo Attilio Galli wrote:
> 
>> On Sat, 01 May 2004 08:31:07 -0700, ahk wrote:
>> 
>>>I would like to emulate the keyboard interrupt through other means
>>>other than the actual hitting on the keyboard such that a call to
>>>scaninput() (a C function call?) will be able to pick up the
>>>interrupt.  How is it possible to do that in python/pyGTK? TIA.
>> 
>>>>>raise KeyboardInterrupt 
>> 
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>> KeyboardInterrupt
> 
> I think I detect two people on very different wavelengths
> here.  Forgive me if I'm wrong.
> 
> I think the OP is talking about the "keyboard interrupt"
> in the sense of the low-level mechanisms by which keystrokes
> get into the PC.  Each key hit on the keyboard causes data
> to be sent on the serial link between the keyboard and the
> motherboard.  The motherboard has circuitry which decodes
> the keystroke and generates a hardware interrupt through the
> PIC (Programmable Interrupt Controller) chip or the modern
> equivalent.
> 
> People with a hardware or low-level software background will
> sometimes talk about "keyboard interrupts" when they really
> just mean to ask about receiving raw keystrokes in their
> software.

shame on me.
I'd have a low background, but I forget to use it :)
I completely misunderstood the OP.

ops

Riccardo



More information about the Python-list mailing list