// SPDX-License-Identifier: GPL-2.0+ /* fakekey.c * Functions for simulating key presses. * * Copyright (C) 2010 the Speakup Team */ #include <linux/types.h> #include <linux/slab.h> #include <linux/preempt.h> #include <linux/percpu.h> #include <linux/input.h> #include "speakup.h" #define PRESSED … #define RELEASED … static DEFINE_PER_CPU(int, reporting_keystroke); static struct input_dev *virt_keyboard; int speakup_add_virtual_keyboard(void) { … } void speakup_remove_virtual_keyboard(void) { … } /* * Send a simulated down-arrow to the application. */ void speakup_fake_down_arrow(void) { … } /* * Are we handling a simulated key press on the current CPU? * Returns a boolean. */ bool speakup_fake_key_pressed(void) { … }