Skip to content

Commit b38ff27

Browse files
committed
bump
1 parent f178d65 commit b38ff27

File tree

2 files changed

+97
-10
lines changed

2 files changed

+97
-10
lines changed

Packages/com.unity.inputsystem/InputSystem/Devices/Keyboard.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ public unsafe struct KeyboardState : IInputStateTypeInfo
175175
[InputControl(name = "f22", displayName = "F22", layout = "Key", bit = (int)Key.F22)]
176176
[InputControl(name = "f23", displayName = "F23", layout = "Key", bit = (int)Key.F23)]
177177
[InputControl(name = "f24", displayName = "F24", layout = "Key", bit = (int)Key.F24)]
178+
[InputControl(name = "mediaPlayPause", displayName = "MediaPlayPause", layout = "Key", bit = (int)Key.MediaPlayPause)]
179+
[InputControl(name = "mediaRewind", displayName = "MediaRewind", layout = "Key", bit = (int)Key.MediaRewind)]
180+
[InputControl(name = "mediaForward", displayName = "MediaForward", layout = "Key", bit = (int)Key.MediaForward)]
178181
[InputControl(name = "IMESelected", layout = "Button", bit = (int)KeyEx.RemappedIMESelected, synthetic = true)] // Use the last bit to hold IME selected state.
179182
public fixed byte keys[kSizeInBytes];
180183

@@ -2570,6 +2573,9 @@ protected override void FinishSetup()
25702573
"f22",
25712574
"f23",
25722575
"f24",
2576+
nameof(mediaPlayPause),
2577+
nameof(mediaRewind),
2578+
nameof(mediaForward),
25732579
};
25742580
m_Keys = new KeyControl[keyStrings.Length];
25752581
for (var i = 0; i < keyStrings.Length; ++i)

Packages/com.unity.inputsystem/InputSystem/Devices/Precompiled/FastKeyboard.cs

Lines changed: 91 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ internal partial class FastKeyboard : UnityEngine.InputSystem.Keyboard
2424
public const string metadata = ";AnyKey;Button;Axis;Key;DiscreteButton;Keyboard";
2525
public FastKeyboard()
2626
{
27-
var builder = this.Setup(127, 15, 7)
27+
var builder = this.Setup(130, 15, 7)
2828
.WithName("Keyboard")
2929
.WithDisplayName("Keyboard")
30-
.WithChildren(0, 127)
30+
.WithChildren(0, 130)
3131
.WithLayout(new InternedString("Keyboard"))
3232
.WithStateBlock(new InputStateBlock { format = new FourCC(1262836051), sizeInBits = 128 });
3333

@@ -414,6 +414,15 @@ public FastKeyboard()
414414
// /Keyboard/f24
415415
var ctrlKeyboardf24 = Initialize_ctrlKeyboardf24(kKeyLayout, this);
416416

417+
// /Keyboard/mediaPlayPause
418+
var ctrlKeyboardmediaPlayPause = Initialize_ctrlKeyboardmediaPlayPause(kKeyLayout, this);
419+
420+
// /Keyboard/mediaRewind
421+
var ctrlKeyboardmediaRewind = Initialize_ctrlKeyboardmediaRewind(kKeyLayout, this);
422+
423+
// /Keyboard/mediaForward
424+
var ctrlKeyboardmediaForward = Initialize_ctrlKeyboardmediaForward(kKeyLayout, this);
425+
417426
// /Keyboard/IMESelected
418427
var ctrlKeyboardIMESelected = Initialize_ctrlKeyboardIMESelected(kButtonLayout, this);
419428

@@ -444,7 +453,7 @@ public FastKeyboard()
444453
builder.WithControlAlias(6, new InternedString("RightCommand"));
445454

446455
// Control getters/arrays.
447-
this.keys = new UnityEngine.InputSystem.Controls.KeyControl[123];
456+
this.keys = new UnityEngine.InputSystem.Controls.KeyControl[126];
448457
this.keys[0] = ctrlKeyboardspace;
449458
this.keys[1] = ctrlKeyboardenter;
450459
this.keys[2] = ctrlKeyboardtab;
@@ -567,6 +576,9 @@ public FastKeyboard()
567576
this.keys[120] = ctrlKeyboardf22;
568577
this.keys[121] = ctrlKeyboardf23;
569578
this.keys[122] = ctrlKeyboardf24;
579+
this.keys[123] = ctrlKeyboardmediaPlayPause;
580+
this.keys[124] = ctrlKeyboardmediaRewind;
581+
this.keys[125] = ctrlKeyboardmediaForward;
570582
this.anyKey = ctrlKeyboardanyKey;
571583
this.shiftKey = ctrlKeyboardshift;
572584
this.ctrlKey = ctrlKeyboardctrl;
@@ -588,7 +600,7 @@ public FastKeyboard()
588600
, 45614169u, 46138458u, 46662747u, 47187036u, 47711325u, 48235614u, 48759903u, 49284193u, 49808482u, 50332771u
589601
, 50857060u, 51381349u, 51905638u, 52429927u, 52954216u, 53478505u, 54002794u, 54527083u, 55051372u, 55575661u
590602
, 56099950u, 56624239u, 57148528u, 57672817u, 58721394u, 59245683u, 59769972u, 60294261u, 60818550u, 61342839u
591-
, 61867128u, 62391417u, 62915706u, 63439995u, 63964284u, 64488573u, 66585726u
603+
, 61867128u, 62391417u, 62915706u, 63439995u, 63964284u, 64488573u, 65012862u, 65537151u, 66061440u, 66585729u
592604
});
593605

