mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
KBM
This commit is contained in:
@@ -272,15 +272,23 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
|
|||||||
<value>Remap a key</value>
|
<value>Remap a key</value>
|
||||||
<comment>Keyboard Manager remap keyboard button content</comment>
|
<comment>Keyboard Manager remap keyboard button content</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="KeyboardManager_RemapKeyboardHeader.Text" xml:space="preserve">
|
<data name="KeyboardManager_RemapKeys.Header" xml:space="preserve">
|
||||||
<value>Remap keys</value>
|
<value>Remap keys</value>
|
||||||
<comment>Keyboard Manager remap keyboard header</comment>
|
<comment>Keyboard Manager remap keyboard header</comment>
|
||||||
|
</data>
|
||||||
|
<data name="KeyboardManager_Keys.Header" xml:space="preserve">
|
||||||
|
<value>Keys</value>
|
||||||
|
<comment>Keyboard Manager remap keyboard header</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="KeyboardManager_RemapShortcutsButton.Content" xml:space="preserve">
|
<data name="KeyboardManager_RemapShortcutsButton.Content" xml:space="preserve">
|
||||||
<value>Remap a shortcut</value>
|
<value>Remap a shortcut</value>
|
||||||
<comment>Keyboard Manager remap shortcuts button</comment>
|
<comment>Keyboard Manager remap shortcuts button</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="KeyboardManager_RemapShortcutsHeader.Text" xml:space="preserve">
|
<data name="KeyboardManager_Shortcuts.Header" xml:space="preserve">
|
||||||
|
<value>Shortcuts</value>
|
||||||
|
<comment>Keyboard Manager remap keyboard header</comment>
|
||||||
|
</data>
|
||||||
|
<data name="KeyboardManager_RemapShortcuts.Header" xml:space="preserve">
|
||||||
<value>Remap shortcuts</value>
|
<value>Remap shortcuts</value>
|
||||||
<comment>Keyboard Manager remap shortcuts header</comment>
|
<comment>Keyboard Manager remap shortcuts header</comment>
|
||||||
</data>
|
</data>
|
||||||
@@ -828,10 +836,10 @@ Disabling this module or closing PowerToys will unmute the microphone and camera
|
|||||||
<data name="Encoding.Header" xml:space="preserve">
|
<data name="Encoding.Header" xml:space="preserve">
|
||||||
<value>Encoding</value>
|
<value>Encoding</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="KeyboardManager_RemapKeyboardSubtitle.Text" xml:space="preserve">
|
<data name="KeyboardManager_RemapKeys.Description" xml:space="preserve">
|
||||||
<value>Remap keys to other keys or shortcuts.</value>
|
<value>Remap keys to other keys or shortcuts.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="KeyboardManager_RemapShortcutsSubtitle.Text" xml:space="preserve">
|
<data name="KeyboardManager_RemapShortcuts.Description" xml:space="preserve">
|
||||||
<value>Remap shortcuts to other shortcuts or keys. Additionally, mappings can be targeted to specific applications as well.</value>
|
<value>Remap shortcuts to other shortcuts or keys. Additionally, mappings can be targeted to specific applications as well.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="General.ModuleDescription" xml:space="preserve">
|
<data name="General.ModuleDescription" xml:space="preserve">
|
||||||
|
|||||||
@@ -124,10 +124,7 @@
|
|||||||
<!-- CanReorderItems="True" AllowDrop="True" -->
|
<!-- CanReorderItems="True" AllowDrop="True" -->
|
||||||
<ListView ItemsSource="{Binding ColorFormats, Mode=TwoWay}"
|
<ListView ItemsSource="{Binding ColorFormats, Mode=TwoWay}"
|
||||||
SelectionMode="None"
|
SelectionMode="None"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<ItemsControl.ItemContainerTransitions>
|
|
||||||
<TransitionCollection/>
|
|
||||||
</ItemsControl.ItemContainerTransitions>
|
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid
|
<Grid
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
|
xmlns:extensions="using:Microsoft.Toolkit.Uwp.UI.Extensions"
|
||||||
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
|
||||||
xmlns:Lib="using:Microsoft.PowerToys.Settings.UI.Library"
|
xmlns:Lib="using:Microsoft.PowerToys.Settings.UI.Library"
|
||||||
|
xmlns:toolkitcontrols="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
AutomationProperties.LandmarkType="Main">
|
AutomationProperties.LandmarkType="Main">
|
||||||
|
|
||||||
@@ -16,175 +17,59 @@
|
|||||||
<Style TargetType="ListViewItem" x:Name="KeysListViewContainerStyle">
|
<Style TargetType="ListViewItem" x:Name="KeysListViewContainerStyle">
|
||||||
<Setter Property="IsTabStop" Value="False"/>
|
<Setter Property="IsTabStop" Value="False"/>
|
||||||
</Style>
|
</Style>
|
||||||
<DataTemplate x:Name="KeysListViewTemplate" x:DataType="Lib:KeysDataModel">
|
|
||||||
|
|
||||||
|
<DataTemplate x:Key="OriginalKeyTemplate" x:DataType="x:String">
|
||||||
|
<Border Background="{ThemeResource ButtonBackground}"
|
||||||
|
BorderBrush="{ThemeResource ButtonBorderBrush}"
|
||||||
|
BorderThickness="{ThemeResource ButtonBorderThemeThickness}"
|
||||||
|
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||||||
|
Padding="{ThemeResource ButtonPadding}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Left">
|
||||||
|
<TextBlock FontWeight="SemiBold"
|
||||||
|
Foreground="{ThemeResource ButtonForeground}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
TextAlignment="Center"
|
||||||
|
FontSize="12"
|
||||||
|
Text="{Binding}" />
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
<DataTemplate x:Key="RemappedKeyTemplate" x:DataType="x:String">
|
||||||
|
<Border Background="{ThemeResource ButtonBackground}"
|
||||||
|
BorderBrush="{ThemeResource AccentButtonBackground}"
|
||||||
|
BorderThickness="{ThemeResource ButtonBorderThemeThickness}"
|
||||||
|
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||||||
|
Padding="{ThemeResource ButtonPadding}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Left">
|
||||||
|
<TextBlock FontWeight="SemiBold"
|
||||||
|
Foreground="{ThemeResource AccentButtonBackground}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
TextAlignment="Center"
|
||||||
|
FontSize="12"
|
||||||
|
Text="{Binding}" />
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
|
<!--<DataTemplate x:Name="KeysListViewTemplate" x:DataType="Lib:KeysDataModel">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Name="KeyboardManager_RemappedKeysListItem"
|
Name="KeyboardManager_RemappedKeysListItem"
|
||||||
x:Uid="KeyboardManager_RemappedKeysListItem"
|
x:Uid="KeyboardManager_RemappedKeysListItem"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Height="56">
|
Height="56">
|
||||||
<ItemsControl
|
|
||||||
ItemsSource="{x:Bind GetMappedOriginalKeys()}"
|
|
||||||
IsTabStop="False">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal"/>
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Border
|
|
||||||
Background="{ThemeResource SystemBaseLowColor}"
|
|
||||||
CornerRadius="4"
|
|
||||||
Padding="14,0,14,0"
|
|
||||||
Margin="5,0,5,0"
|
|
||||||
Height="36"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
HorizontalAlignment="Left">
|
|
||||||
<TextBlock
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
TextAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Text="{Binding}" />
|
|
||||||
</Border>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
<FontIcon Glyph=""
|
|
||||||
Grid.Column="1"
|
|
||||||
FontSize="14"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Margin="5,0,5,0"/>
|
|
||||||
<ItemsControl
|
|
||||||
Name="KeyboardManager_RemappedTo"
|
|
||||||
x:Uid="KeyboardManager_RemappedTo"
|
|
||||||
ItemsSource="{x:Bind GetMappedNewRemapKeys()}"
|
|
||||||
Grid.Column="2"
|
|
||||||
IsTabStop="False">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal"/>
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Border
|
|
||||||
Background="{ThemeResource SystemAccentColor}"
|
|
||||||
CornerRadius="4"
|
|
||||||
Padding="14,0,14,0"
|
|
||||||
Margin="5,0,5,0"
|
|
||||||
Height="36"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
HorizontalAlignment="Left">
|
|
||||||
<TextBlock
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
TextAlignment="Center"
|
|
||||||
Foreground="White"
|
|
||||||
FontSize="12"
|
|
||||||
Text="{Binding}" />
|
|
||||||
</Border>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>-->
|
||||||
<DataTemplate x:Name="ShortcutKeysListViewTemplate" x:DataType="Lib:AppSpecificKeysDataModel">
|
<!--<DataTemplate x:Name="ShortcutKeysListViewTemplate" x:DataType="Lib:AppSpecificKeysDataModel">
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Name="KeyboardManager_RemappedShortcutsListItem"
|
Name="KeyboardManager_RemappedShortcutsListItem"
|
||||||
x:Uid="KeyboardManager_RemappedShortcutsListItem"
|
x:Uid="KeyboardManager_RemappedShortcutsListItem"
|
||||||
Orientation="Horizontal"
|
Orientation="Horizontal"
|
||||||
Height="56">
|
Height="56">
|
||||||
<ItemsControl
|
|
||||||
ItemsSource="{x:Bind GetMappedOriginalKeys()}"
|
</DataTemplate>-->
|
||||||
IsTabStop="False">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal"/>
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Border
|
|
||||||
Background="{ThemeResource SystemBaseLowColor}"
|
|
||||||
CornerRadius="4"
|
|
||||||
Padding="14,0,14,0"
|
|
||||||
Margin="5,0,5,0"
|
|
||||||
Height="36"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
HorizontalAlignment="Left">
|
|
||||||
<TextBlock
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
TextAlignment="Center"
|
|
||||||
FontSize="12"
|
|
||||||
Text="{Binding}" />
|
|
||||||
</Border>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
<FontIcon Glyph=""
|
|
||||||
Grid.Column="1"
|
|
||||||
FontSize="14"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Margin="5,0,5,0"/>
|
|
||||||
<ItemsControl Name="KeyboardManager_ShortcutRemappedTo"
|
|
||||||
x:Uid="KeyboardManager_ShortcutRemappedTo"
|
|
||||||
ItemsSource="{x:Bind GetMappedNewRemapKeys()}"
|
|
||||||
Grid.Column="2"
|
|
||||||
IsTabStop="False">
|
|
||||||
<ItemsControl.ItemsPanel>
|
|
||||||
<ItemsPanelTemplate>
|
|
||||||
<StackPanel Orientation="Horizontal"/>
|
|
||||||
</ItemsPanelTemplate>
|
|
||||||
</ItemsControl.ItemsPanel>
|
|
||||||
<ItemsControl.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<Border
|
|
||||||
Background="{ThemeResource SystemAccentColor}"
|
|
||||||
CornerRadius="4"
|
|
||||||
Padding="14,0,14,0"
|
|
||||||
Margin="5,0,5,0"
|
|
||||||
Height="36"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
HorizontalAlignment="Left">
|
|
||||||
<TextBlock
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
TextAlignment="Center"
|
|
||||||
Foreground="White"
|
|
||||||
FontSize="12"
|
|
||||||
Text="{Binding}" />
|
|
||||||
</Border>
|
|
||||||
</DataTemplate>
|
|
||||||
</ItemsControl.ItemTemplate>
|
|
||||||
</ItemsControl>
|
|
||||||
<FontIcon Glyph=""
|
|
||||||
Grid.Column="3"
|
|
||||||
FontSize="14"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Margin="5,0,5,0"/>
|
|
||||||
<Border
|
|
||||||
Name="KeyboardManager_TargetApp"
|
|
||||||
x:Uid="KeyboardManager_TargetApp"
|
|
||||||
Background="{ThemeResource SystemAccentColor}"
|
|
||||||
Grid.Column="4"
|
|
||||||
CornerRadius="4"
|
|
||||||
Padding="14,0,14,0"
|
|
||||||
Margin="5,0,5,0"
|
|
||||||
Height="36"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
HorizontalAlignment="Left">
|
|
||||||
<TextBlock
|
|
||||||
FontWeight="SemiBold"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
TextAlignment="Center"
|
|
||||||
Foreground="White"
|
|
||||||
FontSize="12"
|
|
||||||
Text="{x:Bind TargetApp}" />
|
|
||||||
</Border>
|
|
||||||
</StackPanel>
|
|
||||||
</DataTemplate>
|
|
||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
|
|
||||||
<controls:SettingsPageControl x:Uid="KeyboardManager"
|
<controls:SettingsPageControl x:Uid="KeyboardManager"
|
||||||
@@ -192,115 +77,145 @@
|
|||||||
ModuleImageLink="https://aka.ms/PowerToysOverview_KeyboardManage">
|
ModuleImageLink="https://aka.ms/PowerToysOverview_KeyboardManage">
|
||||||
<controls:SettingsPageControl.ModuleContent>
|
<controls:SettingsPageControl.ModuleContent>
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
<ToggleSwitch x:Uid="KeyboardManager_EnableToggle"
|
|
||||||
IsOn="{x:Bind Path=ViewModel.Enabled, Mode=TwoWay}"/>
|
|
||||||
|
|
||||||
<HyperlinkButton NavigateUri="https://aka.ms/powerToysCannotRemapKeys" Margin="-12, 8, 0, 0">
|
<controls:Setting x:Uid="KeyboardManager_EnableToggle">
|
||||||
<TextBlock x:Uid="KBM_KeysCannotBeRemapped" />
|
<controls:Setting.Icon>
|
||||||
</HyperlinkButton>
|
<BitmapIcon UriSource="ms-appx:///Assets/FluentIcons/FluentIconsKeyboardManager.png" ShowAsMonochrome="False" />
|
||||||
|
</controls:Setting.Icon>
|
||||||
|
<controls:Setting.ActionContent>
|
||||||
|
<ToggleSwitch IsOn="{x:Bind Path=ViewModel.Enabled, Mode=TwoWay}" FlowDirection="RightToLeft" />
|
||||||
|
</controls:Setting.ActionContent>
|
||||||
|
<controls:Setting.Description>
|
||||||
|
<HyperlinkButton NavigateUri="https://aka.ms/powerToysCannotRemapKeys">
|
||||||
|
<TextBlock x:Uid="KBM_KeysCannotBeRemapped" FontWeight="SemiBold" />
|
||||||
|
</HyperlinkButton>
|
||||||
|
</controls:Setting.Description>
|
||||||
|
</controls:Setting>
|
||||||
|
|
||||||
<!--<TextBlock x:Uid="KeyboardManager_ConfigHeader"
|
|
||||||
Style="{StaticResource SettingsGroupTitleStyle}"/>
|
|
||||||
|
|
||||||
<TextBlock x:Uid="KeyboardManager_ProfileDescription"
|
<toolkitcontrols:HeaderedItemsControl x:Uid="KeyboardManager_Keys" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
|
||||||
Margin="{StaticResource SmallTopMargin}"/>
|
<controls:Setting x:Uid="KeyboardManager_RemapKeys" Icon="">
|
||||||
|
<controls:Setting.ActionContent>
|
||||||
|
<Button x:Uid="KeyboardManager_RemapKeyboardButton"
|
||||||
|
Command="{Binding Path=RemapKeyboardCommand}"
|
||||||
|
Style="{StaticResource AccentButtonStyle}"
|
||||||
|
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>
|
||||||
|
</controls:Setting.ActionContent>
|
||||||
|
</controls:Setting>
|
||||||
|
|
||||||
|
<ListView x:Name="RemapKeysList"
|
||||||
|
x:Uid="RemapKeysList"
|
||||||
|
ItemsSource="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay}"
|
||||||
|
SelectionMode="None"
|
||||||
|
IsSwipeEnabled="False"
|
||||||
|
Visibility="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay, Converter={StaticResource visibleIfNotEmptyConverter}}">
|
||||||
|
<ListView.ItemTemplate>
|
||||||
|
<DataTemplate x:DataType="Lib:KeysDataModel">
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{ThemeResource CardBackgroundBrush}"
|
||||||
|
BorderThickness="{ThemeResource CardBorderThickness}"
|
||||||
|
BorderBrush="{ThemeResource CardBorderBrush}"
|
||||||
|
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||||||
|
MinHeight="68">
|
||||||
|
|
||||||
|
<ItemsControl Margin="52,0,0,0"
|
||||||
|
ItemsSource="{x:Bind GetMappedOriginalKeys()}"
|
||||||
|
ItemTemplate="{StaticResource OriginalKeyTemplate}"
|
||||||
|
IsTabStop="False">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
</ItemsControl>
|
||||||
|
<TextBlock Text="to"
|
||||||
|
Style="{StaticResource SecondaryTextStyle}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="8,0,8,0"/>
|
||||||
|
|
||||||
<ComboBox SelectedIndex="1" MinWidth="160"
|
<ItemsControl Name="KeyboardManager_RemappedTo"
|
||||||
Margin="{StaticResource SmallTopMargin}">
|
x:Uid="KeyboardManager_RemappedTo"
|
||||||
<ComboBoxItem Content="Config-1"/>
|
ItemsSource="{x:Bind GetMappedNewRemapKeys()}"
|
||||||
<ComboBoxItem Content="Config-2"/>
|
ItemTemplate="{StaticResource RemappedKeyTemplate}"
|
||||||
<ComboBoxItem Content="Config-3"/>
|
IsTabStop="False">
|
||||||
</ComboBox>-->
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
</ItemsControl>
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
|
</ListView>
|
||||||
|
</toolkitcontrols:HeaderedItemsControl>
|
||||||
|
|
||||||
<TextBlock x:Uid="KeyboardManager_RemapKeyboardHeader"
|
|
||||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
|
||||||
Opacity="{x:Bind Mode=OneWay, Path=ViewModel.Enabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
|
|
||||||
|
|
||||||
<TextBlock x:Uid="KeyboardManager_RemapKeyboardSubtitle"
|
<toolkitcontrols:HeaderedItemsControl x:Uid="KeyboardManager_Shortcuts" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.Enabled}">
|
||||||
Margin="{StaticResource SmallTopMargin}"
|
<controls:Setting x:Uid="KeyboardManager_RemapShortcuts" Icon="">
|
||||||
Opacity="{x:Bind Mode=OneWay, Path=ViewModel.Enabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
|
<controls:Setting.ActionContent>
|
||||||
|
<Button x:Uid="KeyboardManager_RemapShortcutsButton"
|
||||||
|
Command="{Binding Path=EditShortcutCommand}"
|
||||||
|
Style="{StaticResource AccentButtonStyle}"
|
||||||
|
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>
|
||||||
|
</controls:Setting.ActionContent>
|
||||||
|
</controls:Setting>
|
||||||
|
|
||||||
<Button x:Uid="KeyboardManager_RemapKeyboardButton"
|
|
||||||
Margin="{StaticResource SmallTopMargin}"
|
|
||||||
Command="{Binding Path=RemapKeyboardCommand}"
|
|
||||||
Style="{StaticResource AccentButtonStyle}"
|
|
||||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>
|
|
||||||
|
|
||||||
<ListView x:Name="RemapKeysList"
|
|
||||||
x:Uid="RemapKeysList"
|
|
||||||
extensions:ListViewExtensions.AlternateColor="{ThemeResource SystemControlBackgroundListLowBrush}"
|
|
||||||
ItemsSource="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay}"
|
|
||||||
ItemTemplate="{StaticResource KeysListViewTemplate}"
|
|
||||||
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="4"
|
|
||||||
MinWidth="350"
|
|
||||||
MaxHeight="200"
|
|
||||||
Margin="{StaticResource SmallTopBottomMargin}"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
SelectionMode="None"
|
|
||||||
IsSwipeEnabled="False"
|
|
||||||
Visibility="{x:Bind Path=ViewModel.RemapKeys, Mode=OneWay, Converter={StaticResource visibleIfNotEmptyConverter}}"
|
|
||||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"
|
|
||||||
ItemContainerStyle="{StaticResource KeysListViewContainerStyle}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!--<AppBarButton x:Uid="KeyboardManager_RemapKeyboardButton"
|
<ListView x:Name="RemapShortcutsList"
|
||||||
Icon="Add"
|
x:Uid="RemapShortcutsList"
|
||||||
Width="370"
|
ItemsSource="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay}"
|
||||||
Style="{StaticResource AddItemAppBarButtonStyle}"
|
SelectionMode="None"
|
||||||
Command="{Binding Path=RemapKeyboardCommand}"
|
IsSwipeEnabled="False"
|
||||||
Margin="{StaticResource AddItemButtonMargin}"
|
Visibility="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay, Converter={StaticResource visibleIfNotEmptyConverter}}">
|
||||||
HorizontalAlignment="Left"
|
<ListView.ItemTemplate>
|
||||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"/>-->
|
<DataTemplate x:DataType="Lib:AppSpecificKeysDataModel">
|
||||||
|
<StackPanel Orientation="Horizontal"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Background="{ThemeResource CardBackgroundBrush}"
|
||||||
|
BorderThickness="{ThemeResource CardBorderThickness}"
|
||||||
|
BorderBrush="{ThemeResource CardBorderBrush}"
|
||||||
|
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||||||
|
MinHeight="68">
|
||||||
|
|
||||||
<TextBlock x:Uid="KeyboardManager_RemapShortcutsHeader"
|
<ItemsControl Margin="52,0,0,0"
|
||||||
Style="{StaticResource SettingsGroupTitleStyle}"
|
ItemsSource="{x:Bind GetMappedOriginalKeys()}"
|
||||||
Opacity="{x:Bind Mode=OneWay, Path=ViewModel.Enabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
|
ItemTemplate="{StaticResource OriginalKeyTemplate}"
|
||||||
|
IsTabStop="False">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="4"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
</ItemsControl>
|
||||||
|
<TextBlock Text="to"
|
||||||
|
Style="{StaticResource SecondaryTextStyle}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Margin="8,0,8,0"/>
|
||||||
|
|
||||||
<TextBlock x:Uid="KeyboardManager_RemapShortcutsSubtitle"
|
<ItemsControl Name="KeyboardManager_RemappedTo"
|
||||||
Margin="{StaticResource SmallTopMargin}"
|
x:Uid="KeyboardManager_RemappedTo"
|
||||||
TextWrapping="WrapWholeWords"
|
ItemsSource="{x:Bind GetMappedNewRemapKeys()}"
|
||||||
Opacity="{x:Bind Mode=OneWay, Path=ViewModel.Enabled, Converter={StaticResource ModuleEnabledToOpacityConverter}}"/>
|
ItemTemplate="{StaticResource RemappedKeyTemplate}"
|
||||||
|
IsTabStop="False">
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="4"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
</ItemsControl>
|
||||||
|
|
||||||
<Button x:Uid="KeyboardManager_RemapShortcutsButton"
|
<TextBlock Margin="8,0,0,0" Style="{StaticResource SecondaryTextStyle}" VerticalAlignment="Center">
|
||||||
Margin="{StaticResource SmallTopMargin}"
|
<Run Text="for"/>
|
||||||
Style="{StaticResource AccentButtonStyle}"
|
<Run Text="{x:Bind TargetApp}" FontWeight="SemiBold"/>
|
||||||
Command="{Binding Path=EditShortcutCommand}"
|
</TextBlock>
|
||||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"
|
</StackPanel>
|
||||||
/>
|
</DataTemplate>
|
||||||
|
</ListView.ItemTemplate>
|
||||||
<ListView x:Name="RemapShortcutsList"
|
</ListView>
|
||||||
x:Uid="RemapShortcutsList"
|
</toolkitcontrols:HeaderedItemsControl>
|
||||||
extensions:ListViewExtensions.AlternateColor="{ThemeResource SystemControlBackgroundListLowBrush}"
|
|
||||||
ItemsSource="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay}"
|
|
||||||
ItemTemplate="{StaticResource ShortcutKeysListViewTemplate}"
|
|
||||||
BorderBrush="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="4"
|
|
||||||
MinWidth="350"
|
|
||||||
MaxHeight="200"
|
|
||||||
Margin="{StaticResource SmallTopBottomMargin}"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
SelectionMode="None"
|
|
||||||
IsSwipeEnabled="False"
|
|
||||||
Visibility="{x:Bind Path=ViewModel.RemapShortcuts, Mode=OneWay, Converter={StaticResource visibleIfNotEmptyConverter}}"
|
|
||||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"
|
|
||||||
ScrollViewer.HorizontalScrollMode="Enabled"
|
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Visible"
|
|
||||||
ScrollViewer.IsHorizontalRailEnabled="True"
|
|
||||||
ItemContainerStyle="{StaticResource KeysListViewContainerStyle}"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!--<AppBarButton x:Uid="KeyboardManager_RemapShortcutsButton"
|
|
||||||
Icon="Add"
|
|
||||||
Width="370"
|
|
||||||
Style="{StaticResource AddItemAppBarButtonStyle}"
|
|
||||||
Command="{Binding Path=EditShortcutCommand}"
|
|
||||||
IsEnabled="{x:Bind Path=ViewModel.Enabled, Mode=OneWay}"
|
|
||||||
Margin="{StaticResource AddItemButtonMargin}"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
/>-->
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</controls:SettingsPageControl.ModuleContent>
|
</controls:SettingsPageControl.ModuleContent>
|
||||||
<controls:SettingsPageControl.ModuleLinks>
|
<controls:SettingsPageControl.ModuleLinks>
|
||||||
|
|||||||
Reference in New Issue
Block a user