GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
input_remap_translation(3) Arcan Lua API input_remap_translation(3)

input_remap_translation - Reset or modify platform level keyboard translation

bool:ok, string:reason
input_remap_translation( number:devid, number:action, string:arg_1, ... )

For some low level platforms it makes sense modifying input translation before the inputs are processed and forwarded onwards and forego patchin in the scripting layer. The main case where this has caused problems is for Arcan running as the main display server on Linux and BSD machines, where the set of tables, configuration and so on are highly OS specific and can get quite complicated. This function can be used to define and tune such a mapping.

The devid is provided by input devices and is thus discovered dynamically, but it can also be indirectly probed by sweeping negative indices in the way shown in the example further below.

The action can be one out of: TRANSLATION_CLEAR , TRANSLATION_SET and TRANSLATION_REMAP . TRANSLATION_CLEAR is to revert as close to as the initial state as possible. TRANSLATION_MAP is to set/override a complete map. TRANSLATION_REMAP is to add a specific remapping.

The set of string arguments following the action will be raw-forwarded to the input platform and is thus platform dependent.

The constant API_ENGINE_BUILD can be used to obtain which input platform is currently in use, which mutates the interpretation and effect of the various actions.

A false result means that the feature is not supported by the platform, and reason is set to some short error message.

1
for the 'evdev' platform, the order and contents of the argument strings corresponds to xkb 'layout' -> 'model' -> 'variant' -> 'options'
2

function input_remap_translation0()
      if string.match(API_ENGINE_BUILD, "evdev") then
            local ind = -1
            while (input_remap_translation(ind, TRANSLATION_SET,
                  "us,cz,de", "logicordless", "basic", "grp:alt_shift_toggle")) do
                  ind = ind - 1
            end
      end
end

function input_remap_translation1()
      local err, msg = input_remap_translation(6666, TRANSLATION_CLEAR)
      if err then
            warning(msg)
      end
end

June 2022 iodev

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.