anchor.diff:  <script>
  +//keypad
  +var specials  = [
  +  $.keypad.SPACE_BAR,
  +  $.keypad.BACK,
  +  $.keypad.CLEAR
  +];
  +var kana = [
  +  'ャァワラヤマハナタサカア',
  +  'ュィヲリ　ミヒニチシキイ',
  +  'ョゥンルユムフヌツスクウ',
  +  'ッェﾟレ　メヘネテセケエ',
  +  'ーォ゛ロヨモホノトソコオ'
  +];
  +var alnum = [
  +  'ABCDEFGHI123',
  +  'JKLMNOPQR456',
  +  'STUVWXYZ@789',
  +  '?!&:;~-_/*0#',
  +  '"()[].,+=|$%'
  +];
  +
   $(function () {
  -  //keypad
  -  var specials  = [
  -    $.keypad.SPACE_BAR,
  -    $.keypad.BACK,
  -    $.keypad.CLEAR
  -  ];
  -  var kana = [
  -    'ャァワラヤマハナタサカア',
  -    'ュィヲリ　ミヒニチシキイ',
  -    'ョゥンルユムフヌツスクウ',
  -    'ッェﾟレ　メヘネテセケエ',
  -    'ーォ゛ロヨモホノトソコオ'
  -  ];
  -  var alnum = [
  -    'ABCDEFGHI123',
  -    'JKLMNOPQR456',
  -    'STUVWXYZ@789',
  -    '?!&:;~-_/*0#',
  -    '"()[].,+=|$%'
  -  ];
  -  //focus
     $('#query').focus();
   
  +  // keypad
  +  var default_layout = kana;                         // keys layout
  +  var target = $('#' + document.activeElement.name); // input form
  +  make_keys_area(target, default_layout);
  +  make_special_keys_area(target);
  +});
   
  +function make_keys_area (target, layout) {
  +  $('#keys_area').html('');
     $('#keys_area').keypad({
  -    layout: kana,
  -    target: $('.text-field'),
  -    //target: $(':focus'),
  +    layout: layout,
  +    target: target,
       keypadOnly: false,
  +    beforeShow : function(inst){
  +      $("input[type=search]").click(function(){
  +        target =  $('#' + document.activeElement.name);
  +        $('#keys_area').html('');
  +        $('.keypad-inline').html('');
  +        make_keys_area(target, layout);
  +        make_special_keys_area(target);
  +      });
  +    }
     });
  +}
   
  +function make_special_keys_area(target) { 
     $('#special_keys_area').keypad({
  +    target: target,
       layout: specials,
  -    target: $('.text-field'),
  -    //target: $(':focus'),
       spacebarText : "<%= t('opac.search.keypad.space') %>",
       clearText    : "<%= t('opac.search.keypad.clear') %>",
       backText     : "<%= t('opac.search.keypad.back') %>",
       beforeShow : function(inst){
  +      // change layout
         $('.keypad-kana').click(function(){
  -        $('#keys_area').html('');
  -        $('#keys_area').keypad({
  -          target: $('.text-field'),
  -          //target: $(':focus'),
  -          layout: kana
  -        });
  +        make_keys_area(target, kana);
         });
         $('.keypad-alnum').click(function(){
  -        $('#keys_area').html('');
  -        $('#keys_area').keypad({
  -          target: $('.text-field'),
  -          //target: $(':focus'),
  -          layout: alnum
  -        });
  +        make_keys_area(target, alnum);
         });
       }
     });
  -});
  +}
   </script>
   
   <div id="opac_header">
  
positive.code:           <td><%= t('page.search_term') %>:</td>
            <td><%= search_field_tag 'query', nil, :class => 'text-field' %></td>
          </tr>
  <% if false %>
          <tr>
            <td><%= t('patron.creator') %>:</td>
            <td><%= search_field_tag 'creator', nil, :class => 'text-field' %></td>
  
negative.code:               :placeholder => "#{t('page.example')}: 2011, 2011-04-12" %>
           </td>
          </tr>
        </table>
        <%= hidden_field_tag 'opac', 'true' %>
        <%= submit_tag t('page.search'), :class => 'opac_search_button' %><br />
  