diff options
author | Mushahid Hussain <mushi.shar@gmail.com> | 2022-11-15 15:05:30 +0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-23 19:47:15 +0100 |
commit | 72b8ec15f97bbabbb2379c87cb5f7a9dc63f0d88 (patch) | |
tree | 2a67478b1907cba4c0505b7aa6e37e56eabc3519 /drivers/accessibility/speakup/kobjects.c | |
parent | f43241aafedb1c7d72825cea1a521cef183ee61d (diff) | |
download | linux-next-72b8ec15f97bbabbb2379c87cb5f7a9dc63f0d88.tar.gz |
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<mushi.shar@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Link: https://lore.kernel.org/r/20221115100530.91174-3-mushi.shar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/accessibility/speakup/kobjects.c')
-rw-r--r-- | drivers/accessibility/speakup/kobjects.c | 3 |
1 files changed, 3 insertions, 0 deletions
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, }; |