András, I will try to take some time tomorrow to have a look at it. Just a promise ;o)
Jacques > Guys, I'd like to stick to the Alt+G example. > > I've been playing around and found that > - SHIFT and CTRL modifiers work, ALT do not (no idea why) > - VK_G and VK_1 are also virtual keys (I did not expect that) > > Further problem is that SKU.GZ-1001 is defined in posmain.xml, and > I don't know how to tie it to lets say code 505, as key-code is > not an attr of the Button element in posmain.xml. > > Some docs would be nice on this topic. > > > Thanks, > András > > > Monday, February 12, 2007, 3:54:35 PM, you wrote: > > > Andras, Andrew, > > > Yes, AFAIK value attribute is an arbitrary integer that you deal > > with after (see 500 for Enter, and 501 for Esc, in POS). > > > Jacques > > > >> Andras, > >> > >> Ok, so for a new shortcut... > >> jpos.xml > >> <prop name="key.VK_F1+SHIFT" type="String" value="297"/> > >> > >> buttonevents.xml > >> <button-events> > >> <!-- numeric button events --> > >> <event button-name="numOne" class- > >> name="org.ofbiz.pos.event.NumericEvents" method-name="triggerOne" > >> disable-lock="true"/> > >> <event button-name="numOne" key-code="297" class- > >> name="org.ofbiz.pos.event.NumericEvents" method-name="triggerOne" > >> disable-lock="true"/> > >> > >> So now pressing SHIFT+F1 triggers the triggerOne method. > >> > >> - Andrew > >> > >> > >> value attribute, I think is an arbitrary integer, perhaps someone else > >> can confirm > >> > >> > >> > >> On Sun, 2007-02-11 at 16:16 +0100, Imre András Róbert wrote: > >> > Ok, I got it, I see Enter is defined with code 500. > >> > > >> > Now how can I define a code for Alt+G? > >> > > >> > And how can I get the 'default' codes which are not > >> > specified in jpos.xml? E.g. what happens when I press '1' > >> > for which there is no code in jpos.xml? > >> > > >> > > >> > Thanks, > >> > András > >> > > >> > > >> > Sunday, February 11, 2007, 11:33:33 AM, you wrote: > >> > > >> > > Andras, > >> > > >> > > Look at the mapping for the Enter key. > >> > > >> > > - Andrew > >> > > >> > > On Sun, 2007-02-11 at 01:39 +0100, Imre András Róbert wrote: > >> > >> Hi, > >> > >> > >> > >> I'd like to define shortcut keys for product buttons. > >> > >> For example, pressing Alt+G would act as pressing the > >> > >> button GIZMO 1. This would enhance usability. > >> > >> > >> > >> Doc comments in Keyboard.java tell me that key to code > >> > >> mapping is in jpos.xml, and code to button mapping is > >> > >> in buttonevents.xml. > >> > >> > >> > >> numeric.xml tells me widget id (numOne) and widget text (1) > >> > >> > >> > >> buttonevents.xml tells me widget id (numOne) and handler (triggerOne > >> > >> method of org.ofbiz.pos.event.NumericEvents) > >> > >> > >> > >> I still dont see the code to button mapping as the doc comment > >> > >> indicates in Keyboard.java. > >> > >> > >> > >> Q1/ It seems to me that jpos.xml contains only additional > >> > >> key to code bindings. Where are the other codes? E.g. > >> > >> what happens when I press '1'? > >> > >> > >> > >> Q2/ I dont see any codes in buttonevents.xml. Where is > >> > >> the code to button mapping? > >> > >> > >> > >> Q3/ Is there a dtd/schema available for these XUI cfg > >> > >> files? (Would help to assess the capability of these > >> > >> configs instead of making guesses based on gathered > >> > >> cfg files) > >> > >> > >> > >> > >> > >> Thanks, > >> > >> András > >> > >> > >> > >> > >> > > >> -- > >> Kind Regards > >> Andrew Sykes <[EMAIL PROTECTED]> > >> Sykes Development Ltd > >> http://www.sykesdevelopment.com > >> >