GetKeyboardLayout

From Multi Theft Auto: Wiki
Revision as of 11:23, 18 October 2020 by Qaisjp (talk | contribs) (copy from https://docs.microsoft.com/en-us/windows/win32/intl/locale-ireadinglayout)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function gets the player's keyboard layout settings, which they are currently (keyboard layout can be changed at any moment) using at the time of invocation.

Syntax

table getKeyboardLayout ()

Returns

Returns a table with keyboard layout properties:

Property Values and description
readingLayout
"ltr" Left to right (English)
"rtl" Right to left (Arabic, Hebrew)
"ttb-rtl-ltr" Either read vertically from top to bottom with columns going from right to left, or read in horizontal rows from left to right, as for the Japanese (Japan) locale.
"ttb-ltr" Read vertically from top to bottom with columns going from left to right, as for the Mongolian (Mongolian) locale.

Example

Click to collapse [-]
Client
addCommandHandler("layout", function()
    outputConsole( inspect( getKeyboardLayout() ) )--output keyboard layout in console (F8)
end)

See Also

BETA: FROM VERSION 1.5.8 r20788 ONWARDS
BETA: FROM VERSION 1.5.8 r20788 ONWARDS