~mir-team/mir/development-branch

« back to all changes in this revision

Viewing changes to src/server/input/android/input_sender.cpp

Unify keyboard action enums.

The removed mir_key_action_multiple corresponds to a kind of "textual" event which we do not support (as input methods go via another channel).

repeat_count is unified in to mir_keyboard_action_repeat.

Approved by PS Jenkins bot, Andreas Pokorny, Alan Griffiths, Alexandros Frantzis, Kevin DuBois.

Show diffs side-by-side

added added

removed removed

Lines of Context:
237
237
 
238
238
droidinput::status_t mia::InputSender::ActiveTransfer::send_key_event(uint32_t seq, MirKeyEvent const& event)
239
239
{
 
240
    int32_t repeat_count = 0;
 
241
    auto android_action = mia::android_keyboard_action_from_mir(repeat_count, event.action);
240
242
    return publisher.publishKeyEvent(
241
243
        seq,
242
244
        event.device_id,
243
245
        event.source_id,
244
 
        event.action,
 
246
        android_action,
245
247
        0, /* Flags */
246
248
        event.key_code,
247
249
        event.scan_code,
248
250
        mia::android_modifiers_from_mir(event.modifiers),
249
 
        event.repeat_count,
 
251
        repeat_count,
250
252
        std::chrono::nanoseconds(event.event_time),
251
253
        std::chrono::nanoseconds(event.event_time)
252
254
        );