594606
builder.WithControlTree(new byte[]
@@ -652,8 +664,8 @@ public FastKeyboard()
652664
, 0, 1, 117, 0, 255, 255, 122, 0, 1, 118, 0, 255, 255, 123, 0, 1, 119, 0, 255, 255, 124, 0, 1, 123, 0, 241, 0, 0, 0, 0
653665
, 127, 0, 247, 0, 0, 0, 0, 121, 0, 243, 0, 0, 0, 0, 123, 0, 245, 0, 0, 0, 0, 120, 0, 255, 255, 125, 0, 1, 121, 0
654666
, 255, 255, 126, 0, 1, 122, 0, 255, 255, 127, 0, 1, 123, 0, 255, 255, 128, 0, 1, 125, 0, 249, 0, 0, 0, 0, 127, 0, 251, 0
655-
, 0, 0, 0, 124, 0, 255, 255, 129, 0, 1, 125, 0, 255, 255, 0, 0, 0, 126, 0, 255, 255, 0, 0, 0, 127, 0, 253, 0, 0, 0
656-
, 0, 127, 0, 255, 255, 0, 0, 0, 127, 0, 255, 0, 0, 0, 0, 128, 0, 255, 255, 130, 0, 1, 127, 0, 255, 255, 0, 0, 0
667+
, 0, 0, 0, 124, 0, 255, 255, 129, 0, 1, 125, 0, 255, 255, 130, 0, 1, 126, 0, 255, 255, 131, 0, 1, 127, 0, 253, 0, 132, 0
668+
, 1, 127, 0, 255, 255, 0, 0, 0, 127, 0, 255, 0, 0, 0, 0, 128, 0, 255, 255, 133, 0, 1, 127, 0, 255, 255, 0, 0, 0
657669
}, new ushort[]
658670
{
659671
// Control tree node indicies
@@ -662,7 +674,7 @@ public FastKeyboard()
662674
, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58
663675
, 58, 59, 60, 61, 61, 62, 63, 64, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85
664676
, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115
665-
, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126
677+
, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129
666678
});
667679

668680
builder.Finish();
@@ -2075,7 +2087,7 @@ private UnityEngine.InputSystem.Controls.KeyControl Initialize_ctrlKeyboardright
20752087
})
20762088
.WithMinAndMax(0, 1)
20772089
.Finish();
2078-
ctrlKeyboardrightAlt.keyCode = UnityEngine.InputSystem.Key.RightAlt;
2090+
ctrlKeyboardrightAlt.keyCode = UnityEngine.InputSystem.Key.AltGr;
20792091
return ctrlKeyboardrightAlt;
20802092
}
20812093

@@ -2196,7 +2208,7 @@ private UnityEngine.InputSystem.Controls.KeyControl Initialize_ctrlKeyboardleftM
21962208
})
21972209
.WithMinAndMax(0, 1)
21982210
.Finish();
2199-
ctrlKeyboardleftMeta.keyCode = UnityEngine.InputSystem.Key.LeftWindows;
2211+
ctrlKeyboardleftMeta.keyCode = UnityEngine.InputSystem.Key.LeftCommand;
22002212
return ctrlKeyboardleftMeta;
22012213
}
22022214

