Library for keyboard operation:
- Data of the selected keyboard layout.
- Status and processing of pressed keys.
Example.
#include <fxsaber\Keyboard\Keyboard.mqh> // Working with keyboard data. void OnChartEvent( const int id, const long &lparam, const double&, const string& ) { static const bool Init = KEYBOARD::FullControl(); // Allow full key interception. static string Str = NULL; if (id == CHARTEVENT_KEYDOWN) // If the key is pressed, { Print(KEYBOARD::Pressed(lparam) + // display the pressed combination ", KeysState: " + ToBits(KEYBOARD::KeysState())); // output the key states. Str += KEYBOARD::Input(lparam); // Form a string of keys pressed since startup. Comment(EnumToString((ENUM_KEYCODE)lparam) + // Output the pressed key. "\nKeyboard language: " + KEYBOARD::Language() + // Current keyboard language. "\nKeyboard country: " + KEYBOARD::Country() + // Current keyboard country. "\n----------------\n" + Str); // Output a string of keys pressed since startup. } }
