Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.0.0 RC
    • Fix Version/s: 3.0.0 RC
    • Component/s: ZSS Component
    • Labels:
      None

      Description

      Problem Description:

      set ctrlKeys attribute to ^a, but pressing ctrl+a doesn't sent onCtrlKey event.

      Reproducing Step:

      <window hflex="1" vflex="1"
      		apply="org.zkoss.zss.essential.EventsComposer">
      			<spreadsheet id="ss" hflex="1" vflex="1"
      			 maxVisibleRows="100" maxVisibleColumns="40"
      			ctrlKeys="^a"/>
      </window>
      
      public class EventsComposer extends SelectorComposer<Component>{
      
      	@Listen("onCtrlKey = spreadsheet")
      	public void onCtrlKey(KeyEvent event){
      		
      		System.out.println(event.getKeyCode());
      	}
      }
      

      Root Cause:

      in Spreadsheet.java, below code set ctrlKeys back to default value.

      	private void reloadUserActionEventRegisteration() {
      		...
      			String ctrlKeys = ua.getCtrlKeys();
      			if(ctrlKeys!=null){//null, don't set, keep the original
      				this.setCtrlKeys(ctrlKeys);
      			}
      		...
      	}
      

        Activity

        Hide
        dennis dennis added a comment -

        fixed since 2013/7/5
        default action handler will respect the custom ctrlKeys, but for who call the setCtrlKeys should consider provide the keys(^X^C^V^D^B^I^U#del) that default action handler cares, or the corresponding handling logic will not be trigger

        Show
        dennis dennis added a comment - fixed since 2013/7/5 default action handler will respect the custom ctrlKeys, but for who call the setCtrlKeys should consider provide the keys(^X^C^V^D^B^I^U#del) that default action handler cares, or the corresponding handling logic will not be trigger

          People

          • Assignee:
            dennis dennis
            Reporter:
            hawk hawk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: