If bash can, why not Speakup?

William Hubbs w.d.hubbs at gmail.com
Thu Nov 18 15:57:29 EST 2010


Hi Janina,

On Thu, Nov 18, 2010 at 03:27:18PM -0500, Janina Sajka wrote:
> Note that you can have either vim or emacs editing of bash commands.
> Emacs is the default, but you can reset this by issuing:
> 
> set -o vim
> 
> By, default, this provides bash shell command editing in insert mode. As
> in vim, pressing Esc takes you into command mode where all the vim
> command mode functionality is provided.
> 
> So, the shell knows. That's got to be a value that's written somewhere,
> and thus something Speakup could read and respond to. I don't know
> where, but am I wrong?

There probably is a value for this written somewhere, but it is just in
a memory location that bash knows about. That is why you have to put the
command to set it up in your .bashrc file or some similar startup file
if you want this setting by default.

Since speakup is in the kernel, it doesn't have an easy way to keep
track of which programs are running in user space or where they are
stored in memory, so there isn't a way that I know of to program speakup
itself to do something like what you are asking.

The closest approximation of something like this would be to write a
patch for bash which makes it aware of speakup and has it write values
to the /sys/accessibility/speakup files to change the pitch, etc.
However, that has its own issues, for example, if I'm running multiple
instances of bash (say on several consoles), itwould be very easy to
confuse the settings by switching consoles, etc.

Does this make sense?

William




More information about the Speakup mailing list