(event)
Categorize an event according to its type.

    The :data:`event_factory <evdev.events.event_factory>` dictionary
    maps event types to sub-classes of :class:`InputEvent
    <evdev.events.InputEvent>`. If the event cannot be categorized, it
    is returned unmodified.
Categorize an event according to its type.
Categorize an event according to its type .
def categorize(event):
    '''
    Categorize an event according to its type.

    The :data:`event_factory <evdev.events.event_factory>` dictionary
    maps event types to sub-classes of :class:`InputEvent
    <evdev.events.InputEvent>`. If the event cannot be categorized, it
    is returned unmodified.'''

    if event.type in event_factory:
        return event_factory[event.type](event)
    else:
        return event
def categorize ( event ) : if event . type in event_factory : return event_factory [ event . type ] ( event ) else : return event