void currentKeybdLayout_FunctionKeyCapTap(object sender, Key.KeyCapEventArgs e) { int index = indexDict[currentKeyboardLayout.FunctionKeyboard.KeyboardLayoutType]; //키보드 스왑 IKeyboardLayout tmpLayout = currentKeyboardLayout; currentKeyboardLayout = currentKeyboardLayout.FunctionKeyboard; currentKeyboardLayout.FunctionKeyboard = tmpLayout;; //바뀌기 이전 키보드의 언어 및 심볼키 복사 if (currentKeyboardLayout.KeyboardLayoutType == KeyboardLayoutTypes.Function) { currentKeyboardLayout.LanguageKeyboard = tmpLayout.LanguageKeyboard; currentKeyboardLayout.SymbolKeyboard = tmpLayout.SymbolKeyboard; } ((AbstractKeyboardLayout)tmpLayout).Visibility = System.Windows.Visibility.Collapsed; ((AbstractKeyboardLayout)currentKeyboardLayout).Visibility = System.Windows.Visibility.Visible; if (((AbstractKeyboardLayout)currentKeyboardLayout).ActualWidth == 0) { this.UpdateLayout(); } }
void currentKeybdLayout_LanguageKeyCapTap(object sender, Key.KeyCapEventArgs e) { if (currentKeyboardLayout.LanguageKeyboard == null || currentKeyboardLayout.LanguageKeyboard.KeyboardLayoutType == currentKeyboardLayout.KeyboardLayoutType) { //언어가 없거나 하나일때는 버튼처리 무시 return; } int index = indexDict[currentKeyboardLayout.LanguageKeyboard.OriginalKeyboardLayoutType]; //키보드 스왑 IKeyboardLayout tmpLayout = currentKeyboardLayout; currentKeyboardLayout = this.LayoutRoot.Children[index] as IKeyboardLayout; currentKeyboardLayout.SymbolKeyboard = this.LayoutRoot.Children[0] as IKeyboardLayout; currentKeyboardLayout.FunctionKeyboard = this.LayoutRoot.Children[1] as IKeyboardLayout; ((AbstractKeyboardLayout)tmpLayout).Visibility = System.Windows.Visibility.Collapsed; ((AbstractKeyboardLayout)currentKeyboardLayout).Visibility = System.Windows.Visibility.Visible; if (((AbstractKeyboardLayout)currentKeyboardLayout).ActualWidth == 0) { this.UpdateLayout(); } }
void keybdLayout_KeyCapChecked(object sender, Key.KeyCapEventArgs e) { KeyboardControlManager.Instance.KeyRelease(e.ToKeyboardInfo()); }
void currentKeybdLayout_KeyCapPressed(object sender, Key.KeyCapEventArgs e) { KeyboardControlManager.Instance.KerPress(e.ToKeyboardInfo()); }