From 72b8ec15f97bbabbb2379c87cb5f7a9dc63f0d88 Mon Sep 17 00:00:00 2001 From: Mushahid Hussain Date: Tue, 15 Nov 2022 15:05:30 +0500 Subject: accessibility: speakup: phonetic spelling while arrowing letter by letter This patch includes an enhancement requested frequently on the mailing list.[1][2] It adds a variable, cur_phonetic in the spk_vars, which can be set as a module parameter, as well as in /sys/speakup/cur_phonetic. This patch also documents cur_phonetic as a sysfs attribute in sysfs-driver-speakup. When cur_phonetic=1, it causes speakup to speak letters phonetically if paused on the character while arrowing through a word. When a user does not set cur_phonetic to any value, the default value for it would be 0. [1]: https://github.com/linux-speakup/speakup/issues/6 [2]: https://github.com/linux-speakup/speakup/issues/5 since V1: - removed unnecessary lines Signed-off-by: Mushahid Hussain Reviewed-by: Samuel Thibault Link: https://lore.kernel.org/r/20221115100530.91174-3-mushi.shar@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/accessibility/speakup/kobjects.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/accessibility/speakup/kobjects.c') diff --git a/drivers/accessibility/speakup/kobjects.c b/drivers/accessibility/speakup/kobjects.c index 41ae24ab5d08..a7522d409802 100644 --- a/drivers/accessibility/speakup/kobjects.c +++ b/drivers/accessibility/speakup/kobjects.c @@ -914,6 +914,8 @@ static struct kobj_attribute say_word_ctl_attribute = __ATTR(say_word_ctl, 0644, spk_var_show, spk_var_store); static struct kobj_attribute spell_delay_attribute = __ATTR(spell_delay, 0644, spk_var_show, spk_var_store); +static struct kobj_attribute cur_phonetic_attribute = + __ATTR(cur_phonetic, 0644, spk_var_show, spk_var_store); /* * These attributes are i18n related. @@ -967,6 +969,7 @@ static struct attribute *main_attrs[] = { &say_control_attribute.attr, &say_word_ctl_attribute.attr, &spell_delay_attribute.attr, + &cur_phonetic_attribute.attr, NULL, }; -- cgit v1.2.3