function x = k1()

global k2;

x = 0;

get_k2;

k2_save = k2;

while(1)
  get_k2;
  if( k2 ~= k2_save)
    break;
  end
end

disp('k2 changed!');
