Project

General

Profile

KeyInput.patch

Sergey Ivanovskiy, 08/20/2019 06:15 PM

Download (1.35 KB)

View differences:

src/com/goldencode/p2j/ui/client/event/KeyInput.java 2019-08-20 21:11:18 +0000
84 84
package com.goldencode.p2j.ui.client.event;
85 85

  
86 86
import com.goldencode.p2j.ui.*;
87
import com.goldencode.p2j.ui.chui.ThinClient;
87 88
import com.goldencode.p2j.ui.client.event.listener.*;
88 89
import com.goldencode.p2j.ui.client.widget.*;
89 90

  
......
466 467
    * @return true if this keyEvent can produce an action
467 468
    */
468 469
   public boolean canProduceAction() {
469
      return (!this.isConsumed() &&
470
             (this.keyCode() == Key.VK_ENTER && this.id() == EventType.KEY_PRESSED  ||
471
             this.keyCode() == Key.VK_ENTER && this.id() == EventType.KEY_RELEASED ||   
472
             this.actionCode() == Keyboard.SE_CHOOSE));
470
      return !this.isConsumed() &&
471
                (this.keyCode() == Key.VK_ENTER && this.id() == EventType.KEY_PRESSED  ||
472
                 this.keyCode() == Key.VK_ENTER && this.id() == EventType.KEY_RELEASED ||
473
                 this.actionCode() == Keyboard.SE_CHOOSE                               ||
474
                 ThinClient.getInstance().isChui() && this.keyCode() == Key.VK_ENTER
475
                                                   && this.id() == EventType.KEY_TYPED);
473 476
   }
474 477
}