David Flanagan wrote: > > I can't figure out how to correctly bind a command to Alt-|. In order > to do it, I have to bind to > > <keyPressed code="BACK_SLASH" modifiers="alt shift"/> > > This, of course, ties the binding to my particular keyboard layout > rather than to the actual character.
I don't see any way to do differently. For Java, hence for XXE, if keycode PIPE existed, --- <keyPressed code="PIPE" modifiers="alt"/> --- would always be different from: --- <keyPressed code="BACK_SLASH" modifiers="alt shift"/> --- and would also tie the binding to your particular keyboard layout. This is different from bindings using (for example, with prefix Ctrl-X): --- <charTyped char="|" /> --- or: --- <charTyped char="\" /> --- which should work whatever is the keyboard layout. > In the poweruser's guide, under the docs for binding, I can't see what > name to use for the keycode for the vertical bar or pipe character. On > the other hand, I don't see it in Sun's documentation for > java.awt.event.KeyEvent either, so either I'm overlooking something, or > this may be a bug with Java 1.4. Any thoughts? I don't understand why this keycode is missing from java.awt.event.KeyEvent. > Also, in the docs, at least, it looks like your list of keycode names > may have been generated based on Java 1.3. In Java 1.4, they've > corrected the spelling of SEPARATER to SEPARATOR. I didn't notice very useful additions in Java 1.4 (such as the Windows keys!). I have just changed SEPARATER to SEPARATOR.

