Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge branch '1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Mar 12, 2012
2 parents 386fea9 + 35ab9ac commit 3c721a3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
Expand Up @@ -47,10 +47,18 @@ public interface CheckKey
static final int KEY_J = 'J';
static final int KEY_K = 'K';
static final int KEY_S = 'S';
static final int KEY_1 = '1';
static final int KEY_2 = '2';
static final int KEY_3 = '3';
static final int KEY_4 = '4';

static int KEY_1 = 49;
static int KEY_1_NUM = 35;

static final int KEY_2 = 50;
static final int KEY_2_NUM = 40;

static final int KEY_3 = 51;
static final int KEY_3_NUM = 34;

static final int KEY_4 = 52;
static final int KEY_4_NUM = 37;

public static enum Context
{
Expand Down
Expand Up @@ -162,7 +162,7 @@ public boolean isCtrlKey()
@Override
public boolean isCopyFromTransMem()
{
return ctrlKey && shiftKey && (keyCode == KEY_1 || keyCode == KEY_2 || keyCode == KEY_3 || keyCode == KEY_4);
return ctrlKey && shiftKey && (keyCode == KEY_1 || keyCode == KEY_1_NUM || keyCode == KEY_2 || keyCode == KEY_2_NUM || keyCode == KEY_3 || keyCode == KEY_3_NUM || keyCode == KEY_4 || keyCode == KEY_4_NUM);
}

@Override
Expand Down
Expand Up @@ -236,16 +236,20 @@ public void onPreviewNativeEvent(NativePreviewEvent event)
int index;
switch (checkKey.getKeyCode())
{
case '1':
case CheckKey.KEY_1:
case CheckKey.KEY_1_NUM:
index = 0;
break;
case '2':
case CheckKey.KEY_2:
case CheckKey.KEY_2_NUM:
index = 1;
break;
case '3':
case CheckKey.KEY_3:
case CheckKey.KEY_3_NUM:
index = 2;
break;
case '4':
case CheckKey.KEY_4:
case CheckKey.KEY_4_NUM:
index = 3;
break;
default:
Expand Down

0 comments on commit 3c721a3

Please sign in to comment.