Keyboard event activates script twice... (only want pressed once)

I’m back to scripting the BGE (school projects) after a few years (Blender 2.47…)

Things have changed a bit: Nice (and thanks) BUT, I have to relearn alot and I’m having a hard time pinpointing through the forum and wiki (and Google) for some simple answers to stuff.

By the way, this to prepare material for a programming class, so I’m trying to do most stuff in Python…
Like so…
1- Attach a keyboard sensor to camera, All keys
2- Put such sensor into global dictionary at init (init script called on an Always sensor attached to said Camera)
3- Link Keyboard sensor to script to print key once at key press
RESPONSE
Always prints twice (sob) (my code follows):
############################
import bge

keyb=bge.jmd[“cle”] # cle is my keyboard (All keys) sensor attached to camera and called on Always

if keyb.positive == True:
print(“Key released”)

for key,status in keyb.events:
        # key[0] == bge.events.keycode, key[1] = status
        if status == bge.logic.KX_INPUT_JUST_ACTIVATED:
                if key == bge.events.WKEY:
                        print("toto W")
                if key == bge.events.SKEY:
                        print("toto S")
                if key == bge.events.AKEY:
                        print("toto A")
                if key == bge.events.DKEY:
                        print("toto D")

###############
if keyb.positive==False
outputs this:

Key released
Key released

if keyb.positive==True
outputs this:
Key released
toto W
Key released
toto W

In Blender 2.62.1 r44136, in Ubuntu 11.10

What I’m I missing here???

Many thanks in advance!!!
EDIT: Python correctly indented here (sorry)

Please use code tags! My only suggestion would be to use ‘Tap’ for the Keyboard sensor.

Thanks for a fast answer… sorry for MY BAD… (shame on me)

I had copied the logic bricks from a cube to the Camera AND forgot to delete them from the cube (ouch, again sorry)