Archived
1
0

Removing NKRO Mode requirement for System Control and Consumer Control Keys (Media Keys)

- In general this shouldn't cause any issues
- BIOSs should ignore
- OSs should happily use

Still, this masks the EHCI hand-off that Windows and Linux are starting to do.
A better solution is needed to force devices to re-negotiate their mode.
This commit is contained in:
Jacob Alexander 2016-07-28 19:55:36 -07:00
parent e5aeac72c8
commit 9309889fad

View File

@ -267,13 +267,6 @@ void Output_consCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *
return; return;
} }
// Not implemented in Boot Mode
if ( USBKeys_Protocol == 0 )
{
warn_print("Consumer Control is not implemented for Boot Mode");
return;
}
// TODO Analog inputs // TODO Analog inputs
// Only indicate USB has changed if either a press or release has occured // Only indicate USB has changed if either a press or release has occured
if ( state == 0x01 || state == 0x03 ) if ( state == 0x01 || state == 0x03 )
@ -318,13 +311,6 @@ void Output_sysCtrlSend_capability( uint8_t state, uint8_t stateType, uint8_t *a
return; return;
} }
// Not implemented in Boot Mode
if ( USBKeys_Protocol == 0 )
{
warn_print("System Control is not implemented for Boot Mode");
return;
}
// TODO Analog inputs // TODO Analog inputs
// Only indicate USB has changed if either a press or release has occured // Only indicate USB has changed if either a press or release has occured
if ( state == 0x01 || state == 0x03 ) if ( state == 0x01 || state == 0x03 )
@ -891,8 +877,30 @@ unsigned int Output_current_available()
void cliFunc_kbdProtocol( char* args ) void cliFunc_kbdProtocol( char* args )
{ {
print( NL ); print( NL );
// Parse number from argument
// NOTE: Only first argument is used
char* arg1Ptr;
char* arg2Ptr;
CLI_argumentIsolation( args, &arg1Ptr, &arg2Ptr );
if ( arg1Ptr[0] != '\0' )
{
uint8_t mode = (uint8_t)numToInt( arg1Ptr );
// Do nothing if the argument was wrong
if ( mode == 0 || mode == 1 )
{
USBKeys_Protocol = mode;
info_msg("Setting Keyboard Protocol to: ");
printInt8( USBKeys_Protocol );
}
}
else
{
info_msg("Keyboard Protocol: "); info_msg("Keyboard Protocol: ");
printInt8( USBKeys_Protocol ); printInt8( USBKeys_Protocol );
}
} }