"Function Keys Special", Package()
{
Package(){},
// The following 12 items map Fn+fkeys to Fn+fkeys
"e020=e020",
"e02e=e02e",
"e030=e030",
"e064=e064",
"e065=e065",
"e066=e028",
"e067=e067",
"e068=e068",
"e069=e0f0",
"e06a=e06a",
"e06b=e0fb",
"e06c=e0fc",
// The following 12 items map fkeys to fkeys
"3b=3b",
"3c=3c",
"3d=3d",
"3e=3e",
"3f=3f",
"40=40",
"41=41",
"42=42",
"43=43",
"44=44",
"57=57",
"58=58",
},
"Function Keys Standard", Package()
{
Package(){},
// The following 12 items map Fn+fkeys to fkeys
"e020=3b",
"e02e=3c",
"e030=3d",
"e064=3e",
"e065=3f",
"e066=40",
"e067=41",
"e068=42",
"e069=e0f2",
"e06a=44",
"e06b=57",
"e06c=58",
// The following 12 items map fkeys to Fn+fkeys
"3b=e020",
"3c=e02e",
"3d=e030",
"3e=e064",
"3f=e065",
"40=e028",
"41=e067",
"42=e068",
"43=e0f1",
"44=e06a",
"57=e0fb",
"58=e0fc",
},
},
})
External(\_SB.PCI0.LPCB.EC.XQ94, MethodObj)
// RKAB/RKAC called for PS2 code e0fb/e0fc (brightness is mapped to it)
Method(RKAB, 1)
{
// if screen is turned off, turn it on...
If (LNot(\_SB.PCI0.LPCB.EC.BLIS))
{
Store (1, \_SB.PCI0.LPCB.EC.BLIS)
\_SB.PCI0.LPCB.EC.XQ94()
\_SB.PCI0.LPCB.EC._Q41()
}
}
Method(RKAC, 1) { RKAB(Arg0) }
// RKA0 called for PS2 code e0f0 (mapped from normal Fn+F9)
// RKA1 called for PS2 code e0f1 (mapped from F9, with keys swapped)
// RKA2 called for PS2 code e0f2 (mapped from Fn+F9, with keys swapped)
Method (RKA0, 1)
{
If (Arg0)
{
// normal action for Fn+F9 (without keys swapped, toggle screen)
\_SB.PCI0.LPCB.EC.XQ94()
\_SB.PCI0.LPCB.EC._Q41()
}
}
Method(RKA1, 1)
{
If (Arg0)
{
// F9 with keys swapped, do what EC would do (toggle screen)
Store(LNot(\_SB.PCI0.LPCB.EC.BLIS), \_SB.PCI0.LPCB.EC.BLIS)
RKA0(Arg0)
}
}
Method(RKA2, 1)
{
If (Arg0)
{
// Fn+F9 with keys swapped, undo what EC would do (avoid toggling screen)
Store(LNot(\_SB.PCI0.LPCB.EC.BLIS), \_SB.PCI0.LPCB.EC.BLIS)
}
}
}