[jawsscripts] Re: British keyboards backslash

  • From: "David Pinto" <davepinto@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 23 May 2008 13:47:25 -0700

Doug,

Thanks for giving some thought to my dilemna. But I still need the keycodes 
for the Vertical Bar, or Pipe as they call it. I do use strKeyName for 
comparions under certain circumstances. But for my current needs, it's not 
as straight forward as numerical constants. In the set of scripts I'm 
working on, I rely on the StringSegment function in my comparisons, and am 
happy to learn your trick for using multi-character delimiters. But even 
with that, I need several additional string functions to parse and analyze 
the text for quite a number of additional conditions. For instance, I'm 
looking not only for matches, but also executing several other evaluations 
for a mis-match. Like seeing if the user's keypress was adjacent to the 
desired keypress. For that and a number of other reasons, I have found 
through lots of trial and error that numerical constants are simple, but 
string comparisons are cludgy and more prone to error due to over looking 
one of numerous possibilities.

David

 ----- Original Message ----- 
From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Friday, May 23, 2008 1:09 PM
Subject: [jawsscripts] Re: British keyboards backslash


> I'll probably have to leave you to do the bulk of that one, and it
> does sound rather involved.  I can offer a possibility or two though:
>
> strKeyName likes to include things like "RightShift" instead of
> just "Shift."  You can use StringReplaceSubstrings to clean it up
> before making your comparisons.  You could also write a function
> that compares two keystrokes for identicalness regardless of the
> order of modifier keys in each, but I recommend testing the isSameKey
> function, because it just might do that for you.  I think you have to
> get rid of "right," "left," etc. first though.
>
> My other idea is strange and very well may not apply, but here goes...
>
> You mentioned a set of user keystrokes.  That sounds like a sequence,
> which you want to compare against a list.  I may be wrong about your
> intentions there, but if you are in fact treating the user list as a
> sequence, you can use a trick with stringSegment to pre-check the list
> and reduce CPU time for matches that would fail in a more rigorous
> test:  stringSegment actually allows a multi-character delimiter
> string, and if you pass one, you get all segments divided in the
> original string by any of the delimiters.  For example,
> stringSegment("a+b|c+d", "|+", 3) should return "c," because
> stringSegment is allowing both "|" and "+" to be delimiters.  Looping
> through the user keystroke string with the same pair of delimiters
> will give you things like "ctrl," "shift," "a," "alt," "d," etc.  If
> your user keystroke string is a sequence, finding any such segment
> that is not in the comparison list would mean an overall match
> failure.
>
> On Fri, May 23, 2008 at 12:54:18PM -0700, David Pinto wrote:
> Doug,
>
> Valid point. However, for my purposes, using strKeyName is more 
> cumbersome.
> I have a delimited list of desired keypresses, and then compare this list
> with the user's key presses, which are also stored in a delimited list. I
> then need to compare the 2 lists. For the particular set of evaluations 
> that
> I'm executing, comparing the 2 lists is much easier when dealing with
> numerical constants. For the painful details, I can write you off list if
> you like.
> David Pinto
> YesAccessible
>
>
> ----- Original Message ----- 
> From: "Doug Lee" <doug.lee@xxxxxxxxxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Friday, May 23, 2008 9:35 AM
> Subject: [jawsscripts] Re: British keyboards backslash
>
>
>> Is there any reason you can't use the strKeyName parameter to the
>> KeyPressedEvent instead of using the key codes?
>>
>> On Fri, May 23, 2008 at 09:27:24AM -0700, David Pinto wrote:
>> I need to get the JAWS keycodes for Left SHIFT + backslash, and right
>> shift
>> + backslash. OF course, in the KeyPressedEvent, The keycode is in the
>> variable n Key. But I do not have a British keyboard, with has the
>> backslash
>> key in a different location than the American keyboard.
>>
>> I'm localizing a set of scripts for the British Isles and need to
>> distinguish between these key combinations. One last twist is that when
>> using the SHIFT key, the JAWS keycodes changed starting from JAWS 8, So I
>> need the JAWS 6 or 7  keycodes for Left/Right Shift, Plus Backslash. And
>> the
>> JAWS 8 or 9 key codes for Left/Right Shift Plus Backslash. Any help would
>> be
>> greatly appreciated.
>>
>> Thanks,
>>
>>
>>
>> David Pinto
>>
>> YesAccessible
>>
>> __________?
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts
>>
>> -- 
>> Doug Lee, Senior Accessibility Programmer
>> SSB BART Group - Accessibility-on-Demand
>> mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
>> "While they were saying among themselves it cannot be done,
>> it was done." --Helen Keller
>> __________
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts
>>
>>
>
> __________?
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> -- 
> Doug Lee, Senior Accessibility Programmer
> SSB BART Group - Accessibility-on-Demand
> mailto:doug.lee@xxxxxxxxxxxxxxxx  http://www.ssbbartgroup.com
> "While they were saying among themselves it cannot be done,
> it was done." --Helen Keller
> __________
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
> 

__________ 
View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: