Takeing control of A and B hardware button on Motion Computing C5

Takeing control of A and B hardware button on Motion Computing C5

I want to use the A and B hardware button on the C5 for custom actions. I can only get the A and B button to send a string with Alpha characters(A-Z). I would like to assign an unusual character to distinguish it from keyboard entry. I posted my code below, do you know of another way to assign a keycode to the buttons?

//header section
using Intel.Healthcare;
using Intel.Healthcare.Device;
using Intel.Healthcare.Exception;

//form init
btn = new Buttons(this.Handle);
btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_Barcode, "B");
btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_MedAppA, "A");
btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_MedAppB, "B");

//btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_MedAppA, "{ALT}+A"); //will not work
//btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_MedAppA, "{ALT}A"); //will not work
//btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_MedAppA, "|"); //will not work
//btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_MedAppA, "3"); //will not work

private void Form1_KeyDown(object sender, KeyEventArgs e)
{
string sResult = string.Format("down KeyValue {0}, KeyCode {1}, Shift {2}, Control {3}, Alt {4}",
e.KeyValue.ToString(), e.KeyCode.ToString(), e.Shift.ToString(), e.Control.ToString(), e.Alt.ToString());
MessageBox.Show(sResult);
}

Thanks
Mitchell McCollum

10 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi Mitchell,

Can you send me the MCA log file capturing the failure event so we can see what the MCA software thinks is happening? The MCA log file will have to be set to the debug level, and then started right before the error, and stopped right after the error occurs. This is because the the log file will be set to debug level and will capture a significant amount of data quickly.

Here are the steps:

1. Edit the MCA configuration file (C:Program FilesIntelMCABinIntelHealthcare.cfg) and set the log level to debug:

/Intel/HealthcareSDK/Logging/DefaultLevel = DEBUG

2. Delete the MCA log file (c: empMCA.log). The MCA log file will be recreated automatically when the next event occurs.

3. Take the necessary steps to reproduce the failure.

4. After the failure occurs, immediatly save the MCA log file and then send it back to us. You can attach it as a file under the Options tab in your reply on the forum.

5. Edit the MCA configuration file (C:Program FilesIntelMCABinIntelHealthcare.cfg) and set the log level to the default level of Warnings:

/Intel/HealthcareSDK/Logging/DefaultLevel = WARN

Thanks,

Steve

See the attached log file when I attempted to run the following

btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_Barcode, "|");
btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_MedAppA, "|");
btn.RegisterKeyPressAction(Buttons.HCButtonType.BT_MedAppB, "|");

Thanks
Mitchell McCollum

Allegati: 

AllegatoDimensione
Download MCA.txt684.92 KB

Hi Mitchell,

Thanks for posting the log file showing the failure. Can you also please send me your MCA configuration file (IntelHealthcare.cfg)?

-Steve

There will be a delay on the configuration file. A coworker took the c5 to a demo.

Mitchell

Here is the configuration file.

Thanks

Mitchell

Allegati: 

AllegatoDimensione
Download IntelHealthcare.txt47.18 KB

Mitchell,

Can you please provide the specific list of the special charters that you would like to see and we will try to give you some examples.

Thanks

John C

I would be happy to use any keystroke that would be unlikely entered in normal data entry. Something like Alt+4 would be good. If double keys are a problem the Pipe symbol would work.

Thanks

Hi Mitchell

Please try these:

For Alt+4 use {ALT}+{VK052}

For pipe use {ALT}+{VK108}

Thanks

John C

That did it. Thanks

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi