(a00338777) v0.9.2.1
This commit is contained in:
@@ -161,7 +161,7 @@ namespace Microsoft.Xna.Framework.Input
|
||||
return Keys.None;
|
||||
}
|
||||
|
||||
public static char ApplyModifiers(char chr, Sdl.Keyboard.Keymod mods)
|
||||
public static int ApplyModifiers(int chr, Sdl.Keyboard.Keymod mods)
|
||||
{
|
||||
//TODO: this is not by any means comprehensive
|
||||
if ((mods & Sdl.Keyboard.Keymod.Ctrl) == Sdl.Keyboard.Keymod.None) return chr;
|
||||
@@ -169,22 +169,22 @@ namespace Microsoft.Xna.Framework.Input
|
||||
{
|
||||
case 'a':
|
||||
case 'A':
|
||||
return (char)0x1;
|
||||
return 0x1;
|
||||
case 'r':
|
||||
case 'R':
|
||||
return (char)0x12;
|
||||
return 0x12;
|
||||
case 'z':
|
||||
case 'Z':
|
||||
return (char)0x1A;
|
||||
return 0x1A;
|
||||
case 'x':
|
||||
case 'X':
|
||||
return (char)0x18;
|
||||
return 0x18;
|
||||
case 'c':
|
||||
case 'C':
|
||||
return (char)0x3;
|
||||
return 0x3;
|
||||
case 'v':
|
||||
case 'V':
|
||||
return (char)0x16;
|
||||
return 0x16;
|
||||
}
|
||||
return chr;
|
||||
}
|
||||
|
||||
+2
-102
@@ -31,9 +31,9 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>none</DebugType>
|
||||
<OutputPath>bin\Linux\AnyCPU\Release</OutputPath>
|
||||
<OutputPath>..\..\DesktopGL\</OutputPath>
|
||||
<IntermediateOutputPath>obj\Linux\AnyCPU\Release</IntermediateOutputPath>
|
||||
<DocumentationFile>bin\Linux\AnyCPU\Release\MonoGame.Framework.xml</DocumentationFile>
|
||||
<DocumentationFile>..\..\DesktopGL\MonoGame.Framework.xml</DocumentationFile>
|
||||
<DefineConstants>OPENGL;OPENAL;XNADESIGNPROVIDED;TRACE;LINUX;DESKTOPGL;SUPPORTS_EFX</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -537,106 +537,6 @@
|
||||
<Compile Include="Design\Vector4TypeConverter.cs">
|
||||
<Services>_XNADesignProvided</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\BufferedReadStream.cs">
|
||||
<Link>Utilities\NVorbis\BufferedReadStream.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\DataPacket.cs">
|
||||
<Link>Utilities\NVorbis\DataPacket.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Huffman.cs">
|
||||
<Link>Utilities\NVorbis\Huffman.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\IContainerReader.cs">
|
||||
<Link>Utilities\NVorbis\IContainerReader.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\IPacketProvider.cs">
|
||||
<Link>Utilities\NVorbis\IPacketProvider.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\IVorbisStreamStatus.cs">
|
||||
<Link>Utilities\NVorbis\IVorbisStreamStatus.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Mdct.cs">
|
||||
<Link>Utilities\NVorbis\Mdct.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\NewStreamEventArgs.cs">
|
||||
<Link>Utilities\NVorbis\NewStreamEventArgs.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\ParameterChangeEventArgs.cs">
|
||||
<Link>Utilities\NVorbis\ParameterChangeEventArgs.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\RingBuffer.cs">
|
||||
<Link>Utilities\NVorbis\RingBuffer.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\StreamReadBuffer.cs">
|
||||
<Link>Utilities\NVorbis\StreamReadBuffer.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Utils.cs">
|
||||
<Link>Utilities\NVorbis\Utils.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisCodebook.cs">
|
||||
<Link>Utilities\NVorbis\VorbisCodebook.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisFloor.cs">
|
||||
<Link>Utilities\NVorbis\VorbisFloor.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisMapping.cs">
|
||||
<Link>Utilities\NVorbis\VorbisMapping.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisMode.cs">
|
||||
<Link>Utilities\NVorbis\VorbisMode.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisReader.cs">
|
||||
<Link>Utilities\NVorbis\VorbisReader.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisResidue.cs">
|
||||
<Link>Utilities\NVorbis\VorbisResidue.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisStreamDecoder.cs">
|
||||
<Link>Utilities\NVorbis\VorbisStreamDecoder.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\VorbisTime.cs">
|
||||
<Link>Utilities\NVorbis\VorbisTime.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggContainerReader.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggContainerReader.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggCrc.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggCrc.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggPacket.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggPacket.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggPacketReader.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggPacketReader.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
<Compile Include="..\ThirdParty\NVorbis\NVorbis\Ogg\OggPageFlags.cs">
|
||||
<Link>Utilities\NVorbis\Ogg\OggPageFlags.cs</Link>
|
||||
<Services>NVorbis</Services>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
|
||||
+2
-2
@@ -20,9 +20,9 @@
|
||||
<Optimize>false</Optimize>
|
||||
<DebugType>full</DebugType>
|
||||
<EnableUnmanagedDebugging>true</EnableUnmanagedDebugging>
|
||||
<OutputPath>bin\Windows\AnyCPU\Debug</OutputPath>
|
||||
<OutputPath>..\..\Windows\</OutputPath>
|
||||
<IntermediateOutputPath>obj\Windows\AnyCPU\Debug</IntermediateOutputPath>
|
||||
<DocumentationFile>bin\Windows\AnyCPU\Debug\MonoGame.Framework.xml</DocumentationFile>
|
||||
<DocumentationFile>..\..\Windows\MonoGame.Framework.xml</DocumentationFile>
|
||||
<DefineConstants>DEBUG;XNADESIGNPROVIDED;TRACE;WINDOWS;DIRECTX;WINDOWS_MEDIA_SESSION</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
|
||||
@@ -132,9 +132,23 @@ namespace Microsoft.Xna.Framework
|
||||
|
||||
if (!_keys.Contains(key))
|
||||
_keys.Add(key);
|
||||
char character = KeyboardUtil.ApplyModifiers((char)ev.Key.Keysym.Sym, ev.Key.Keysym.Mod);
|
||||
if (char.IsControl(character))
|
||||
|
||||
//TODO: rethink all of this
|
||||
char character = (char)KeyboardUtil.ApplyModifiers(ev.Key.Keysym.Sym, ev.Key.Keysym.Mod);
|
||||
|
||||
if ((int)((char)ev.Key.Keysym.Sym) != ev.Key.Keysym.Sym)
|
||||
{
|
||||
character = '\0';
|
||||
}
|
||||
|
||||
if (char.IsControl(character) ||
|
||||
key == Keys.Left ||
|
||||
key == Keys.Right ||
|
||||
key == Keys.Up ||
|
||||
key == Keys.Down)
|
||||
{
|
||||
_view.CallTextInput(character, key);
|
||||
}
|
||||
}
|
||||
else if (ev.Type == Sdl.EventType.KeyUp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user