shrub/mar/dill/belt.hoon

61 lines
1.6 KiB
Plaintext
Raw Normal View History

2015-04-08 02:07:10 +03:00
::
2016-02-05 06:05:37 +03:00
:::: /hoon/belt/dill/mar
2015-04-08 02:07:10 +03:00
::
2016-02-18 02:00:12 +03:00
/? 310
2015-12-10 12:17:19 +03:00
/- kyev, sole
2015-04-08 02:07:10 +03:00
!:
::::
::
[sole .]
2015-04-08 02:07:10 +03:00
|_ dill-belt
::
++ grab :: convert from
|%
++ json
=< (cork . kyev)
2015-12-20 23:50:45 +03:00
|= jon/^json ^- ^kyev
!!
:: %- need
:: %. jon => jo %- ot
:: :~ mod+(cu silt (ar (su (perk ~[%ctrl %shift %alt %meta]))))
:: :- %key
:: %+ cu |*(a/$%({$str @t} {$act @}) ?+(-.a a $str +.a))
:: =- (of [str+so act+(su (perk -)) ~])
:: :~ %ctrl %shift %alt %meta %entr %esc %caps %uncap
:: %pgup %pgdn %home %end %baxp %del %ins
:: %up %down %left %right
:: == ==
2015-04-08 02:07:10 +03:00
++ kyev
2015-12-20 23:50:45 +03:00
|= kev/^kyev ^- dill-belt
2015-12-21 00:16:39 +03:00
~| dill-belt-incomplete+kev
2015-12-10 12:17:19 +03:00
?: ?=({$act ?($ctrl $shift $alt $meta)} q.kev)
2015-04-08 02:07:10 +03:00
[%txt ~] :: ignore
=+ mod=(~(del in p.kev) %shift)
?^ mod
?^ q.kev !! :: only accept strings
2015-04-09 04:35:17 +03:00
=. q.kev
?. (~(has in p.kev) %ctrl)
q.kev
(con 96 q.kev) :: ctrl key decoding
2015-04-08 02:07:10 +03:00
=+ cha=(tuba (trip q.kev))
2015-12-10 12:17:19 +03:00
?> ?=({@ $~} cha) :: of a single character
2015-04-08 02:07:10 +03:00
?+ mod !! :: modified by one buckykey
{$ctrl $~ $~} [%ctl i.cha]
{$alt $~ $~} [%met i.cha]
2015-04-08 02:07:10 +03:00
==
?@ q.kev
[%txt (tuba (trip q.kev))]
?+ +.q.kev !!
$del [%del ~]
$baxp [%bac ~]
$entr [%ret ~]
$up [%aro %u]
$down [%aro %d]
$left [%aro %l]
$right [%aro %r]
2015-04-08 02:07:10 +03:00
== :: %yow, %rez?
::
++ noun dill-belt :: clam from %noun
--
--