<commit_before>/*
 * Copyright 2011, Red Hat, Inc. and individual contributors
 * as indicated by the @author tags. See the copyright.txt file in the
 * distribution for a full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.zanata.webtrans.client.editor;

import com.google.gwt.dom.client.NativeEvent;

/**
*
* @author <NAME> <a href="mailto:<EMAIL>"><EMAIL></a>
* 
* @formatter:off
* Navigation mode:
* ALT+UP arrow or J - Previous entry
* ALT+DOWN arrow or K - Next entry
* ALT+G - copy from source
* Enter - Open editor
* 
* Edit mode:
* ALT+(UP arrow/J) - Previous entry
* ALT+(DOWN arrow/K) - Next entry
* ALT+G - copy from source
* CTRL+Enter - Save as approved
* Enter - Save as approved (if isEnterKeySavesEnabled = true)
* 
**/
public interface CheckKey
{
   static final int KEY_G = 'G';
   static final int KEY_J = 'J';
   static final int KEY_K = 'K';
   static final int KEY_S = 'S';
   
   static int KEY_1 = 49;
   static int KEY_1_NUM = 97;
   
   static final int KEY_2 = 50;
   static final int KEY_2_NUM = 98;
   
   static final int KEY_3 = 51;
   static final int KEY_3_NUM = 99;
   
   static final int KEY_4 = 52;
   static final int KEY_4_NUM = 100;

   void init(NativeEvent event);


   /**
    * Save as fuzzy shortcut: CTRL+S
    */
   boolean isSaveAsFuzzyKey();
   
   /**
    * Move to previous state entry: ALT+PageUp
    */
   boolean isPreviousStateEntryKey();

   /**
    * Move to next state entry: ALT+PageDown
    */
   boolean isNextStateEntryKey();

   /**
    * Move to previous entry: 
    * Edit: ALT+(Up/J)
    * Navigation: ALT+(Up/J)
    */<commit_msg>Add comment on keycode used in keyboard shortcut<commit_after>/*
 * Copyright 2011, Red Hat, Inc. and individual contributors
 * as indicated by the @author tags. See the copyright.txt file in the
 * distribution for a full listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 */
package org.zanata.webtrans.client.editor;

import com.google.gwt.dom.client.NativeEvent;

/**
*
* @author <NAME> <a href="mailto:<EMAIL>"><EMAIL></a>
* 
* @formatter:off
* Navigation mode:
* ALT+UP arrow or J - Previous entry
* ALT+DOWN arrow or K - Next entry
* ALT+G - copy from source
* Enter - Open editor
* 
* Edit mode:
* ALT+(UP arrow/J) - Previous entry
* ALT+(DOWN arrow/K) - Next entry
* ALT+G - copy from source
* CTRL+Enter - Save as approved
* Enter - Save as approved (if isEnterKeySavesEnabled = true)
* 
**/
public interface CheckKey
{
   static final int KEY_G = 'G';
   static final int KEY_J = 'J';
   static final int KEY_K = 'K';
   static final int KEY_S = 'S';
   
   static int KEY_1 = 49; // keycode of number '1' on the top keyboard
   static int KEY_1_NUM = 97; // keycode of number '1' in the key pad without modifier
   
   static final int KEY_2 = 50; // keycode of number '2' on the top keyboard
   static final int KEY_2_NUM = 98; // keycode of number '2' in the key pad without modifier
   
   static final int KEY_3 = 51; // keycode of number '3' on the top keyboard
   static final int KEY_3_NUM = 99; // keycode of number '3' in the key pad without modifier
   
   static final int KEY_4 = 52; // keycode of number '4' on the top keyboard
   static final int KEY_4_NUM = 100; // keycode of number '4' in the key pad without modifier

   void init(NativeEvent event);


   /**
    * Save as fuzzy shortcut: CTRL+S
    */
   boolean isSaveAsFuzzyKey();
   
   /**
    * Move to previous state entry: ALT+PageUp
    */
   boolean isPreviousStateEntryKey();

   /**
    * Move to next state entry: ALT+PageDown
    */
   boolean isNextStateEntryKey();

   /**
    * Move to previous entry: 
    * Edit: ALT+(Up/J)
    * Navigation: ALT+(Up/J)
    */
{'fraction_non_alphanumeric': 0.09382810997885022, 'fraction_numerical': 0.017688905979619304, 'mean_word_length': 3.148325358851675, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3404679', 'n_tokens_mistral': 1660, 'n_tokens_neox': 1538, 'n_words': 679}