[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: keyboard position



Reply to note from "Martin J. Osborne" 
Wed, 15 Jan 2014 21:24:41 -0500

Martin:

> Now I should add an entry in my keyboard file, right? What do
> you recommend?

Basically, you have three choices: your eXeCute key (F9 in the
default layout), your , and ; it substitutes for any
or all of them. (It's recommended, however, to keep a bare carriage
return on one of the Enter keys. Some XPL programs require it, as do
the factory-issue menus.)

About the only wrinkle is that to launch a U2 framename which is
identical to a native command, you will need to enclose the name in
quotes or another separator; otherwise, $X will execute the native
command. So, for example, if you have a frame SA, "SA"<$Xkey>
executes the frame and SA<$Xkey> executes the command.

$X works flawlessly as far as I am aware. If you encounter a
problem, I'd be anxious to hear about it.

By the way, here's the Help screen; MErge it into XYWWWEB.INF:

'%--_XYENCode_start--
{$Xkey,$X}'^'^Enhanced_Func_XC_(eXeCute_command)_Substitute'^C
%.L.Distefano_1/24/09_rev.11/21/13'^'^Purpose'^-------'^Use_a_
single_key_of_your_choosing_(referred_to_below_as_"<$Xkey>")_t
o_launch_both_built-in_(native)_commands_and_user-created_comm
ands_(U2_framenames)_from_the_CMline.'^'^Critical_Prerequisite
'^---------------------'^The_DiaLoG_help_file_~)_MUST_
contain_the_redirection_frame_{{5$?}}._If_it_does_not,_add_it_
by_doing_the_following'._Toggle_this_file_into_eXPanded_view_(
FUNC_XP)._DeFine_the_following_block_of_code_(everythin
g_between_the_horizontal_lines,_not_the_lines_themselves),_and
_issue_ADD2DG.'^'^-_-_-_-_-'^{{5$?}}_Redirect_source_
for_funcs_$A-$Z|$0-$9_from_.DLG_to_.U2_[CLD]'^~B~~>'JM2.~'Q2~B'^'^-_-_-_-_-'^'^Setup'^-----'^Assign_$X
_to_the_desired_key_in_the_KBD_file'.'^nn=$X'^'^Note'._$X_is_a
_complete_substitute_for_both_func_XC_and_the_Enter_key_(":~M"
).'^'^When_assigning_$X_to_the_Enter_key,_insert_an_initial_fu
nc_Q8'.'^28=Q8$X'^',',28=:~M'^or'^104=Q8$X'^',',104=:~M'^'^(Fu
nc_Q8_allows_the_modified_Enter_key_to_work_with_the_spell-che
cker_and_the_Help/Menu_system.)'^'^SAve_and_re-LOAD_the_KBD_fi
le_after_editing.'^'^Use'^---'^To_launch_a_native_command_or_U
2_framename_(referred_to_here_interchangeably_as_"commands"),_
type_the_command_and_arguments,_if_any,_on_the_CMline,_then_hi
t_<$Xkey>_to_execute.'^'^Examples'.'^LM_1.5IN<$Xkey>_issues_th
e_native_Left_Margin_command'^TABLE_VA<$Xkey>_issues_the_U2_fr
amename_to_display_a_list_of_XyWrite_VAriables'^'^Rules'^-----
'^-_Native_commands_take_precedence_over_U2_framenames'._If_th
e_command_on_the_CMline_is_both_a_valid_native_command_and_a_v
alid_U2_framename,_it_is_eXeCuted_as_a_native_command,_NOT_as_
a_framename._To_force_execution_as_a_framename,_enclose_the_co
mmand_(not_the_arguments)_in_double_quotes'.'^__"command"[_arg
(s)]<$Xkey>'^'^Example'.'^You_have_a_U2_routine_called_SAVE_th
at_SAves_the_current_file_to_three_different_locations._If_you
_issue_SAVE<$Xkey>,_you_get_a_normal,_native_SAve_command._To_
invoke_your_enhanced_SAVE_routine,_issue'.'^"SAVE"_d'.\path\my
file<$Xkey>'^'^Exceptions'.'^1)_When_issued_as_a_U2_framename,
_HELP_[framename]_displays_the_U2_Help_screen_for_the_specifie
d_framename._Frame_$X_treats_HELP_as_a_U2_framename,_even_thou
gh_HELP_is_also_a_native_command._This_saves_the_trouble_of_ty
ping_U2_HELP_framename<$Xkey>_every_time._(The_native_HELP_com
mand,_which_displays_the_XyWrite_splash_screen,_is_accessible_
with_?<$Xkey>.)'^2)_Commands_consisting_of_a_single_character_
(except_"?")_are_issued_as_U2_framenames.'^'^-_If_$X_is_assign
ed_to_the_Enter_key_(key_#_28_or_104),_normal_Enter_key_behavi
or_obtains'._If_cursor_is_on_CMline,_command_is_executed',_if_
cursor_is_in_the_text_area,_a_carriage-return_is_put_at_the_cu
rsor_position.'^'^-_If_(and_only_if)_~~'JM2.help'Q2~>STACK.PM~_is_in_use,_commands_issued
_with_<$Xkey>_are_added_to_the_Stack_(command_history)._Do_NOT
_use_"$S"_in_the_KBD-file_assignment',_$X_calls_Stack_internal
ly.'^'^~Renumber_frame_$X_in_PACK_mode'^Default_Save/Get_
Range=01-03',_620'^OPTIONs(1)'._FREEZE_620'^~'^-~I-~I-~I-
~I-~I-~I-~I-~I-~I-'^'^
'%--_XYENCode___end--

--
Carl Distefano
cld@xxxxxxxx