import org.jnativehook.GlobalScreen;
import org.jnativehook.NativeHookException;
import org.jnativehook.keyboard.NativeKeyEvent;

import java.util.HashMap;
import java.util.logging.LogManager;


public class Main {
    private static HashMap<Integer,Integer> keyMap = new HashMap<Integer, Integer>();
    public static void main(String[] args) {
        try {
            GlobalScreen.registerNativeHook();
            LogManager.getLogManager().reset();
            GlobalScreen.getInstance().addNativeKeyListener(new GlobalKeyListener(new Callback<Integer>() {
                @Override
                public void callback(Integer keyCode) {
                    int currentValue = 0;
                    if (keyMap.containsKey(keyCode)){
                        currentValue = keyMap.get(keyCode);
                    }
                    keyMap.put(keyCode,currentValue+1);
                    System.out.println(keyCode);
                }
            }));
        } catch (NativeHookException e) {
            e.printStackTrace();
        }
//        try {
//            Thread.sleep(30000);
//        } catch (InterruptedException e) {
//            e.printStackTrace();
//        }
        HeatMapFrame p = new HeatMapFrame(keyMap);
        p.setVisible(true);
        System.out.println("Hello World!");

    }

}

@@ -300,24 +300,74 @@
 nteger%3E();%0D%0A
+    private static boolean disableSpace = false;%0D%0A
     public s
@@ -508,24 +508,244 @@
 ).reset();%0D%0A
+            ApplicationFrame frame = new ApplicationFrame(new Callback%3CBoolean%3E() %7B%0D%0A                @Override%0D%0A                public void callback(Boolean spaces) %7B%0D%0A                    disableSpace = spaces;%0D%0A        
             
@@ -849,32 +849,40 @@
                 
+   
+     
 @Override%0D%0A     
@@ -868,32 +868,40 @@
      @Override%0D%0A
+        
                 
@@ -961,16 +961,24 @@
         
+        
 int curr
@@ -1012,16 +1012,24 @@
         
+       
+ 
 if (keyM
@@ -1083,68 +1083,313 @@
     
-currentValue = keyMap.get(keyCode);%0D%0A                    %7D%0D%0A
+        if (disableSpace && keyCode!=NativeKeyEvent.VC_SPACE)%0D%0A                                    currentValue = keyMap.get(keyCode);%0D%0A                                else if (!disableSpace)%0D%0A                                    currentValue = keyMap.get(keyCode);%0D%0A                            %7D%0D%0A        
     
@@ -1453,32 +1453,40 @@
                 
+    
+    
 System.out.print
@@ -1511,35 +1511,32 @@
             
-%7D%0D%0A
         
     %7D));%0D%0A  
@@ -1527,26 +1527,23 @@
     
+%7D%0D%0A
     
-%7D));%0D%0A
         
 %7D ca
@@ -1542,77 +1542,30 @@
     
-%7D catch (NativeHookException e) %7B%0D%0A            e.printStackTrace();%0D%0A
+        %7D));%0D%0A        
     
@@ -1571,26 +1571,24 @@
      %7D%0D%0A
-//
         
 try %7B%0D%0A/
@@ -1583,17 +1583,16 @@
     
-try %7B%0D%0A//
+    %7D,%0D%0A
     
@@ -1603,122 +1603,119 @@
     
-Thread.sleep(30000);%0D%0A//        %7D catch (InterruptedException e) %7B%0D%0A//            e.printStackTrace();%0D%0A//
+new Callback%3CVoid%3E() %7B%0D%0A                @Override%0D%0A                public void callback(Void aVoid) %7B%0D%0A
         
 %7D%0D%0A 
@@ -1702,35 +1702,36 @@
 oid) %7B%0D%0A        
-%7D%0D%0A
+    
         HeatMapF
@@ -1762,24 +1762,36 @@
 e(keyMap);%0D%0A
+            
         p.se
@@ -1803,24 +1803,187 @@
 ble(true);%0D%0A
+                %7D%0D%0A            %7D);%0D%0A            frame.setVisible(true);%0D%0A        %7D catch (NativeHookException e) %7B%0D%0A            e.printStackTrace();%0D%0A        %7D%0D%0A%0D%0A
         Syst

Add application frame