Adding keyboard shortcut to a blender script I know it's probably not the most elegant, or even a usable, solution, but is it possible to use a keyboard shortcut, say pageUP in a python blender script?

OR find out the code behind the shortcut, like one can do elsewhere in blender, like a button's code for example.

I have been looking in the input user preferences and hovered over the shorcut , which gives me: 

keyMapItem.map_type
bpy.data.window_managers["WinMan"] ... map_type 


But i'm not sure how to use this, in a script, to give me the shortcut "page up" functionality.
It would be better(and probably easier) to do this directly rather than using trying to use the keyboard shortcuts in the code. Try this:

seqs = bpy.context.scene.sequence_editor.sequences_all
for seq in seqs:
    seq.frame_final_duration = 10


Or if you want to just modify selected strips:

seqs = bpy.context.scene.sequence_editor.sequences_all
for seq in seqs:
    if seq.select:
        seq.frame_final_duration = 10


Or if you want to just modify the strips based in their length:

seqs = bpy.context.scene.sequence_editor.sequences_all
for seq in seqs:
    if seq.frame_final_duration == 1:
        seq.frame_final_duration = 10