@@ -3583,11 +3595,80 @@ private UnityEngine.InputSystem.Controls.KeyControl Initialize_ctrlKeyboardf24(I
35833595
return ctrlKeyboardf24;
35843596
}
35853597

3598+
private UnityEngine.InputSystem.Controls.KeyControl Initialize_ctrlKeyboardmediaPlayPause(InternedString kKeyLayout, InputControl parent)
3599+
{
3600+
var ctrlKeyboardmediaPlayPause = new UnityEngine.InputSystem.Controls.KeyControl();
3601+
ctrlKeyboardmediaPlayPause.Setup()
3602+
.At(this, 126)
3603+
.WithParent(parent)
3604+
.WithName("mediaPlayPause")
3605+
.WithDisplayName("MediaPlayPause")
3606+
.WithLayout(kKeyLayout)
3607+
.IsButton(true)
3608+
.WithStateBlock(new InputStateBlock
3609+
{
3610+
format = new FourCC(1112101920),
3611+
byteOffset = 0,
3612+
bitOffset = 124,
3613+
sizeInBits = 1
3614+
})
3615+
.WithMinAndMax(0, 1)
3616+
.Finish();
3617+
ctrlKeyboardmediaPlayPause.keyCode = UnityEngine.InputSystem.Key.MediaPlayPause;
3618+
return ctrlKeyboardmediaPlayPause;
3619+
}
3620+
3621+
private UnityEngine.InputSystem.Controls.KeyControl Initialize_ctrlKeyboardmediaRewind(InternedString kKeyLayout, InputControl parent)
3622+
{
3623+
var ctrlKeyboardmediaRewind = new UnityEngine.InputSystem.Controls.KeyControl();
3624+
ctrlKeyboardmediaRewind.Setup()
3625+
.At(this, 127)
3626+
.WithParent(parent)
3627+
.WithName("mediaRewind")
3628+
.WithDisplayName("MediaRewind")
3629+
.WithLayout(kKeyLayout)
3630+
.IsButton(true)
3631+
.WithStateBlock(new InputStateBlock
3632+
{
3633+
format = new FourCC(1112101920),
3634+
byteOffset = 0,
3635+
bitOffset = 125,
3636+
sizeInBits = 1
3637+
})
3638+
.WithMinAndMax(0, 1)
3639+
.Finish();
3640+
ctrlKeyboardmediaRewind.keyCode = UnityEngine.InputSystem.Key.MediaRewind;
3641+
return ctrlKeyboardmediaRewind;
3642+
}
3643+
3644+
private UnityEngine.InputSystem.Controls.KeyControl Initialize_ctrlKeyboardmediaForward(InternedString kKeyLayout, InputControl parent)
3645+
{
3646+
var ctrlKeyboardmediaForward = new UnityEngine.InputSystem.Controls.KeyControl();
3647+
ctrlKeyboardmediaForward.Setup()
3648+
.At(this, 128)
3649+
.WithParent(parent)
3650+
.WithName("mediaForward")
3651+
.WithDisplayName("MediaForward")
3652+
.WithLayout(kKeyLayout)
3653+
.IsButton(true)
3654+
.WithStateBlock(new InputStateBlock
3655+
{
3656+
format = new FourCC(1112101920),
3657+
byteOffset = 0,
3658+
bitOffset = 126,
3659+
sizeInBits = 1
3660+
})
3661+
.WithMinAndMax(0, 1)
3662+
.Finish();
3663+
ctrlKeyboardmediaForward.keyCode = UnityEngine.InputSystem.Key.MediaForward;
3664+
return ctrlKeyboardmediaForward;
3665+
}
3666+
35863667
private UnityEngine.InputSystem.Controls.ButtonControl Initialize_ctrlKeyboardIMESelected(InternedString kButtonLayout, InputControl parent)
35873668
{
35883669
var ctrlKeyboardIMESelected = new UnityEngine.InputSystem.Controls.ButtonControl();
35893670
ctrlKeyboardIMESelected.Setup()
3590-
.At(this, 126)
3671+
.At(this, 129)
35913672
.WithParent(parent)
35923673
.WithName("IMESelected")
35933674
.WithDisplayName("IMESelected")

0 commit comments

Comments
 (0)