@@ -65,7 +65,7 @@ void restore_default_settings()
65
65
CBlshift_action_b . SelectedItem = "Left click" ;
66
66
CBrshift_action_b . SelectedItem = "Ctrl left click" ;
67
67
CBlalt_action_b . SelectedItem = "Hold left" ;
68
- CBralt_action_b . SelectedItem = "Hold right " ;
68
+ CBralt_action_b . SelectedItem = "Release left " ;
69
69
CBlctrl_action_b . SelectedItem = "Double left click" ;
70
70
CBrctrl_action_b . SelectedItem = "Move mouse" ;
71
71
@@ -101,7 +101,7 @@ void restore_default_settings()
101
101
TBfont_size . Text = "12" ;
102
102
CHBsmart_mousegrid . IsChecked = true ;
103
103
104
- CBkeyboard_layout . SelectedIndex = 0 ;
104
+ CBkeyboard_layout . SelectedIndex = 0 ; //Any layout
105
105
106
106
CHBrun_at_startup . IsChecked = false ;
107
107
CHBstart_minimized . IsChecked = false ;
@@ -579,6 +579,10 @@ void set_values()
579
579
else if ( CBlshift_action_a . SelectedIndex == 9 )
580
580
left_shift_action_a = ActionX . hold_right ;
581
581
else if ( CBlshift_action_a . SelectedIndex == 10 )
582
+ left_shift_action_a = ActionX . release_left ;
583
+ else if ( CBlshift_action_a . SelectedIndex == 11 )
584
+ left_shift_action_a = ActionX . release_right ;
585
+ else if ( CBlshift_action_a . SelectedIndex == 12 )
582
586
left_shift_action_a = ActionX . none ;
583
587
584
588
if ( CBrshift_action_a . SelectedIndex == 0 )
@@ -602,6 +606,10 @@ void set_values()
602
606
else if ( CBrshift_action_a . SelectedIndex == 9 )
603
607
right_shift_action_a = ActionX . hold_right ;
604
608
else if ( CBrshift_action_a . SelectedIndex == 10 )
609
+ right_shift_action_a = ActionX . release_left ;
610
+ else if ( CBrshift_action_a . SelectedIndex == 11 )
611
+ right_shift_action_a = ActionX . release_right ;
612
+ else if ( CBrshift_action_a . SelectedIndex == 12 )
605
613
right_shift_action_a = ActionX . none ;
606
614
607
615
if ( CBlshift_action_b . SelectedIndex == 0 )
@@ -625,6 +633,10 @@ void set_values()
625
633
else if ( CBlshift_action_b . SelectedIndex == 9 )
626
634
left_shift_action_b = ActionX . hold_right ;
627
635
else if ( CBlshift_action_b . SelectedIndex == 10 )
636
+ left_shift_action_b = ActionX . release_left ;
637
+ else if ( CBlshift_action_b . SelectedIndex == 11 )
638
+ left_shift_action_b = ActionX . release_right ;
639
+ else if ( CBlshift_action_b . SelectedIndex == 12 )
628
640
left_shift_action_b = ActionX . none ;
629
641
630
642
if ( CBrshift_action_b . SelectedIndex == 0 )
@@ -648,6 +660,10 @@ void set_values()
648
660
else if ( CBrshift_action_b . SelectedIndex == 9 )
649
661
right_shift_action_b = ActionX . hold_right ;
650
662
else if ( CBrshift_action_b . SelectedIndex == 10 )
663
+ right_shift_action_b = ActionX . release_left ;
664
+ else if ( CBrshift_action_b . SelectedIndex == 11 )
665
+ right_shift_action_b = ActionX . release_right ;
666
+ else if ( CBrshift_action_b . SelectedIndex == 12 )
651
667
right_shift_action_b = ActionX . none ;
652
668
653
669
if ( CBlalt_action_a . SelectedIndex == 0 )
@@ -671,6 +687,10 @@ void set_values()
671
687
else if ( CBlalt_action_a . SelectedIndex == 9 )
672
688
left_alt_action_a = ActionX . hold_right ;
673
689
else if ( CBlalt_action_a . SelectedIndex == 10 )
690
+ left_alt_action_a = ActionX . release_left ;
691
+ else if ( CBlalt_action_a . SelectedIndex == 11 )
692
+ left_alt_action_a = ActionX . release_right ;
693
+ else if ( CBlalt_action_a . SelectedIndex == 12 )
674
694
left_alt_action_a = ActionX . none ;
675
695
676
696
if ( CBralt_action_a . SelectedIndex == 0 )
@@ -694,6 +714,10 @@ void set_values()
694
714
else if ( CBralt_action_a . SelectedIndex == 9 )
695
715
right_alt_action_a = ActionX . hold_right ;
696
716
else if ( CBralt_action_a . SelectedIndex == 10 )
717
+ right_alt_action_a = ActionX . release_left ;
718
+ else if ( CBralt_action_a . SelectedIndex == 11 )
719
+ right_alt_action_a = ActionX . release_right ;
720
+ else if ( CBralt_action_a . SelectedIndex == 12 )
697
721
right_alt_action_a = ActionX . none ;
698
722
699
723
if ( CBlalt_action_b . SelectedIndex == 0 )
@@ -717,6 +741,10 @@ void set_values()
717
741
else if ( CBlalt_action_b . SelectedIndex == 9 )
718
742
left_alt_action_b = ActionX . hold_right ;
719
743
else if ( CBlalt_action_b . SelectedIndex == 10 )
744
+ left_alt_action_b = ActionX . release_left ;
745
+ else if ( CBlalt_action_b . SelectedIndex == 11 )
746
+ left_alt_action_b = ActionX . release_right ;
747
+ else if ( CBlalt_action_b . SelectedIndex == 12 )
720
748
left_alt_action_b = ActionX . none ;
721
749
722
750
if ( CBralt_action_b . SelectedIndex == 0 )
@@ -740,6 +768,10 @@ void set_values()
740
768
else if ( CBralt_action_b . SelectedIndex == 9 )
741
769
right_alt_action_b = ActionX . hold_right ;
742
770
else if ( CBralt_action_b . SelectedIndex == 10 )
771
+ right_alt_action_b = ActionX . release_left ;
772
+ else if ( CBralt_action_b . SelectedIndex == 11 )
773
+ right_alt_action_b = ActionX . release_right ;
774
+ else if ( CBralt_action_b . SelectedIndex == 12 )
743
775
right_alt_action_b = ActionX . none ;
744
776
745
777
if ( CBlctrl_action_a . SelectedIndex == 0 )
@@ -763,6 +795,10 @@ void set_values()
763
795
else if ( CBlctrl_action_a . SelectedIndex == 9 )
764
796
left_ctrl_action_a = ActionX . hold_right ;
765
797
else if ( CBlctrl_action_a . SelectedIndex == 10 )
798
+ left_ctrl_action_a = ActionX . release_left ;
799
+ else if ( CBlctrl_action_a . SelectedIndex == 11 )
800
+ left_ctrl_action_a = ActionX . release_right ;
801
+ else if ( CBlctrl_action_a . SelectedIndex == 12 )
766
802
left_ctrl_action_a = ActionX . none ;
767
803
768
804
if ( CBrctrl_action_a . SelectedIndex == 0 )
@@ -786,6 +822,10 @@ void set_values()
786
822
else if ( CBrctrl_action_a . SelectedIndex == 9 )
787
823
right_ctrl_action_a = ActionX . hold_right ;
788
824
else if ( CBrctrl_action_a . SelectedIndex == 10 )
825
+ right_ctrl_action_a = ActionX . release_left ;
826
+ else if ( CBrctrl_action_a . SelectedIndex == 11 )
827
+ right_ctrl_action_a = ActionX . release_right ;
828
+ else if ( CBrctrl_action_a . SelectedIndex == 12 )
789
829
right_ctrl_action_a = ActionX . none ;
790
830
791
831
if ( CBlctrl_action_b . SelectedIndex == 0 )
@@ -809,6 +849,10 @@ void set_values()
809
849
else if ( CBlctrl_action_b . SelectedIndex == 9 )
810
850
left_ctrl_action_b = ActionX . hold_right ;
811
851
else if ( CBlctrl_action_b . SelectedIndex == 10 )
852
+ left_ctrl_action_b = ActionX . release_left ;
853
+ else if ( CBlctrl_action_b . SelectedIndex == 11 )
854
+ left_ctrl_action_b = ActionX . release_right ;
855
+ else if ( CBlctrl_action_b . SelectedIndex == 12 )
812
856
left_ctrl_action_b = ActionX . none ;
813
857
814
858
if ( CBrctrl_action_b . SelectedIndex == 0 )
@@ -832,6 +876,10 @@ void set_values()
832
876
else if ( CBrctrl_action_b . SelectedIndex == 9 )
833
877
right_ctrl_action_b = ActionX . hold_right ;
834
878
else if ( CBrctrl_action_b . SelectedIndex == 10 )
879
+ right_ctrl_action_b = ActionX . release_left ;
880
+ else if ( CBrctrl_action_b . SelectedIndex == 11 )
881
+ right_ctrl_action_b = ActionX . release_right ;
882
+ else if ( CBrctrl_action_b . SelectedIndex == 12 )
835
883
right_ctrl_action_b = ActionX . none ;
836
884
837
885
bool grid_size_changed = false ;
@@ -1055,7 +1103,7 @@ void save_settings()
1055
1103
if ( int . TryParse ( TBdesired_figures_nr . Text , out trash ) == false
1056
1104
|| int . Parse ( TBdesired_figures_nr . Text ) < 5
1057
1105
|| int . Parse ( TBdesired_figures_nr . Text ) > max_figures_nr )
1058
- throw new Exception ( "Desired figures number must be between 5 and "
1106
+ throw new Exception ( "Desired figures number for current keyboard layout must be between 5 and "
1059
1107
+ max_figures_nr + "." ) ;
1060
1108
1061
1109
if ( int . TryParse ( TBfont_size . Text , out trash ) == false
@@ -1177,6 +1225,15 @@ void load_settings()
1177
1225
CHBsmart_mousegrid . IsChecked = smart_grid = bool . Parse ( sr . ReadLine ( ) ) ;
1178
1226
1179
1227
CBkeyboard_layout . SelectedIndex = int . Parse ( sr . ReadLine ( ) ) ;
1228
+
1229
+ if ( CBkeyboard_layout . SelectedItem . ToString ( ) == "US English / US International" )
1230
+ create_grid_alphabet_for_US_kl ( ) ;
1231
+ else
1232
+ create_grid_alphabet_for_any_kl ( ) ;
1233
+
1234
+ grid_symbols_limit = grid_alphabet . Count ;
1235
+ max_figures_nr = ( int ) Math . Pow ( ( double ) grid_symbols_limit , 2 ) ;
1236
+
1180
1237
CHBcheck_for_updates . IsChecked = bool . Parse ( sr . ReadLine ( ) ) ;
1181
1238
CHBrun_at_startup . IsChecked = bool . Parse ( sr . ReadLine ( ) ) ;
1182
1239
CHBstart_minimized . IsChecked = bool . Parse ( sr . ReadLine ( ) ) ;
0 commit comments